sync with OpenBSD -current

This commit is contained in:
purplerain 2024-05-22 02:43:18 +00:00
parent b5356a44af
commit 12fde4069b
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
187 changed files with 1127 additions and 1365 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: extern.h,v 1.31 2018/09/18 17:48:22 millert Exp $ */
/* $OpenBSD: extern.h,v 1.32 2024/05/21 05:00:47 jsg Exp $ */
/* $NetBSD: extern.h,v 1.8 1996/10/31 23:50:54 christos Exp $ */
/*-
@ -201,7 +201,6 @@ int prefix(Char *, Char *);
Char **saveblk(Char **);
Char *strip(Char *);
Char *quote(Char *);
char *strspl(char *, char *);
void udvar(Char *);
/*

View file

@ -1,4 +1,4 @@
/* $OpenBSD: crc.h,v 1.4 2019/01/25 00:19:25 millert Exp $ */
/* $OpenBSD: crc.h,v 1.5 2024/05/21 05:00:47 jsg Exp $ */
/*
* Copyright (c) 2004 Todd C. Miller <millert@openbsd.org>
@ -28,4 +28,3 @@ void CKSUM_Init(CKSUM_CTX *);
void CKSUM_Update(CKSUM_CTX *, const u_int8_t *, size_t);
void CKSUM_Final(CKSUM_CTX *);
char *CKSUM_End(CKSUM_CTX *, char *);
char *CKSUM_Data(const u_int8_t *, size_t, char *);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: mt.h,v 1.3 2003/06/02 23:32:08 millert Exp $ */
/* $OpenBSD: mt.h,v 1.4 2024/05/21 05:00:47 jsg Exp $ */
/* $NetBSD: mt.h,v 1.1 1996/03/05 20:39:36 scottr Exp $ */
/*-
@ -37,8 +37,6 @@ int rmtopen(char *tape, int mode);
int rmtioctl(int command, int count);
struct mtget *rmtstatus(void);
void interrupt(int signo); /* in case operator bangs on console */
/*
* Exit status codes
*/

View file

@ -1,4 +1,4 @@
/* $OpenBSD: extern.h,v 1.6 2003/06/02 23:32:09 millert Exp $ */
/* $OpenBSD: extern.h,v 1.7 2024/05/21 05:00:47 jsg Exp $ */
/* $NetBSD: extern.h,v 1.8 1996/05/07 18:20:06 jtc Exp $ */
/*-
@ -34,15 +34,11 @@
extern char *__progname;
int c_cchars(const void *, const void *);
int c_modes(const void *, const void *);
int csearch(char ***, struct info *);
void checkredirect(void);
void gprint(struct termios *, struct winsize *, int);
void gread(struct termios *, char *);
int ksearch(char ***, struct info *);
int msearch(char ***, struct info *);
void optlist(void);
void print(struct termios *, struct winsize *, int, enum FMT);
void usage(void);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: fortune.c,v 1.63 2021/01/03 01:32:13 schwarze Exp $ */
/* $OpenBSD: fortune.c,v 1.64 2024/05/21 05:00:47 jsg Exp $ */
/* $NetBSD: fortune.c,v 1.8 1995/03/23 08:28:40 cgd Exp $ */
/*-
@ -140,7 +140,6 @@ void sum_tbl(STRFILE *, STRFILE *);
__dead void usage(void);
void zero_tbl(STRFILE *);
char *conv_pat(char *);
int find_matches(void);
void matches_in_list(FILEDESC *);
int maxlen_in_list(FILEDESC *);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: hack.h,v 1.14 2023/06/03 15:19:38 op Exp $*/
/* $OpenBSD: hack.h,v 1.15 2024/05/21 05:00:47 jsg Exp $*/
/* $NetBSD: hack.h,v 1.3 1995/03/23 08:30:21 cgd Exp $*/
/*
@ -680,7 +680,6 @@ char *getdate(void);
int phase_of_the_moon(void);
int night(void);
int midnight(void);
void gethdate(char *);
void getlock(void);
#ifdef MAIL
void getmailstatus(void);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: display.h,v 1.3 2003/06/17 00:36:36 pjanzen Exp $ */
/* $OpenBSD: display.h,v 1.4 2024/05/21 05:00:47 jsg Exp $ */
/* David Leonard <d@openbsd.org>, 1999. Public domain. */
void display_open(void);
@ -15,5 +15,3 @@ char display_atyx(int, int);
void display_redraw_screen(void);
int display_iskillchar(char);
int display_iserasechar(char);
extern int cur_row, cur_col;

View file

@ -1,4 +1,4 @@
/* $OpenBSD: main.c,v 1.22 2016/08/27 02:00:10 guenther Exp $ */
/* $OpenBSD: main.c,v 1.23 2024/05/21 05:00:47 jsg Exp $ */
/* $NetBSD: main.c,v 1.3 1995/04/24 12:24:37 cgd Exp $ */
/*
@ -1131,7 +1131,7 @@ genchar(int type)
/ MODULES CALLED: signal(), wclear(), noecho(), cbreak(), initscr(),
/ wrefresh()
/
/ GLOBAL INPUTS: *stdscr, ill_sig()
/ GLOBAL INPUTS: *stdscr
/
/ GLOBAL OUTPUTS: Windows
/

View file

@ -1,4 +1,4 @@
/* $OpenBSD: phantglobs.h,v 1.7 2016/01/06 14:28:09 mestre Exp $ */
/* $OpenBSD: phantglobs.h,v 1.8 2024/05/21 05:00:47 jsg Exp $ */
/* $NetBSD: phantglobs.h,v 1.3 1995/04/24 12:24:39 cgd Exp $ */
/*
@ -100,7 +100,6 @@ void genchar(int);
int getanswer(char *, bool);
void getstring(char *, int);
void hitmonster(double);
void ill_sig(int);
double infloat(void);
void initialstate(void);
void initplayer(struct player *);

View file

@ -158,8 +158,8 @@ README.os400 Perl notes for OS/400
README.plan9 Perl notes for Plan 9
README.qnx Perl notes for QNX
README.riscos Perl notes for RISC OS
README.openbsd Perl notes for SecBSD
README.secbsd Perl notes for Solaris
README.secbsd Perl notes for SecBSD
README.solaris Perl notes for Solaris
README.synology Perl notes for Synology
README.tru64 Perl notes for Tru64
README.tw Perl for Traditional Chinese (in Big5)

View file

@ -1,4 +1,4 @@
/* $OpenBSD: bio.h,v 1.63 2024/03/02 09:22:41 tb Exp $ */
/* $OpenBSD: bio.h,v 1.64 2024/05/19 07:12:50 jsg Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -364,10 +364,6 @@ int BIO_meth_set_callback_ctrl(BIO_METHOD *biom,
#define BIO_C_GET_WRITE_GUARANTEE 140
#define BIO_C_GET_READ_REQUEST 141
#define BIO_C_SHUTDOWN_WR 142
#define BIO_C_NREAD0 143
#define BIO_C_NREAD 144
#define BIO_C_NWRITE0 145
#define BIO_C_NWRITE 146
#define BIO_C_RESET_READ_REQUEST 147
#define BIO_C_SET_MD_CTX 148
@ -566,11 +562,6 @@ int BIO_get_retry_reason(BIO *bio);
void BIO_set_retry_reason(BIO *bio, int reason);
BIO * BIO_dup_chain(BIO *in);
int BIO_nread0(BIO *bio, char **buf);
int BIO_nread(BIO *bio, char **buf, int num);
int BIO_nwrite0(BIO *bio, char **buf);
int BIO_nwrite(BIO *bio, char **buf, int num);
long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi,
long argl, long ret);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: cmac.c,v 1.23 2024/03/02 09:30:21 tb Exp $ */
/* $OpenBSD: cmac.c,v 1.24 2024/05/20 14:53:37 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
@ -182,7 +182,7 @@ int
CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen,
const EVP_CIPHER *cipher, ENGINE *impl)
{
static unsigned char zero_iv[EVP_MAX_BLOCK_LENGTH];
static const unsigned char zero_iv[EVP_MAX_BLOCK_LENGTH];
int block_size;
/* All zeros means restart */

View file

@ -1,4 +1,4 @@
/* $OpenBSD: cms_local.h,v 1.5 2023/08/24 04:56:36 tb Exp $ */
/* $OpenBSD: cms_local.h,v 1.6 2024/05/19 07:12:50 jsg Exp $ */
/*
* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
@ -394,8 +394,6 @@ extern const ASN1_ITEM CMS_Attributes_Sign_it;
extern const ASN1_ITEM CMS_Attributes_Verify_it;
extern const ASN1_ITEM CMS_RecipientInfo_it;
extern const ASN1_ITEM CMS_PasswordRecipientInfo_it;
CMS_IssuerAndSerialNumber *CMS_IssuerAndSerialNumber_new(void);
void CMS_IssuerAndSerialNumber_free(CMS_IssuerAndSerialNumber *a);
#define CMS_SIGNERINFO_ISSUER_SERIAL 0
#define CMS_SIGNERINFO_KEYIDENTIFIER 1
@ -423,9 +421,6 @@ int cms_SignerIdentifier_get0_signer_id(CMS_SignerIdentifier *sid,
ASN1_OCTET_STRING **keyid, X509_NAME **issuer, ASN1_INTEGER **sno);
int cms_SignerIdentifier_cert_cmp(CMS_SignerIdentifier *sid, X509 *cert);
CMS_ContentInfo *cms_CompressedData_create(int comp_nid);
BIO *cms_CompressedData_init_bio(CMS_ContentInfo *cms);
BIO *cms_DigestAlgorithm_init_bio(X509_ALGOR *digestAlgorithm);
int cms_DigestAlgorithm_find_ctx(EVP_MD_CTX *mctx, BIO *chain,
X509_ALGOR *mdalg);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: conf_api.h,v 1.4 2014/06/12 15:49:28 deraadt Exp $ */
/* $OpenBSD: conf_api.h,v 1.5 2024/05/19 07:12:50 jsg Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -77,7 +77,6 @@ STACK_OF(CONF_VALUE) *_CONF_get_section_values(const CONF *conf,
int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value);
char *_CONF_get_string(const CONF *conf, const char *section,
const char *name);
long _CONF_get_number(const CONF *conf, const char *section, const char *name);
int _CONF_new_data(CONF *conf);
void _CONF_free_data(CONF *conf);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: dh_err.c,v 1.19 2023/07/08 15:29:03 beck Exp $ */
/* $OpenBSD: dh_err.c,v 1.21 2024/05/19 08:22:40 tb Exp $ */
/* ====================================================================
* Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
*
@ -65,50 +65,48 @@
#define ERR_FUNC(func) ERR_PACK(ERR_LIB_DH,func,0)
#define ERR_REASON(reason) ERR_PACK(ERR_LIB_DH,0,reason)
static ERR_STRING_DATA DH_str_functs[]= {
static ERR_STRING_DATA DH_str_functs[] = {
{ERR_FUNC(0xfff), "CRYPTO_internal"},
{0, NULL}
};
static ERR_STRING_DATA DH_str_reasons[]=
{
{ERR_REASON(DH_R_BAD_GENERATOR) ,"bad generator"},
{ERR_REASON(DH_R_BN_DECODE_ERROR) ,"bn decode error"},
{ERR_REASON(DH_R_BN_ERROR) ,"bn error"},
{ERR_REASON(DH_R_DECODE_ERROR) ,"decode error"},
{ERR_REASON(DH_R_INVALID_PUBKEY) ,"invalid public key"},
{ERR_REASON(DH_R_KEYS_NOT_SET) ,"keys not set"},
{ERR_REASON(DH_R_KEY_SIZE_TOO_SMALL) ,"key size too small"},
{ERR_REASON(DH_R_MODULUS_TOO_LARGE) ,"modulus too large"},
{ERR_REASON(DH_R_NON_FIPS_METHOD) ,"non fips method"},
{ERR_REASON(DH_R_NO_PARAMETERS_SET) ,"no parameters set"},
{ERR_REASON(DH_R_NO_PRIVATE_VALUE) ,"no private value"},
{ERR_REASON(DH_R_PARAMETER_ENCODING_ERROR),"parameter encoding error"},
{ERR_REASON(DH_R_CHECK_INVALID_J_VALUE) ,"check invalid j value"},
{ERR_REASON(DH_R_CHECK_INVALID_Q_VALUE) ,"check invalid q value"},
{ERR_REASON(DH_R_CHECK_PUBKEY_INVALID) ,"check pubkey invalid"},
{ERR_REASON(DH_R_CHECK_PUBKEY_TOO_LARGE) ,"check pubkey too large"},
{ERR_REASON(DH_R_CHECK_PUBKEY_TOO_SMALL) ,"check pubkey too small"},
{ERR_REASON(DH_R_CHECK_P_NOT_PRIME) ,"check p not prime"},
{ERR_REASON(DH_R_CHECK_P_NOT_SAFE_PRIME) ,"check p not safe prime"},
{ERR_REASON(DH_R_CHECK_Q_NOT_PRIME) ,"check q not prime"},
{ERR_REASON(DH_R_MISSING_PUBKEY) ,"missing pubkey"},
{ERR_REASON(DH_R_NOT_SUITABLE_GENERATOR) ,"not suitable generator"},
{ERR_REASON(DH_R_UNABLE_TO_CHECK_GENERATOR),"unable to check generator"},
{0,NULL}
};
static ERR_STRING_DATA DH_str_reasons[] = {
{ERR_REASON(DH_R_BAD_GENERATOR) ,"bad generator"},
{ERR_REASON(DH_R_BN_DECODE_ERROR) ,"bn decode error"},
{ERR_REASON(DH_R_BN_ERROR) ,"bn error"},
{ERR_REASON(DH_R_DECODE_ERROR) ,"decode error"},
{ERR_REASON(DH_R_INVALID_PUBKEY) ,"invalid public key"},
{ERR_REASON(DH_R_KEYS_NOT_SET) ,"keys not set"},
{ERR_REASON(DH_R_KEY_SIZE_TOO_SMALL) ,"key size too small"},
{ERR_REASON(DH_R_MODULUS_TOO_LARGE) ,"modulus too large"},
{ERR_REASON(DH_R_NON_FIPS_METHOD) ,"non fips method"},
{ERR_REASON(DH_R_NO_PARAMETERS_SET) ,"no parameters set"},
{ERR_REASON(DH_R_NO_PRIVATE_VALUE) ,"no private value"},
{ERR_REASON(DH_R_PARAMETER_ENCODING_ERROR),"parameter encoding error"},
{ERR_REASON(DH_R_CHECK_INVALID_J_VALUE) ,"check invalid j value"},
{ERR_REASON(DH_R_CHECK_INVALID_Q_VALUE) ,"check invalid q value"},
{ERR_REASON(DH_R_CHECK_PUBKEY_INVALID) ,"check pubkey invalid"},
{ERR_REASON(DH_R_CHECK_PUBKEY_TOO_LARGE) ,"check pubkey too large"},
{ERR_REASON(DH_R_CHECK_PUBKEY_TOO_SMALL) ,"check pubkey too small"},
{ERR_REASON(DH_R_CHECK_P_NOT_PRIME) ,"check p not prime"},
{ERR_REASON(DH_R_CHECK_P_NOT_SAFE_PRIME) ,"check p not safe prime"},
{ERR_REASON(DH_R_CHECK_Q_NOT_PRIME) ,"check q not prime"},
{ERR_REASON(DH_R_MISSING_PUBKEY) ,"missing pubkey"},
{ERR_REASON(DH_R_NOT_SUITABLE_GENERATOR) ,"not suitable generator"},
{ERR_REASON(DH_R_UNABLE_TO_CHECK_GENERATOR),"unable to check generator"},
{0,NULL}
};
#endif
void ERR_load_DH_strings(void)
{
void
ERR_load_DH_strings(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_func_error_string(DH_str_functs[0].error) == NULL)
{
ERR_load_strings(0,DH_str_functs);
ERR_load_strings(0,DH_str_reasons);
}
#endif
if (ERR_func_error_string(DH_str_functs[0].error) == NULL) {
ERR_load_strings(0, DH_str_functs);
ERR_load_strings(0, DH_str_reasons);
}
#endif
}
LCRYPTO_ALIAS(ERR_load_DH_strings);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: dsa_err.c,v 1.19 2023/07/08 14:28:15 beck Exp $ */
/* $OpenBSD: dsa_err.c,v 1.21 2024/05/19 08:22:40 tb Exp $ */
/* ====================================================================
* Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
*
@ -65,40 +65,38 @@
#define ERR_FUNC(func) ERR_PACK(ERR_LIB_DSA,func,0)
#define ERR_REASON(reason) ERR_PACK(ERR_LIB_DSA,0,reason)
static ERR_STRING_DATA DSA_str_functs[]= {
static ERR_STRING_DATA DSA_str_functs[] = {
{ERR_FUNC(0xfff), "CRYPTO_internal"},
{0, NULL}
};
static ERR_STRING_DATA DSA_str_reasons[]=
{
{ERR_REASON(DSA_R_BAD_Q_VALUE) ,"bad q value"},
{ERR_REASON(DSA_R_BN_DECODE_ERROR) ,"bn decode error"},
{ERR_REASON(DSA_R_BN_ERROR) ,"bn error"},
{ERR_REASON(DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE),"data too large for key size"},
{ERR_REASON(DSA_R_DECODE_ERROR) ,"decode error"},
{ERR_REASON(DSA_R_INVALID_DIGEST_TYPE) ,"invalid digest type"},
{ERR_REASON(DSA_R_INVALID_PARAMETERS) ,"invalid parameters"},
{ERR_REASON(DSA_R_MISSING_PARAMETERS) ,"missing parameters"},
{ERR_REASON(DSA_R_MODULUS_TOO_LARGE) ,"modulus too large"},
{ERR_REASON(DSA_R_NEED_NEW_SETUP_VALUES) ,"need new setup values"},
{ERR_REASON(DSA_R_NON_FIPS_DSA_METHOD) ,"non fips dsa method"},
{ERR_REASON(DSA_R_NO_PARAMETERS_SET) ,"no parameters set"},
{ERR_REASON(DSA_R_PARAMETER_ENCODING_ERROR),"parameter encoding error"},
{0,NULL}
};
static ERR_STRING_DATA DSA_str_reasons[] = {
{ERR_REASON(DSA_R_BAD_Q_VALUE) ,"bad q value"},
{ERR_REASON(DSA_R_BN_DECODE_ERROR) ,"bn decode error"},
{ERR_REASON(DSA_R_BN_ERROR) ,"bn error"},
{ERR_REASON(DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE),"data too large for key size"},
{ERR_REASON(DSA_R_DECODE_ERROR) ,"decode error"},
{ERR_REASON(DSA_R_INVALID_DIGEST_TYPE) ,"invalid digest type"},
{ERR_REASON(DSA_R_INVALID_PARAMETERS) ,"invalid parameters"},
{ERR_REASON(DSA_R_MISSING_PARAMETERS) ,"missing parameters"},
{ERR_REASON(DSA_R_MODULUS_TOO_LARGE) ,"modulus too large"},
{ERR_REASON(DSA_R_NEED_NEW_SETUP_VALUES) ,"need new setup values"},
{ERR_REASON(DSA_R_NON_FIPS_DSA_METHOD) ,"non fips dsa method"},
{ERR_REASON(DSA_R_NO_PARAMETERS_SET) ,"no parameters set"},
{ERR_REASON(DSA_R_PARAMETER_ENCODING_ERROR),"parameter encoding error"},
{0,NULL}
};
#endif
void ERR_load_DSA_strings(void)
{
void
ERR_load_DSA_strings(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_func_error_string(DSA_str_functs[0].error) == NULL)
{
ERR_load_strings(0,DSA_str_functs);
ERR_load_strings(0,DSA_str_reasons);
}
#endif
if (ERR_func_error_string(DSA_str_functs[0].error) == NULL) {
ERR_load_strings(0, DSA_str_functs);
ERR_load_strings(0, DSA_str_reasons);
}
#endif
}
LCRYPTO_ALIAS(ERR_load_DSA_strings);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: ec_err.c,v 1.18 2023/07/28 09:28:37 tb Exp $ */
/* $OpenBSD: ec_err.c,v 1.19 2024/05/19 08:26:03 tb Exp $ */
/* ====================================================================
* Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
*
@ -70,8 +70,7 @@ static ERR_STRING_DATA EC_str_functs[] = {
{0, NULL}
};
static ERR_STRING_DATA EC_str_reasons[] =
{
static ERR_STRING_DATA EC_str_reasons[] = {
{ERR_REASON(EC_R_ASN1_ERROR), "asn1 error"},
{ERR_REASON(EC_R_ASN1_UNKNOWN_FIELD), "asn1 unknown field"},
{ERR_REASON(EC_R_BAD_SIGNATURE), "bad signature"},

View file

@ -1,4 +1,4 @@
/* $OpenBSD: idea.h,v 1.11 2023/07/07 12:51:58 beck Exp $ */
/* $OpenBSD: idea.h,v 1.12 2024/05/19 07:12:50 jsg Exp $ */
/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -79,7 +79,6 @@ typedef struct idea_key_st {
IDEA_INT data[9][6];
} IDEA_KEY_SCHEDULE;
const char *idea_options(void);
void idea_ecb_encrypt(const unsigned char *in, unsigned char *out,
IDEA_KEY_SCHEDULE *ks);
void idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks);

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: BIO_s_bio.3,v 1.19 2023/04/29 12:01:53 schwarze Exp $
.\" $OpenBSD: BIO_s_bio.3,v 1.20 2024/05/19 07:12:50 jsg Exp $
.\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by
@ -53,7 +53,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: April 29 2023 $
.Dd $Mdocdate: May 19 2024 $
.Dt BIO_S_BIO 3
.Os
.Sh NAME
@ -69,16 +69,6 @@
.Nm BIO_get_read_request ,
.Nm BIO_ctrl_get_read_request ,
.Nm BIO_ctrl_reset_read_request
.\" The following non-copying I/O functions are intentionally undocumented
.\" because they seem fragile and unused by anything:
.\" .Nm BIO_nread0
.\" .Nm BIO_nread
.\" .Nm BIO_nwrite0
.\" .Nm BIO_nwrite
.\" .Nm BIO_C_NREAD0
.\" .Nm BIO_C_NREAD
.\" .Nm BIO_C_NWRITE0
.\" .Nm BIO_C_NWRITE
.Nd BIO pair BIO
.Sh SYNOPSIS
.In openssl/bio.h

View file

@ -1,4 +1,4 @@
/* $OpenBSD: rsa.h,v 1.65 2023/07/28 10:05:16 tb Exp $ */
/* $OpenBSD: rsa.h,v 1.66 2024/05/19 07:12:50 jsg Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -274,8 +274,6 @@ int RSA_set_method(RSA *rsa, const RSA_METHOD *meth);
const RSA_METHOD *RSA_PKCS1_OpenSSL(void);
const RSA_METHOD *RSA_PKCS1_SSLeay(void);
const RSA_METHOD *RSA_null_method(void);
int RSA_pkey_ctx_ctrl(EVP_PKEY_CTX *ctx, int optype, int cmd, int p1, void *p2);
RSA *d2i_RSAPublicKey(RSA **a, const unsigned char **in, long len);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: x509_internal.h,v 1.27 2023/11/13 10:33:00 tb Exp $ */
/* $OpenBSD: x509_internal.h,v 1.28 2024/05/19 07:12:50 jsg Exp $ */
/*
* Copyright (c) 2020 Bob Beck <beck@openbsd.org>
*
@ -134,7 +134,6 @@ int x509_constraints_check(struct x509_constraints_names *names,
struct x509_constraints_names *excluded, int *error);
int x509_constraints_chain(STACK_OF(X509) *chain, int *error,
int *depth);
int x509_verify_cert_info_populate(X509 *cert);
int x509_vfy_check_security_level(X509_STORE_CTX *ctx);
__END_HIDDEN_DECLS

View file

@ -1,4 +1,4 @@
/* $OpenBSD: assertion.h,v 1.5 2003/06/26 23:19:53 deraadt Exp $ */
/* $OpenBSD: assertion.h,v 1.6 2024/05/21 11:13:08 jsg Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@dsl.cis.upenn.edu)
*
@ -156,7 +156,6 @@ extern int keynote_in_action_authorizers(void *, int);
extern struct keynote_session *keynote_find_session(int);
extern void keynote_keylist_free(struct keylist *);
extern void keynote_free_env(struct environment *);
extern int keynote_in_authorizers(void *, int);
extern int keynote_sremove_assertion(int, int);
extern unsigned int keynote_stringhash(char *, unsigned int);
extern char *keynote_get_private_key(char *);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: kvm_private.h,v 1.26 2018/05/03 15:47:41 zhuk Exp $ */
/* $OpenBSD: kvm_private.h,v 1.27 2024/05/21 11:13:08 jsg Exp $ */
/* $NetBSD: kvm_private.h,v 1.7 1996/05/05 04:32:15 gwr Exp $ */
/*-
@ -99,7 +99,6 @@ struct __kvm {
__BEGIN_HIDDEN_DECLS
void _kvm_err(kvm_t *kd, const char *program, const char *fmt, ...)
__attribute__((__format__ (printf, 3, 4)));
int _kvm_dump_mkheader(kvm_t *kd_live, kvm_t *kd_dump);
void _kvm_freevtop(kvm_t *);
int _kvm_initvtop(kvm_t *);
int _kvm_kvatop(kvm_t *, u_long, paddr_t *);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: gencode.h,v 1.21 2020/08/03 03:40:02 dlg Exp $ */
/* $OpenBSD: gencode.h,v 1.22 2024/05/21 11:13:08 jsg Exp $ */
/*
* Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996
@ -189,7 +189,6 @@ struct block *gen_pf_srnr(int);
struct block *gen_pf_ruleset(char *);
struct block *gen_pf_reason(int);
struct block *gen_pf_action(int);
struct block *gen_pf_dir(int);
struct block *gen_p80211_type(int, int);
struct block *gen_p80211_fcdir(int);

View file

@ -10,7 +10,7 @@
*
* Main client header
*
* $OpenBSD: skey.h,v 1.22 2019/01/25 00:19:26 millert Exp $
* $OpenBSD: skey.h,v 1.23 2024/05/21 11:13:08 jsg Exp $
*/
#ifndef _SKEY_H_
@ -71,7 +71,6 @@ int skeychallenge(struct skey *, char *, char *);
int skeychallenge2(int, struct skey *, char *, char *);
int skeylookup(struct skey *, char *);
int skeyverify(struct skey *, char *);
int skeyzero(struct skey *);
void sevenbit(char *);
void backspace(char *);
char *skipspace(char *);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: mio_priv.h,v 1.13 2022/12/27 17:10:07 jmc Exp $ */
/* $OpenBSD: mio_priv.h,v 1.14 2024/05/21 06:07:06 jsg Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@ -46,6 +46,5 @@ struct mio_ops {
struct mio_hdl *_mio_rmidi_open(const char *, unsigned, int);
struct mio_hdl *_mio_aucat_open(const char *, unsigned, int);
void _mio_create(struct mio_hdl *, struct mio_ops *, unsigned, int);
void _mio_destroy(struct mio_hdl *);
#endif /* !defined(MIO_PRIV_H) */

View file

@ -1,4 +1,4 @@
/* $OpenBSD: sio_priv.h,v 1.11 2022/12/27 17:10:07 jmc Exp $ */
/* $OpenBSD: sio_priv.h,v 1.12 2024/05/21 06:07:06 jsg Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@ -69,7 +69,6 @@ struct sio_ops {
struct sio_hdl *_sio_aucat_open(const char *, unsigned, int);
struct sio_hdl *_sio_sun_open(const char *, unsigned, int);
void _sio_create(struct sio_hdl *, struct sio_ops *, unsigned, int);
void _sio_destroy(struct sio_hdl *);
void _sio_onmove_cb(struct sio_hdl *, int);
void _sio_onvol_cb(struct sio_hdl *, unsigned);
#ifdef DEBUG

View file

@ -1,4 +1,4 @@
/* $OpenBSD: sioctl_priv.h,v 1.2 2022/12/27 17:10:07 jmc Exp $ */
/* $OpenBSD: sioctl_priv.h,v 1.3 2024/05/21 06:07:06 jsg Exp $ */
/*
* Copyright (c) 2014-2020 Alexandre Ratchov <alex@caoua.org>
*
@ -49,8 +49,6 @@ struct sioctl_ops {
};
struct sioctl_hdl *_sioctl_aucat_open(const char *, unsigned int, int);
struct sioctl_hdl *_sioctl_obsd_open(const char *, unsigned int, int);
struct sioctl_hdl *_sioctl_fake_open(const char *, unsigned int, int);
struct sioctl_hdl *_sioctl_sun_open(const char *, unsigned int, int);
void _sioctl_create(struct sioctl_hdl *,
struct sioctl_ops *, unsigned int, int);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: ssl_local.h,v 1.15 2024/05/10 05:08:05 tb Exp $ */
/* $OpenBSD: ssl_local.h,v 1.16 2024/05/19 07:12:50 jsg Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -1305,7 +1305,6 @@ int ssl_verify_alarm_type(long type);
int SSL_SESSION_ticket(SSL_SESSION *ss, unsigned char **out, size_t *out_len);
const SSL_CIPHER *ssl3_get_cipher_by_char(const unsigned char *p);
int ssl3_do_write(SSL *s, int type);
int ssl3_send_alert(SSL *s, int level, int desc);
int ssl3_get_req_cert_types(SSL *s, CBB *cbb);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: extern.h,v 1.23 2021/05/23 17:01:21 jan Exp $ */
/* $OpenBSD: extern.h,v 1.25 2024/05/21 05:00:47 jsg Exp $ */
/* $NetBSD: extern.h,v 1.2 1995/04/11 02:44:49 cgd Exp $ */
/*
@ -61,8 +61,6 @@
* @(#)extern.h 8.2 (Berkeley) 4/4/94
*/
void blkfree(char **);
char **copyblk(char **);
void cwd(char *);
void delete(const char *);
void dologout(int);
@ -92,7 +90,6 @@ void reply_r(int, const char *, ...);
enum ret_cmd { RET_FILE, RET_LIST };
void retrieve(enum ret_cmd, const char *);
void send_file_list(char *);
void setproctitle(const char *, ...);
void statcmd(void);
void statfilecmd(const char *);
void store(const char *, const char *, int);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: extern.h,v 1.6 2015/07/16 04:31:25 tedu Exp $*/
/* $OpenBSD: extern.h,v 1.7 2024/05/19 10:30:43 jsg Exp $*/
/*
* Copyright (c) 1993
@ -31,21 +31,11 @@
* from: @(#)extern.h 8.1 (Berkeley) 6/4/93
*/
struct delayval;
int adelay(int, struct delayval *);
char *autobaud(void);
int delaybits(void);
void gendefaults(void);
int getent(char *, char *);
int getflag(char *);
long getnum(char *);
char *getstr(char *, char **);
void gettable(char *, char *);
void makeenv(char *[]);
char *portselector(void);
void set_ttydefaults(int);
void setchars(void);
void setdefaults(void);
void setflags(int);
int speed(int);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: gettytab.h,v 1.8 2015/11/06 16:42:30 tedu Exp $*/
/* $OpenBSD: gettytab.h,v 1.9 2024/05/19 10:30:43 jsg Exp $*/
/*
* Copyright (c) 1983, 1993, 1994
@ -151,12 +151,6 @@ struct gettyflags {
#define NP gettyflags[21].value
#define MB gettyflags[22].value
int getent(char *, char *);
long getnum(char *);
int getflag(char *);
char *getstr(char *, char **);
extern struct gettyflags gettyflags[];
extern struct gettynums gettynums[];
extern struct gettystrs gettystrs[];
extern int hopcount;

View file

@ -1,4 +1,4 @@
/* $OpenBSD: resolve.h,v 1.107 2024/01/16 19:07:31 deraadt Exp $ */
/* $OpenBSD: resolve.h,v 1.108 2024/05/21 05:00:47 jsg Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@ -322,7 +322,6 @@ void _dl_link_grpsym(elf_object_t *object);
void _dl_cache_grpsym_list_setup(elf_object_t *_object);
void _dl_link_grpref(elf_object_t *load_group, elf_object_t *load_object);
void _dl_link_dlopen(elf_object_t *dep);
void _dl_unlink_dlopen(elf_object_t *dep);
void _dl_notify_unload_shlib(elf_object_t *object);
void _dl_unload_shlib(elf_object_t *object);
void _dl_unload_dlopen(void);
@ -333,7 +332,6 @@ int _dl_match_file(struct sod *sodp, const char *name, int namelen);
char *_dl_find_shlib(struct sod *sodp, char **searchpath, int nohints);
void _dl_load_list_free(struct load_list *load_list);
void _dl_find_immutables(int type, elf_object_t *object, Elf_Ehdr *);
void _dl_push_range_size(struct range_vector *v, vaddr_t start, vsize_t len);
void _dl_apply_immutable(elf_object_t *object);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: mail.local.h,v 1.7 2020/02/09 14:59:21 millert Exp $ */
/* $OpenBSD: mail.local.h,v 1.8 2024/05/21 05:00:47 jsg Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -29,7 +29,6 @@
* SUCH DAMAGE.
*/
void baditem(char *);
int deliver(int, char *, int);
void merr(int, const char *, ...);
void mwarn(const char *, ...);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: rquotad.c,v 1.25 2023/03/08 04:43:05 guenther Exp $ */
/* $OpenBSD: rquotad.c,v 1.26 2024/05/21 05:00:47 jsg Exp $ */
/*
* by Manuel Bouyer (bouyer@ensta.fr). Public domain.
@ -30,7 +30,6 @@
void rquota_service(struct svc_req *request, SVCXPRT *transp);
void sendquota(struct svc_req *request, SVCXPRT *transp);
void printerr_reply(SVCXPRT *transp);
void initfs(void);
int getfsquota(long id, char *path, struct dqblk *dqblk);
int hasquota(struct fstab *fs, char **qfnamep);

View file

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.14 2023/02/02 12:12:52 djm Exp $
# $OpenBSD: Makefile,v 1.15 2024/05/19 19:10:01 anton Exp $
PROG=test_kex
SRCS=tests.c test_kex.c test_proposal.c
@ -14,6 +14,7 @@ SRCS+=cipher-chachapoly.c chacha.c poly1305.c ssh-ecdsa-sk.c ssh-sk.c
SRCS+=ssh-ed25519-sk.c sk-usbhid.c
SRCS+= kex.c
SRCS+= kex-names.c
SRCS+= dh.c
SRCS+= kexdh.c
SRCS+= kexecdh.c

View file

@ -1,4 +1,4 @@
/* $OpenBSD: cmd.h,v 1.27 2022/07/10 20:34:31 krw Exp $ */
/* $OpenBSD: cmd.h,v 1.28 2024/05/21 05:00:47 jsg Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@ -23,7 +23,6 @@
#define CMD_DIRTY 0x0004
int Xreinit(const char *, struct mbr *);
int Xdisk(const char *, struct mbr *);
int Xmanual(const char *, struct mbr *);
int Xedit(const char *, struct mbr *);
int Xsetpid(const char *, struct mbr *);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: gpt.c,v 1.93 2023/06/20 11:52:08 krw Exp $ */
/* $OpenBSD: gpt.c,v 1.94 2024/05/21 05:00:47 jsg Exp $ */
/*
* Copyright (c) 2015 Markus Muller <mmu@grummel.net>
* Copyright (c) 2015 Kenneth R Westerback <krw@openbsd.org>
@ -46,7 +46,6 @@ struct gpt_header gh;
struct gpt_partition gp[NGPTPARTITIONS];
const struct gpt_partition * const *sort_gpt(void);
int lba_start_cmp(const void *e1, const void *e2);
int lba_free(uint64_t *, uint64_t *);
int add_partition(const uint8_t *, const char *, uint64_t);
int find_partition(const uint8_t *);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: fsdb.h,v 1.11 2014/08/10 02:38:24 guenther Exp $ */
/* $OpenBSD: fsdb.h,v 1.12 2024/05/21 05:00:47 jsg Exp $ */
/* $NetBSD: fsdb.h,v 1.4 1996/09/28 19:30:36 christos Exp $ */
/*-
@ -32,7 +32,6 @@
extern int bread(int fd, char *buf, daddr_t blk, long size);
extern void bwrite(int fd, char *buf, daddr_t blk, long size);
extern void rwerror(char *mesg, daddr_t blk);
extern int reply(char *question);
struct cmdtable {

View file

@ -1,4 +1,4 @@
/* $OpenBSD: control.c,v 1.38 2024/01/24 10:09:07 tobhe Exp $ */
/* $OpenBSD: control.c,v 1.39 2024/05/21 05:00:47 jsg Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
@ -44,7 +44,6 @@ struct ctl_conn
*control_connbyfd(int);
void control_close(int, struct control_sock *);
void control_dispatch_imsg(int, short, void *);
void control_dispatch_parent(int, short, void *);
void control_imsg_forward(struct imsg *);
void control_imsg_forward_peerid(struct imsg *);
void control_run(struct privsep *, struct privsep_proc *, void *);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: app.h,v 1.7 2004/04/15 18:39:25 deraadt Exp $ */
/* $OpenBSD: app.h,v 1.8 2024/05/21 05:00:47 jsg Exp $ */
/* $EOM: app.h,v 1.4 1999/04/02 00:58:16 niklas Exp $ */
/*
@ -35,7 +35,6 @@
extern int app_socket;
extern int app_none;
extern void app_conf_init_hook(void);
extern void app_handler(void);
extern void app_init(void);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: if.h,v 1.7 2004/04/15 18:39:25 deraadt Exp $ */
/* $OpenBSD: if.h,v 1.8 2024/05/21 05:00:47 jsg Exp $ */
/* $EOM: if.h,v 1.2 1998/07/07 23:35:58 niklas Exp $ */
/*
@ -35,9 +35,7 @@
#include <sys/types.h>
struct ifreq;
struct ifconf;
extern int if_map(int (*) (char *, struct sockaddr *, void *), void *);
extern int siocgifconf(struct ifconf *);
#endif /* _IF_H_ */

View file

@ -1,4 +1,4 @@
/* $OpenBSD: ike_phase_1.h,v 1.4 2004/04/15 18:39:25 deraadt Exp $ */
/* $OpenBSD: ike_phase_1.h,v 1.5 2024/05/21 05:00:47 jsg Exp $ */
/*
* Copyright (c) 1999 Niklas Hallqvist. All rights reserved.
@ -47,7 +47,6 @@ extern int ike_phase_1_responder_send_SA(struct message *);
extern int ike_phase_1_responder_send_ID_AUTH(struct message *);
extern int ike_phase_1_send_AUTH(struct message *);
extern int ike_phase_1_send_ID(struct message *);
extern int ike_phase_1_send_ID_AUTH(struct message *);
extern int ike_phase_1_send_KE_NONCE(struct message *, size_t);
#endif /* _IKE_PHASE_1_H_ */

View file

@ -1,4 +1,4 @@
/* $OpenBSD: message.h,v 1.29 2018/01/15 09:54:48 mpi Exp $ */
/* $OpenBSD: message.h,v 1.30 2024/05/21 05:00:47 jsg Exp $ */
/* $EOM: message.h,v 1.51 2000/10/10 12:36:39 provos Exp $ */
/*
@ -173,9 +173,6 @@ struct message {
TAILQ_HEAD(msg_head, message);
/* The number of different ISAKMP payloads supported. */
extern u_int8_t payload_index_max;
extern int message_add_payload(struct message *, u_int8_t, u_int8_t *,
size_t, int);
extern int message_add_sa_payload(struct message *);
@ -185,7 +182,6 @@ extern u_int8_t *message_copy(struct message *, size_t, size_t *);
extern void message_drop(struct message *, int, struct proto *, int, int);
extern void message_dump_raw(char *, struct message *, int);
extern void message_free(struct message *);
extern void message_init(void);
extern int message_negotiate_sa(struct message *,
int (*)(struct exchange *, struct sa *, struct sa *));
extern int message_recv(struct message *);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: policy.h,v 1.17 2007/08/05 09:43:09 tom Exp $ */
/* $OpenBSD: policy.h,v 1.18 2024/05/21 05:00:47 jsg Exp $ */
/* $EOM: policy.h,v 1.12 2000/09/28 12:53:27 niklas Exp $ */
/*
@ -38,10 +38,7 @@
extern int ignore_policy;
extern int policy_asserts_num;
extern int x509_policy_asserts_num;
extern int x509_policy_asserts_num_alloc;
extern char **policy_asserts;
extern char **x509_policy_asserts;
extern struct exchange *policy_exchange;
extern struct sa *policy_sa;
extern struct sa *policy_isakmp_sa;

View file

@ -1,4 +1,4 @@
/* $OpenBSD: mountd.c,v 1.91 2023/03/02 16:58:43 millert Exp $ */
/* $OpenBSD: mountd.c,v 1.92 2024/05/21 05:00:47 jsg Exp $ */
/* $NetBSD: mountd.c,v 1.31 1996/02/18 11:57:53 fvdl Exp $ */
/*
@ -181,7 +181,6 @@ void free_host(struct hostlist *);
void new_exportlist(int signo);
void get_exportlist(void);
int get_host(char *, struct grouplist *, struct grouplist *);
int get_num(char *);
struct hostlist *get_ht(void);
int get_line(void);
void get_mountlist(void);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: pfctl.h,v 1.62 2020/01/15 22:38:31 kn Exp $ */
/* $OpenBSD: pfctl.h,v 1.63 2024/05/19 10:39:40 jsg Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@ -56,7 +56,6 @@ struct pfr_anchoritem {
SLIST_HEAD(pfr_anchors, pfr_anchoritem);
int pfr_get_fd(void);
int pfr_clr_tables(struct pfr_table *, int *, int);
int pfr_add_tables(struct pfr_table *, int, int *, int);
int pfr_del_tables(struct pfr_table *, int, int *, int);
@ -80,7 +79,6 @@ int pfr_buf_grow(struct pfr_buffer *, int);
int pfr_buf_load(struct pfr_buffer *, char *, int, int);
char *pf_strerror(int);
int pfi_get_ifaces(const char *, struct pfi_kif *, int *);
int pfi_clr_istats(const char *, int *, int);
void pfctl_print_title(char *);
int pfctl_clear_tables(const char *, int);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: pfctl_queue.c,v 1.7 2019/06/28 13:32:45 deraadt Exp $ */
/* $OpenBSD: pfctl_queue.c,v 1.8 2024/05/19 10:39:40 jsg Exp $ */
/*
* Copyright (c) 2003 - 2013 Henning Brauer <henning@openbsd.org>
@ -66,8 +66,6 @@ void pfctl_insert_queue_node(const struct pf_queuespec,
struct pfctl_queue_node *pfctl_find_queue_node(const char *, const char *);
void pfctl_print_queue_node(int, struct pfctl_queue_node *,
int);
void print_qstats(struct queue_stats);
void pfctl_free_queue_node(struct pfctl_queue_node *);
void pfctl_print_queue_nodestat(int,
const struct pfctl_queue_node *);
void update_avg(struct queue_stats *);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: pflogd.h,v 1.7 2017/09/09 13:02:52 brynet Exp $ */
/* $OpenBSD: pflogd.h,v 1.8 2024/05/21 05:00:47 jsg Exp $ */
/*
* Copyright (c) 2003 Can Erkin Acar
@ -38,8 +38,6 @@ void priv_init(int, int, char **);
int priv_init_pcap(int);
int priv_set_snaplen(int snaplen);
int priv_open_log(void);
int priv_move_log(void);
int priv_pcap_stats(struct pcap_stat *);
int init_pcap(void);
void set_pcap_filter(void);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: frontend.c,v 1.80 2023/12/14 09:59:27 claudio Exp $ */
/* $OpenBSD: frontend.c,v 1.81 2024/05/21 05:00:48 jsg Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@ -144,7 +144,6 @@ void handle_route_message(struct rt_msghdr *,
struct sockaddr **);
void get_rtaddrs(int, struct sockaddr *,
struct sockaddr **);
void rtmget_default(void);
struct pending_query *find_pending_query(uint64_t);
void parse_trust_anchor(struct trust_anchor_head *, int);
void send_trust_anchors(struct trust_anchor_head *);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: resolver.c,v 1.165 2024/05/10 15:02:26 florian Exp $ */
/* $OpenBSD: resolver.c,v 1.166 2024/05/21 05:00:48 jsg Exp $ */
/*
@ -181,8 +181,6 @@ void show_status(pid_t);
void show_autoconf(pid_t);
void show_mem(pid_t);
void send_resolver_info(struct uw_resolver *, pid_t);
void send_detailed_resolver_info(struct uw_resolver *,
pid_t);
void trust_anchor_resolve(void);
void trust_anchor_timo(int, short, void *);
void trust_anchor_resolve_done(struct uw_resolver *, void *,

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: mdoc.7,v 1.181 2022/01/13 08:39:24 schwarze Exp $
.\" $OpenBSD: mdoc.7,v 1.183 2024/05/20 18:40:53 schwarze Exp $
.\"
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2010, 2011, 2013-2020 Ingo Schwarze <schwarze@openbsd.org>
@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: January 13 2022 $
.Dd $Mdocdate: May 20 2024 $
.Dt MDOC 7
.Os
.Sh NAME
@ -439,7 +439,7 @@ in the alphabetical
.Bl -column "Brq, Bro, Brc" description
.It Ic \&Dd Ta document date: Cm $\&Mdocdate$ | Ar month day , year
.It Ic \&Dt Ta document title: Ar TITLE section Op Ar arch
.It Ic \&Os Ta operating system version: Op Ar system Op Ar version
.It Ic \&Os Ta operating system footer: Op Ar footer text
.It Ic \&Nm Ta document name (one argument)
.It Ic \&Nd Ta document description (one line)
.El
@ -1015,7 +1015,7 @@ A numbered list.
No item heads can be specified.
Formatted like
.Fl bullet ,
except that cardinal numbers are used in place of bullets,
except that ordinal numbers are used in place of bullets,
starting at 1.
.It Fl hang
Like
@ -2087,31 +2087,28 @@ Examples:
See also
.Ic \&Oo .
.Tg Os
.It Ic \&Os Op Ar system Op Ar version
Operating system version for display in the page footer.
This is the mandatory third macro of
any
.It Ic \&Os Op Ar footer text
The mandatory third macro of every
.Nm
file.
Usually, do not specify any arguments,
in particular not the operating system name and/or version.
.Pp
The optional
.Ar system
parameter specifies the relevant operating system or environment.
It is suggested to leave it unspecified, in which case
If no argument is given,
.Xr mandoc 1
uses its
prints its
.Fl Ios
argument or, if that isn't specified either,
argument in the page footer, or
.Fa sysname
and
.Fa release
as returned by
.Xr uname 3 .
.Xr uname 3
by default.
.Pp
Examples:
.Dl \&.Os
.Dl \&.Os KTH/CSC/TCS
.Dl \&.Os BSD 4.3
Manual pages that are part of a portable software project can override
the default by giving the project name and version number as arguments,
but leaving it blank is never a bad choice.
.Pp
See also
.Ic \&Dd

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: pool.9,v 1.59 2020/09/25 14:20:20 deraadt Exp $
.\" $OpenBSD: pool.9,v 1.60 2024/05/20 11:12:08 jca Exp $
.\" $NetBSD: pool.9,v 1.18 2001/06/21 11:59:01 wiz Exp $
.\"
.\" Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -28,7 +28,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: September 25 2020 $
.Dd $Mdocdate: May 20 2024 $
.Dt POOL_INIT 9
.Os
.Sh NAME
@ -276,9 +276,6 @@ The handle identifying the pool resource instance.
The minimum number of items to keep in the pool.
The number of pages in the pool will not decrease below the required value to
accommodate the minimum number of items specified by this function.
Unlike
.Fn pool_prime ,
this function does not allocate the necessary memory up-front.
.El
.Ss SETTING HARD LIMITS
The function

View file

@ -1,4 +1,4 @@
/* $OpenBSD: cpu.h,v 1.169 2024/05/12 16:49:38 guenther Exp $ */
/* $OpenBSD: cpu.h,v 1.170 2024/05/21 23:16:06 jsg Exp $ */
/* $NetBSD: cpu.h,v 1.1 2003/04/26 18:39:39 fvdl Exp $ */
/*-
@ -428,7 +428,6 @@ void lgdt(struct region_descriptor *);
struct pcb;
void savectx(struct pcb *);
void switch_exit(struct proc *, void (*)(struct proc *));
void proc_trampoline(void);
/* clock.c */

View file

@ -1,4 +1,4 @@
/* $OpenBSD: cpu.h,v 1.188 2024/05/01 12:54:27 mpi Exp $ */
/* $OpenBSD: cpu.h,v 1.189 2024/05/21 23:16:06 jsg Exp $ */
/* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */
/*-
@ -418,7 +418,6 @@ void lgdt(struct region_descriptor *);
struct pcb;
void savectx(struct pcb *);
void switch_exit(struct proc *);
void proc_trampoline(void);
/* clock.c */

View file

@ -1,4 +1,4 @@
/* $OpenBSD: ufshci.c,v 1.24 2024/05/16 10:52:11 mglocker Exp $ */
/* $OpenBSD: ufshci.c,v 1.29 2024/05/21 18:19:22 mglocker Exp $ */
/*
* Copyright (c) 2022 Marcus Glocker <mglocker@openbsd.org>
@ -125,11 +125,6 @@ ufshci_intr(void *arg)
if (status & UFSHCI_REG_IS_UTRCS) {
DPRINTF(3, "%s: UTRCS interrupt\n", __func__);
/* Reset Interrupt Aggregation Counter and Timer. */
UFSHCI_WRITE_4(sc, UFSHCI_REG_UTRIACR,
UFSHCI_REG_UTRIACR_IAEN | UFSHCI_REG_UTRIACR_CTR);
sc->sc_intraggr_enabled = 0;
ufshci_xfer_complete(sc);
handled = 1;
@ -186,17 +181,38 @@ ufshci_attach(struct ufshci_softc *sc)
DPRINTF(1, " BI=0x%04x\n", UFSHCI_REG_HCMID_BI(sc->sc_hcmid));
DPRINTF(1, " MIC=0x%04x\n", UFSHCI_REG_HCMID_MIC(sc->sc_hcmid));
if (sc->sc_nutrs > 32) {
printf("%s: NUTRS can't be >32 (is %d)!\n",
sc->sc_dev.dv_xname, sc->sc_nutrs);
if (sc->sc_nutrs < UFSHCI_SLOTS_MIN ||
sc->sc_nutrs > UFSHCI_SLOTS_MAX) {
printf("%s: Invalid NUTRS value %d (must be %d-%d)!\n",
sc->sc_dev.dv_xname, sc->sc_nutrs,
UFSHCI_SLOTS_MIN, UFSHCI_SLOTS_MAX);
return 1;
} else if (sc->sc_nutrs == 1) {
sc->sc_iacth = sc->sc_nutrs;
} else if (sc->sc_nutrs > 1) {
sc->sc_iacth = sc->sc_nutrs - 1;
}
if (sc->sc_nutrs == UFSHCI_SLOTS_MAX)
sc->sc_iacth = UFSHCI_INTR_AGGR_COUNT_MAX;
else
sc->sc_iacth = sc->sc_nutrs;
DPRINTF(1, "Intr. aggr. counter threshold:\nIACTH=%d\n", sc->sc_iacth);
/*
* XXX:
* At the moment normal interrupts work better for us than interrupt
* aggregation, because:
*
* 1. With interrupt aggregation enabled, the I/O performance
* isn't better, but even slightly worse depending on the
* UFS controller and architecture.
* 2. With interrupt aggregation enabled we currently see
* intermittent SCSI command stalling. Probably there is a
* race condition where new SCSI commands are getting
* scheduled, while we miss to reset the interrupt aggregation
* counter/timer, which leaves us with no more interrupts
* triggered. This needs to be fixed, but I couldn't figure
* out yet how.
*/
#if 0
sc->sc_flags |= UFSHCI_FLAGS_AGGR_INTR; /* Enable intr. aggregation */
#endif
ufshci_init(sc);
if (ufshci_ccb_alloc(sc, sc->sc_nutrs) != 0) {
@ -233,6 +249,7 @@ ufshci_reset(struct ufshci_softc *sc)
* Reset and enable host controller
*/
UFSHCI_WRITE_4(sc, UFSHCI_REG_HCE, UFSHCI_REG_HCE_HCE);
/* 7.1.1 Host Controller Initialization: 3) */
for (i = 0; i < retry; i++) {
hce = UFSHCI_READ_4(sc, UFSHCI_REG_HCE);
@ -290,7 +307,8 @@ ufshci_dmamem_alloc(struct ufshci_softc *sc, size_t size)
udm->udm_size = size;
if (bus_dmamap_create(sc->sc_dmat, size, 1, size, 0,
BUS_DMA_WAITOK | BUS_DMA_ALLOCNOW | BUS_DMA_64BIT,
BUS_DMA_WAITOK | BUS_DMA_ALLOCNOW |
(sc->sc_cap & UFSHCI_REG_CAP_64AS) ? BUS_DMA_64BIT : 0,
&udm->udm_map) != 0)
goto udmfree;
@ -345,7 +363,6 @@ ufshci_init(struct ufshci_softc *sc)
*/
/* 7.1.1 Host Controller Initialization: 5) */
//UFSHCI_WRITE_4(sc, UFSHCI_REG_IE, UFSHCI_REG_IE_UCCE |
UFSHCI_WRITE_4(sc, UFSHCI_REG_IE,
UFSHCI_REG_IE_UTRCE | UFSHCI_REG_IE_UTMRCE);
@ -371,8 +388,16 @@ ufshci_init(struct ufshci_softc *sc)
*/
/* 7.1.1 Host Controller Initialization: 11) */
reg = UFSHCI_READ_4(sc, UFSHCI_REG_UTRIACR);
DPRINTF(2, "%s: UTRIACR=0x%08x\n", __func__, reg);
if (sc->sc_flags & UFSHCI_FLAGS_AGGR_INTR) {
UFSHCI_WRITE_4(sc, UFSHCI_REG_UTRIACR,
UFSHCI_REG_UTRIACR_IAEN |
UFSHCI_REG_UTRIACR_IAPWEN |
UFSHCI_REG_UTRIACR_CTR |
UFSHCI_REG_UTRIACR_IACTH(sc->sc_iacth) |
UFSHCI_REG_UTRIACR_IATOVAL(UFSHCI_INTR_AGGR_TIMEOUT));
} else {
UFSHCI_WRITE_4(sc, UFSHCI_REG_UTRIACR, 0);
}
/*
* 7.1.1 Host Controller Initialization: 12)
@ -496,7 +521,10 @@ ufshci_utr_cmd_nop(struct ufshci_softc *sc, struct ufshci_ccb *ccb,
utrd->dw0 |= UFSHCI_UTRD_DW0_DD_NO;
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 2c) */
utrd->dw0 |= UFSHCI_UTRD_DW0_I_REG;
if (sc->sc_flags & UFSHCI_FLAGS_AGGR_INTR)
utrd->dw0 |= UFSHCI_UTRD_DW0_I_REG;
else
utrd->dw0 |= UFSHCI_UTRD_DW0_I_INT;
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 2d) */
utrd->dw2 = UFSHCI_UTRD_DW2_OCS_IOV;
@ -586,7 +614,10 @@ ufshci_utr_cmd_lun(struct ufshci_softc *sc, struct ufshci_ccb *ccb,
utrd->dw0 |= UFSHCI_UTRD_DW0_DD_T2I;
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 2c) */
utrd->dw0 |= UFSHCI_UTRD_DW0_I_REG;
if (sc->sc_flags & UFSHCI_FLAGS_AGGR_INTR)
utrd->dw0 |= UFSHCI_UTRD_DW0_I_REG;
else
utrd->dw0 |= UFSHCI_UTRD_DW0_I_INT;
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 2d) */
utrd->dw2 = UFSHCI_UTRD_DW2_OCS_IOV;
@ -693,7 +724,10 @@ ufshci_utr_cmd_inquiry(struct ufshci_softc *sc, struct ufshci_ccb *ccb,
utrd->dw0 |= UFSHCI_UTRD_DW0_DD_T2I;
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 2c) */
utrd->dw0 |= UFSHCI_UTRD_DW0_I_REG;
if (sc->sc_flags & UFSHCI_FLAGS_AGGR_INTR)
utrd->dw0 |= UFSHCI_UTRD_DW0_I_REG;
else
utrd->dw0 |= UFSHCI_UTRD_DW0_I_INT;
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 2d) */
utrd->dw2 = UFSHCI_UTRD_DW2_OCS_IOV;
@ -798,7 +832,10 @@ ufshci_utr_cmd_capacity16(struct ufshci_softc *sc, struct ufshci_ccb *ccb,
utrd->dw0 |= UFSHCI_UTRD_DW0_DD_T2I;
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 2c) */
utrd->dw0 |= UFSHCI_UTRD_DW0_I_REG;
if (sc->sc_flags & UFSHCI_FLAGS_AGGR_INTR)
utrd->dw0 |= UFSHCI_UTRD_DW0_I_REG;
else
utrd->dw0 |= UFSHCI_UTRD_DW0_I_INT;
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 2d) */
utrd->dw2 = UFSHCI_UTRD_DW2_OCS_IOV;
@ -907,7 +944,10 @@ ufshci_utr_cmd_capacity(struct ufshci_softc *sc, struct ufshci_ccb *ccb,
utrd->dw0 |= UFSHCI_UTRD_DW0_DD_T2I;
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 2c) */
utrd->dw0 |= UFSHCI_UTRD_DW0_I_REG;
if (sc->sc_flags & UFSHCI_FLAGS_AGGR_INTR)
utrd->dw0 |= UFSHCI_UTRD_DW0_I_REG;
else
utrd->dw0 |= UFSHCI_UTRD_DW0_I_INT;
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 2d) */
utrd->dw2 = UFSHCI_UTRD_DW2_OCS_IOV;
@ -1020,7 +1060,10 @@ ufshci_utr_cmd_io(struct ufshci_softc *sc, struct ufshci_ccb *ccb,
utrd->dw0 |= UFSHCI_UTRD_DW0_DD_I2T;
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 2c) */
utrd->dw0 |= UFSHCI_UTRD_DW0_I_REG;
if (sc->sc_flags & UFSHCI_FLAGS_AGGR_INTR)
utrd->dw0 |= UFSHCI_UTRD_DW0_I_REG;
else
utrd->dw0 |= UFSHCI_UTRD_DW0_I_INT;
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 2d) */
utrd->dw2 = UFSHCI_UTRD_DW2_OCS_IOV;
@ -1134,7 +1177,10 @@ ufshci_utr_cmd_sync(struct ufshci_softc *sc, struct ufshci_ccb *ccb,
utrd->dw0 |= UFSHCI_UTRD_DW0_DD_I2T;
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 2c) */
utrd->dw0 |= UFSHCI_UTRD_DW0_I_REG;
if (sc->sc_flags & UFSHCI_FLAGS_AGGR_INTR)
utrd->dw0 |= UFSHCI_UTRD_DW0_I_REG;
else
utrd->dw0 |= UFSHCI_UTRD_DW0_I_INT;
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 2d) */
utrd->dw2 = UFSHCI_UTRD_DW2_OCS_IOV;
@ -1247,6 +1293,13 @@ ufshci_xfer_complete(struct ufshci_softc *sc)
DPRINTF(3, "slot %d completed\n", i);
}
/* 7.2.3: Reset Interrupt Aggregation Counter and Timer 4) */
if (sc->sc_flags & UFSHCI_FLAGS_AGGR_INTR) {
UFSHCI_WRITE_4(sc, UFSHCI_REG_UTRIACR,
UFSHCI_REG_UTRIACR_IAEN | UFSHCI_REG_UTRIACR_CTR);
}
mtx_leave(&sc->sc_cmd_mtx);
/*
@ -1287,7 +1340,8 @@ ufshci_ccb_alloc(struct ufshci_softc *sc, int nccbs)
if (bus_dmamap_create(sc->sc_dmat, UFSHCI_UCD_PRDT_MAX_XFER,
UFSHCI_UCD_PRDT_MAX_SEGS, UFSHCI_UCD_PRDT_MAX_XFER, 0,
BUS_DMA_WAITOK | BUS_DMA_ALLOCNOW | BUS_DMA_64BIT,
BUS_DMA_WAITOK | BUS_DMA_ALLOCNOW |
(sc->sc_cap & UFSHCI_REG_CAP_64AS) ? BUS_DMA_64BIT : 0,
&ccb->ccb_dmamap) != 0)
goto free_maps;
@ -1361,17 +1415,6 @@ ufshci_scsi_cmd(struct scsi_xfer *xs)
DPRINTF(3, "%s: cmd=0x%x\n", __func__, xs->cmd.opcode);
/* Schedule interrupt aggregation. */
if (ISSET(xs->flags, SCSI_POLL) == 0 && sc->sc_intraggr_enabled == 0) {
UFSHCI_WRITE_4(sc, UFSHCI_REG_UTRIACR,
UFSHCI_REG_UTRIACR_IAEN |
UFSHCI_REG_UTRIACR_IAPWEN |
UFSHCI_REG_UTRIACR_CTR |
UFSHCI_REG_UTRIACR_IACTH(sc->sc_iacth) |
UFSHCI_REG_UTRIACR_IATOVAL(UFSHCI_INTR_AGGR_TIMEOUT));
sc->sc_intraggr_enabled = 1;
}
switch (xs->cmd.opcode) {
case READ_COMMAND:
@ -1381,7 +1424,6 @@ ufshci_scsi_cmd(struct scsi_xfer *xs)
DPRINTF(3, "io read\n");
ufshci_scsi_io(xs, SCSI_DATA_IN);
break;
case WRITE_COMMAND:
case WRITE_10:
case WRITE_12:
@ -1389,17 +1431,14 @@ ufshci_scsi_cmd(struct scsi_xfer *xs)
DPRINTF(3, "io write\n");
ufshci_scsi_io(xs, SCSI_DATA_OUT);
break;
case SYNCHRONIZE_CACHE:
DPRINTF(3, "sync\n");
ufshci_scsi_sync(xs);
break;
case INQUIRY:
DPRINTF(3, "inquiry\n");
ufshci_scsi_inquiry(xs);
break;
case READ_CAPACITY_16:
DPRINTF(3, "capacity16\n");
ufshci_scsi_capacity16(xs);
@ -1408,7 +1447,6 @@ ufshci_scsi_cmd(struct scsi_xfer *xs)
DPRINTF(3, "capacity\n");
ufshci_scsi_capacity(xs);
break;
case TEST_UNIT_READY:
case PREVENT_ALLOW:
case START_STOP:

View file

@ -1,4 +1,4 @@
/* $OpenBSD: ufshcireg.h,v 1.9 2024/05/16 10:52:11 mglocker Exp $ */
/* $OpenBSD: ufshcireg.h,v 1.10 2024/05/20 20:08:04 mglocker Exp $ */
/*
* Copyright (c) 2022 Marcus Glocker <mglocker@openbsd.org>
@ -22,7 +22,9 @@
#define UFSHCI_UCD_PRDT_MAX_SEGS 64
#define UFSHCI_UCD_PRDT_MAX_XFER (UFSHCI_UCD_PRDT_MAX_SEGS * PAGE_SIZE)
#define UFSHCI_INTR_AGGR_TIMEOUT 0x08 /* 320us (1 unit = 40us) */
#define UFSHCI_MAX_UNITS 32
#define UFSHCI_INTR_AGGR_COUNT_MAX 31
#define UFSHCI_SLOTS_MIN 1
#define UFSHCI_SLOTS_MAX 32
#define UFSHCI_LBS 4096 /* UFS Logical Block Size:
For UFS minimum size shall be
4096 bytes */

View file

@ -1,4 +1,4 @@
/* $OpenBSD: ufshcivar.h,v 1.5 2024/05/15 20:15:33 mglocker Exp $ */
/* $OpenBSD: ufshcivar.h,v 1.7 2024/05/20 12:42:45 mglocker Exp $ */
/*
* Copyright (c) 2022 Marcus Glocker <mglocker@openbsd.org>
@ -57,10 +57,11 @@ struct ufshci_softc {
bus_size_t sc_ios;
bus_dma_tag_t sc_dmat;
uint8_t sc_intraggr_enabled;
uint8_t sc_iacth;
struct mutex sc_cmd_mtx;
#define UFSHCI_FLAGS_AGGR_INTR 1
uint8_t sc_flags;
uint32_t sc_ver;
uint32_t sc_cap;
uint32_t sc_hcpid;

View file

@ -300,12 +300,15 @@ static struct dma_fence *amdgpu_job_run(struct drm_sched_job *sched_job)
dma_fence_set_error(finished, -ECANCELED);
if (finished->error < 0) {
DRM_INFO("Skip scheduling IBs!\n");
dev_dbg(adev->dev, "Skip scheduling IBs in ring(%s)",
ring->name);
} else {
r = amdgpu_ib_schedule(ring, job->num_ibs, job->ibs, job,
&fence);
if (r)
DRM_ERROR("Error scheduling IBs (%d)\n", r);
dev_err(adev->dev,
"Error scheduling IBs (%d) in ring(%s)", r,
ring->name);
}
job->job_run_counter++;

View file

@ -1269,14 +1269,18 @@ int amdgpu_bo_get_metadata(struct amdgpu_bo *bo, void *buffer,
* amdgpu_bo_move_notify - notification about a memory move
* @bo: pointer to a buffer object
* @evict: if this move is evicting the buffer from the graphics address space
* @new_mem: new resource for backing the BO
*
* Marks the corresponding &amdgpu_bo buffer object as invalid, also performs
* bookkeeping.
* TTM driver callback which is called when ttm moves a buffer.
*/
void amdgpu_bo_move_notify(struct ttm_buffer_object *bo, bool evict)
void amdgpu_bo_move_notify(struct ttm_buffer_object *bo,
bool evict,
struct ttm_resource *new_mem)
{
struct amdgpu_device *adev = amdgpu_ttm_adev(bo->bdev);
struct ttm_resource *old_mem = bo->resource;
struct amdgpu_bo *abo;
if (!amdgpu_bo_is_amdgpu_bo(bo))
@ -1289,13 +1293,13 @@ void amdgpu_bo_move_notify(struct ttm_buffer_object *bo, bool evict)
#ifdef notyet
if (abo->tbo.base.dma_buf && !abo->tbo.base.import_attach &&
bo->resource->mem_type != TTM_PL_SYSTEM)
old_mem && old_mem->mem_type != TTM_PL_SYSTEM)
dma_buf_move_notify(abo->tbo.base.dma_buf);
#endif
/* remember the eviction */
if (evict)
atomic64_inc(&adev->num_evictions);
/* move_notify is called before move happens */
trace_amdgpu_bo_move(abo, new_mem ? new_mem->mem_type : -1,
old_mem ? old_mem->mem_type : -1);
}
void amdgpu_bo_get_memory(struct amdgpu_bo *bo,

View file

@ -329,7 +329,9 @@ int amdgpu_bo_set_metadata (struct amdgpu_bo *bo, void *metadata,
int amdgpu_bo_get_metadata(struct amdgpu_bo *bo, void *buffer,
size_t buffer_size, uint32_t *metadata_size,
uint64_t *flags);
void amdgpu_bo_move_notify(struct ttm_buffer_object *bo, bool evict);
void amdgpu_bo_move_notify(struct ttm_buffer_object *bo,
bool evict,
struct ttm_resource *new_mem);
void amdgpu_bo_release_notify(struct ttm_buffer_object *bo);
vm_fault_t amdgpu_bo_fault_reserve_notify(struct ttm_buffer_object *bo);
void amdgpu_bo_fence(struct amdgpu_bo *bo, struct dma_fence *fence,

View file

@ -424,7 +424,7 @@ bool amdgpu_res_cpu_visible(struct amdgpu_device *adev,
return false;
if (res->mem_type == TTM_PL_SYSTEM || res->mem_type == TTM_PL_TT ||
res->mem_type == AMDGPU_PL_PREEMPT)
res->mem_type == AMDGPU_PL_PREEMPT || res->mem_type == AMDGPU_PL_DOORBELL)
return true;
if (res->mem_type != TTM_PL_VRAM)
@ -432,7 +432,7 @@ bool amdgpu_res_cpu_visible(struct amdgpu_device *adev,
amdgpu_res_first(res, 0, res->size, &cursor);
while (cursor.remaining) {
if ((cursor.start + cursor.size) >= adev->gmc.visible_vram_size)
if ((cursor.start + cursor.size) > adev->gmc.visible_vram_size)
return false;
amdgpu_res_next(&cursor, cursor.size);
}
@ -486,14 +486,16 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict,
if (!old_mem || (old_mem->mem_type == TTM_PL_SYSTEM &&
bo->ttm == NULL)) {
amdgpu_bo_move_notify(bo, evict, new_mem);
ttm_bo_move_null(bo, new_mem);
goto out;
return 0;
}
if (old_mem->mem_type == TTM_PL_SYSTEM &&
(new_mem->mem_type == TTM_PL_TT ||
new_mem->mem_type == AMDGPU_PL_PREEMPT)) {
amdgpu_bo_move_notify(bo, evict, new_mem);
ttm_bo_move_null(bo, new_mem);
goto out;
return 0;
}
if ((old_mem->mem_type == TTM_PL_TT ||
old_mem->mem_type == AMDGPU_PL_PREEMPT) &&
@ -503,9 +505,10 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict,
return r;
amdgpu_ttm_backend_unbind(bo->bdev, bo->ttm);
amdgpu_bo_move_notify(bo, evict, new_mem);
ttm_resource_free(bo, &bo->resource);
ttm_bo_assign_mem(bo, new_mem);
goto out;
return 0;
}
if (old_mem->mem_type == AMDGPU_PL_GDS ||
@ -517,8 +520,9 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict,
new_mem->mem_type == AMDGPU_PL_OA ||
new_mem->mem_type == AMDGPU_PL_DOORBELL) {
/* Nothing to save here */
amdgpu_bo_move_notify(bo, evict, new_mem);
ttm_bo_move_null(bo, new_mem);
goto out;
return 0;
}
if (bo->type == ttm_bo_type_device &&
@ -530,23 +534,24 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict,
abo->flags &= ~AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED;
}
if (adev->mman.buffer_funcs_enabled) {
if (((old_mem->mem_type == TTM_PL_SYSTEM &&
new_mem->mem_type == TTM_PL_VRAM) ||
(old_mem->mem_type == TTM_PL_VRAM &&
new_mem->mem_type == TTM_PL_SYSTEM))) {
hop->fpfn = 0;
hop->lpfn = 0;
hop->mem_type = TTM_PL_TT;
hop->flags = TTM_PL_FLAG_TEMPORARY;
return -EMULTIHOP;
}
r = amdgpu_move_blit(bo, evict, new_mem, old_mem);
} else {
r = -ENODEV;
if (adev->mman.buffer_funcs_enabled &&
((old_mem->mem_type == TTM_PL_SYSTEM &&
new_mem->mem_type == TTM_PL_VRAM) ||
(old_mem->mem_type == TTM_PL_VRAM &&
new_mem->mem_type == TTM_PL_SYSTEM))) {
hop->fpfn = 0;
hop->lpfn = 0;
hop->mem_type = TTM_PL_TT;
hop->flags = TTM_PL_FLAG_TEMPORARY;
return -EMULTIHOP;
}
amdgpu_bo_move_notify(bo, evict, new_mem);
if (adev->mman.buffer_funcs_enabled)
r = amdgpu_move_blit(bo, evict, new_mem, old_mem);
else
r = -ENODEV;
if (r) {
/* Check that all memory is CPU accessible */
if (!amdgpu_res_copyable(adev, old_mem) ||
@ -560,11 +565,10 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict,
return r;
}
trace_amdgpu_bo_move(abo, new_mem->mem_type, old_mem->mem_type);
out:
/* update statistics */
/* update statistics after the move */
if (evict)
atomic64_inc(&adev->num_evictions);
atomic64_add(bo->base.size, &adev->num_bytes_moved);
amdgpu_bo_move_notify(bo, evict);
return 0;
}
@ -1605,7 +1609,7 @@ static int amdgpu_ttm_access_memory(struct ttm_buffer_object *bo,
static void
amdgpu_bo_delete_mem_notify(struct ttm_buffer_object *bo)
{
amdgpu_bo_move_notify(bo, false);
amdgpu_bo_move_notify(bo, false, NULL);
}
static struct ttm_device_funcs amdgpu_bo_driver = {

View file

@ -61,6 +61,11 @@ void aqua_vanjaram_doorbell_index_init(struct amdgpu_device *adev)
adev->doorbell_index.max_assignment = AMDGPU_DOORBELL_LAYOUT1_MAX_ASSIGNMENT << 1;
}
static bool aqua_vanjaram_xcp_vcn_shared(struct amdgpu_device *adev)
{
return (adev->xcp_mgr->num_xcps > adev->vcn.num_vcn_inst);
}
static void aqua_vanjaram_set_xcp_id(struct amdgpu_device *adev,
uint32_t inst_idx, struct amdgpu_ring *ring)
{
@ -86,7 +91,7 @@ static void aqua_vanjaram_set_xcp_id(struct amdgpu_device *adev,
case AMDGPU_RING_TYPE_VCN_ENC:
case AMDGPU_RING_TYPE_VCN_JPEG:
ip_blk = AMDGPU_XCP_VCN;
if (adev->xcp_mgr->mode == AMDGPU_CPX_PARTITION_MODE)
if (aqua_vanjaram_xcp_vcn_shared(adev))
inst_mask = 1 << (inst_idx * 2);
break;
default:
@ -139,10 +144,12 @@ static int aqua_vanjaram_xcp_sched_list_update(
aqua_vanjaram_xcp_gpu_sched_update(adev, ring, ring->xcp_id);
/* VCN is shared by two partitions under CPX MODE */
/* VCN may be shared by two partitions under CPX MODE in certain
* configs.
*/
if ((ring->funcs->type == AMDGPU_RING_TYPE_VCN_ENC ||
ring->funcs->type == AMDGPU_RING_TYPE_VCN_JPEG) &&
adev->xcp_mgr->mode == AMDGPU_CPX_PARTITION_MODE)
ring->funcs->type == AMDGPU_RING_TYPE_VCN_JPEG) &&
aqua_vanjaram_xcp_vcn_shared(adev))
aqua_vanjaram_xcp_gpu_sched_update(adev, ring, ring->xcp_id + 1);
}

View file

@ -1613,19 +1613,9 @@ static int sdma_v4_4_2_set_ecc_irq_state(struct amdgpu_device *adev,
u32 sdma_cntl;
sdma_cntl = RREG32_SDMA(type, regSDMA_CNTL);
switch (state) {
case AMDGPU_IRQ_STATE_DISABLE:
sdma_cntl = REG_SET_FIELD(sdma_cntl, SDMA_CNTL,
DRAM_ECC_INT_ENABLE, 0);
WREG32_SDMA(type, regSDMA_CNTL, sdma_cntl);
break;
/* sdma ecc interrupt is enabled by default
* driver doesn't need to do anything to
* enable the interrupt */
case AMDGPU_IRQ_STATE_ENABLE:
default:
break;
}
sdma_cntl = REG_SET_FIELD(sdma_cntl, SDMA_CNTL, DRAM_ECC_INT_ENABLE,
state == AMDGPU_IRQ_STATE_ENABLE ? 1 : 0);
WREG32_SDMA(type, regSDMA_CNTL, sdma_cntl);
return 0;
}

View file

@ -1138,7 +1138,7 @@ static int kfd_ioctl_alloc_memory_of_gpu(struct file *filep,
goto err_unlock;
}
offset = dev->adev->rmmio_remap.bus_addr;
if (!offset) {
if (!offset || (PAGE_SIZE > 4096)) {
err = -ENOMEM;
goto err_unlock;
}
@ -1516,7 +1516,7 @@ static int kfd_ioctl_get_dmabuf_info(struct file *filep,
/* Find a KFD GPU device that supports the get_dmabuf_info query */
for (i = 0; kfd_topology_enum_kfd_devices(i, &dev) == 0; i++)
if (dev)
if (dev && !kfd_devcgroup_check_permission(dev))
break;
if (!dev)
return -EINVAL;
@ -1538,7 +1538,7 @@ static int kfd_ioctl_get_dmabuf_info(struct file *filep,
if (xcp_id >= 0)
args->gpu_id = dmabuf_adev->kfd.dev->nodes[xcp_id]->id;
else
args->gpu_id = dmabuf_adev->kfd.dev->nodes[0]->id;
args->gpu_id = dev->id;
args->flags = flags;
/* Copy metadata buffer to user mode */
@ -2307,7 +2307,7 @@ static int criu_restore_memory_of_gpu(struct kfd_process_device *pdd,
return -EINVAL;
}
offset = pdd->dev->adev->rmmio_remap.bus_addr;
if (!offset) {
if (!offset || (PAGE_SIZE > 4096)) {
pr_err("amdgpu_amdkfd_get_mmio_remap_phys_addr failed\n");
return -ENOMEM;
}
@ -3348,6 +3348,9 @@ static int kfd_mmio_mmap(struct kfd_node *dev, struct kfd_process *process,
if (vma->vm_end - vma->vm_start != PAGE_SIZE)
return -EINVAL;
if (PAGE_SIZE > 4096)
return -EINVAL;
address = dev->adev->rmmio_remap.bus_addr;
vm_flags_set(vma, VM_IO | VM_DONTCOPY | VM_DONTEXPAND | VM_NORESERVE |

View file

@ -935,7 +935,6 @@ void kgd2kfd_suspend(struct kfd_dev *kfd, bool run_pm)
{
struct kfd_node *node;
int i;
int count;
if (!kfd->init_complete)
return;
@ -943,12 +942,10 @@ void kgd2kfd_suspend(struct kfd_dev *kfd, bool run_pm)
/* for runtime suspend, skip locking kfd */
if (!run_pm) {
mutex_lock(&kfd_processes_mutex);
count = ++kfd_locked;
mutex_unlock(&kfd_processes_mutex);
/* For first KFD device suspend all the KFD processes */
if (count == 1)
if (++kfd_locked == 1)
kfd_suspend_all_processes();
mutex_unlock(&kfd_processes_mutex);
}
for (i = 0; i < kfd->num_nodes; i++) {
@ -959,7 +956,7 @@ void kgd2kfd_suspend(struct kfd_dev *kfd, bool run_pm)
int kgd2kfd_resume(struct kfd_dev *kfd, bool run_pm)
{
int ret, count, i;
int ret, i;
if (!kfd->init_complete)
return 0;
@ -973,12 +970,10 @@ int kgd2kfd_resume(struct kfd_dev *kfd, bool run_pm)
/* for runtime resume, skip unlocking kfd */
if (!run_pm) {
mutex_lock(&kfd_processes_mutex);
count = --kfd_locked;
mutex_unlock(&kfd_processes_mutex);
WARN_ONCE(count < 0, "KFD suspend / resume ref. error");
if (count == 0)
if (--kfd_locked == 0)
ret = kfd_resume_all_processes();
WARN_ONCE(kfd_locked < 0, "KFD suspend / resume ref. error");
mutex_unlock(&kfd_processes_mutex);
}
return ret;

View file

@ -336,7 +336,8 @@ static void event_interrupt_wq_v10(struct kfd_node *dev,
break;
}
kfd_signal_event_interrupt(pasid, context_id0 & 0x7fffff, 23);
} else if (source_id == SOC15_INTSRC_CP_BAD_OPCODE) {
} else if (source_id == SOC15_INTSRC_CP_BAD_OPCODE &&
KFD_DBG_EC_TYPE_IS_PACKET(KFD_DEBUG_CP_BAD_OP_ECODE(context_id0))) {
kfd_set_dbg_ev_from_interrupt(dev, pasid,
KFD_DEBUG_DOORBELL_ID(context_id0),
KFD_EC_MASK(KFD_DEBUG_CP_BAD_OP_ECODE(context_id0)),

View file

@ -325,7 +325,8 @@ static void event_interrupt_wq_v11(struct kfd_node *dev,
/* CP */
if (source_id == SOC15_INTSRC_CP_END_OF_PIPE)
kfd_signal_event_interrupt(pasid, context_id0, 32);
else if (source_id == SOC15_INTSRC_CP_BAD_OPCODE)
else if (source_id == SOC15_INTSRC_CP_BAD_OPCODE &&
KFD_DBG_EC_TYPE_IS_PACKET(KFD_CTXID0_CP_BAD_OP_ECODE(context_id0)))
kfd_set_dbg_ev_from_interrupt(dev, pasid,
KFD_CTXID0_DOORBELL_ID(context_id0),
KFD_EC_MASK(KFD_CTXID0_CP_BAD_OP_ECODE(context_id0)),

View file

@ -385,7 +385,8 @@ static void event_interrupt_wq_v9(struct kfd_node *dev,
break;
}
kfd_signal_event_interrupt(pasid, sq_int_data, 24);
} else if (source_id == SOC15_INTSRC_CP_BAD_OPCODE) {
} else if (source_id == SOC15_INTSRC_CP_BAD_OPCODE &&
KFD_DBG_EC_TYPE_IS_PACKET(KFD_DEBUG_CP_BAD_OP_ECODE(context_id0))) {
kfd_set_dbg_ev_from_interrupt(dev, pasid,
KFD_DEBUG_DOORBELL_ID(context_id0),
KFD_EC_MASK(KFD_DEBUG_CP_BAD_OP_ECODE(context_id0)),

View file

@ -2978,6 +2978,10 @@ static int dm_resume(void *handle)
/* Do mst topology probing after resuming cached state*/
drm_connector_list_iter_begin(ddev, &iter);
drm_for_each_connector_iter(connector, &iter) {
if (connector->connector_type == DRM_MODE_CONNECTOR_WRITEBACK)
continue;
aconnector = to_amdgpu_dm_connector(connector);
if (aconnector->dc_link->type != dc_connection_mst_branch ||
aconnector->mst_root)
@ -5760,6 +5764,9 @@ get_highest_refresh_rate_mode(struct amdgpu_dm_connector *aconnector,
&aconnector->base.probed_modes :
&aconnector->base.modes;
if (aconnector->base.connector_type == DRM_MODE_CONNECTOR_WRITEBACK)
return NULL;
if (aconnector->freesync_vid_base.clock != 0)
return &aconnector->freesync_vid_base;
@ -8451,6 +8458,9 @@ static void amdgpu_dm_commit_audio(struct drm_device *dev,
continue;
notify:
if (connector->connector_type == DRM_MODE_CONNECTOR_WRITEBACK)
continue;
aconnector = to_amdgpu_dm_connector(connector);
mutex_lock(&adev->dm.audio_lock);

View file

@ -1465,7 +1465,9 @@ static ssize_t dp_dsc_clock_en_read(struct file *f, char __user *buf,
for (i = 0; i < MAX_PIPES; i++) {
pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
if (pipe_ctx->stream &&
pipe_ctx->stream->link == aconnector->dc_link)
pipe_ctx->stream->link == aconnector->dc_link &&
pipe_ctx->stream->sink &&
pipe_ctx->stream->sink == aconnector->dc_sink)
break;
}
@ -1566,7 +1568,9 @@ static ssize_t dp_dsc_clock_en_write(struct file *f, const char __user *buf,
for (i = 0; i < MAX_PIPES; i++) {
pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
if (pipe_ctx->stream &&
pipe_ctx->stream->link == aconnector->dc_link)
pipe_ctx->stream->link == aconnector->dc_link &&
pipe_ctx->stream->sink &&
pipe_ctx->stream->sink == aconnector->dc_sink)
break;
}
@ -1651,7 +1655,9 @@ static ssize_t dp_dsc_slice_width_read(struct file *f, char __user *buf,
for (i = 0; i < MAX_PIPES; i++) {
pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
if (pipe_ctx->stream &&
pipe_ctx->stream->link == aconnector->dc_link)
pipe_ctx->stream->link == aconnector->dc_link &&
pipe_ctx->stream->sink &&
pipe_ctx->stream->sink == aconnector->dc_sink)
break;
}
@ -1750,7 +1756,9 @@ static ssize_t dp_dsc_slice_width_write(struct file *f, const char __user *buf,
for (i = 0; i < MAX_PIPES; i++) {
pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
if (pipe_ctx->stream &&
pipe_ctx->stream->link == aconnector->dc_link)
pipe_ctx->stream->link == aconnector->dc_link &&
pipe_ctx->stream->sink &&
pipe_ctx->stream->sink == aconnector->dc_sink)
break;
}
@ -1835,7 +1843,9 @@ static ssize_t dp_dsc_slice_height_read(struct file *f, char __user *buf,
for (i = 0; i < MAX_PIPES; i++) {
pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
if (pipe_ctx->stream &&
pipe_ctx->stream->link == aconnector->dc_link)
pipe_ctx->stream->link == aconnector->dc_link &&
pipe_ctx->stream->sink &&
pipe_ctx->stream->sink == aconnector->dc_sink)
break;
}
@ -1934,7 +1944,9 @@ static ssize_t dp_dsc_slice_height_write(struct file *f, const char __user *buf,
for (i = 0; i < MAX_PIPES; i++) {
pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
if (pipe_ctx->stream &&
pipe_ctx->stream->link == aconnector->dc_link)
pipe_ctx->stream->link == aconnector->dc_link &&
pipe_ctx->stream->sink &&
pipe_ctx->stream->sink == aconnector->dc_sink)
break;
}
@ -2015,7 +2027,9 @@ static ssize_t dp_dsc_bits_per_pixel_read(struct file *f, char __user *buf,
for (i = 0; i < MAX_PIPES; i++) {
pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
if (pipe_ctx->stream &&
pipe_ctx->stream->link == aconnector->dc_link)
pipe_ctx->stream->link == aconnector->dc_link &&
pipe_ctx->stream->sink &&
pipe_ctx->stream->sink == aconnector->dc_sink)
break;
}
@ -2111,7 +2125,9 @@ static ssize_t dp_dsc_bits_per_pixel_write(struct file *f, const char __user *bu
for (i = 0; i < MAX_PIPES; i++) {
pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
if (pipe_ctx->stream &&
pipe_ctx->stream->link == aconnector->dc_link)
pipe_ctx->stream->link == aconnector->dc_link &&
pipe_ctx->stream->sink &&
pipe_ctx->stream->sink == aconnector->dc_sink)
break;
}
@ -2190,7 +2206,9 @@ static ssize_t dp_dsc_pic_width_read(struct file *f, char __user *buf,
for (i = 0; i < MAX_PIPES; i++) {
pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
if (pipe_ctx->stream &&
pipe_ctx->stream->link == aconnector->dc_link)
pipe_ctx->stream->link == aconnector->dc_link &&
pipe_ctx->stream->sink &&
pipe_ctx->stream->sink == aconnector->dc_sink)
break;
}
@ -2246,7 +2264,9 @@ static ssize_t dp_dsc_pic_height_read(struct file *f, char __user *buf,
for (i = 0; i < MAX_PIPES; i++) {
pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
if (pipe_ctx->stream &&
pipe_ctx->stream->link == aconnector->dc_link)
pipe_ctx->stream->link == aconnector->dc_link &&
pipe_ctx->stream->sink &&
pipe_ctx->stream->sink == aconnector->dc_sink)
break;
}
@ -2317,7 +2337,9 @@ static ssize_t dp_dsc_chunk_size_read(struct file *f, char __user *buf,
for (i = 0; i < MAX_PIPES; i++) {
pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
if (pipe_ctx->stream &&
pipe_ctx->stream->link == aconnector->dc_link)
pipe_ctx->stream->link == aconnector->dc_link &&
pipe_ctx->stream->sink &&
pipe_ctx->stream->sink == aconnector->dc_sink)
break;
}
@ -2388,7 +2410,9 @@ static ssize_t dp_dsc_slice_bpg_offset_read(struct file *f, char __user *buf,
for (i = 0; i < MAX_PIPES; i++) {
pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
if (pipe_ctx->stream &&
pipe_ctx->stream->link == aconnector->dc_link)
pipe_ctx->stream->link == aconnector->dc_link &&
pipe_ctx->stream->sink &&
pipe_ctx->stream->sink == aconnector->dc_sink)
break;
}

View file

@ -2961,6 +2961,7 @@ static enum bp_result construct_integrated_info(
result = get_integrated_info_v2_1(bp, info);
break;
case 2:
case 3:
result = get_integrated_info_v2_2(bp, info);
break;
default:

View file

@ -395,6 +395,12 @@ void dcn31_hpo_dp_link_enc_set_throttled_vcp_size(
x),
25));
// If y rounds up to integer, carry it over to x.
if (y >> 25) {
x += 1;
y = 0;
}
switch (stream_encoder_inst) {
case 0:
REG_SET_2(DP_DPHY_SYM32_VC_RATE_CNTL0, 0,

View file

@ -226,7 +226,7 @@ static int smu_v13_0_4_system_features_control(struct smu_context *smu, bool en)
struct amdgpu_device *adev = smu->adev;
int ret = 0;
if (!en && !adev->in_s0ix) {
if (!en && adev->in_s4) {
/* Adds a GFX reset as workaround just before sending the
* MP1_UNLOAD message to prevent GC/RLC/PMFW from entering
* an invalid state.

View file

@ -2933,7 +2933,7 @@ int drm_mode_getconnector(struct drm_device *dev, void *data,
dev->mode_config.max_width,
dev->mode_config.max_height);
else
drm_dbg_kms(dev, "User-space requested a forced probe on [CONNECTOR:%d:%s] but is not the DRM master, demoting to read-only probe",
drm_dbg_kms(dev, "User-space requested a forced probe on [CONNECTOR:%d:%s] but is not the DRM master, demoting to read-only probe\n",
connector->base.id, connector->name);
}

View file

@ -75,19 +75,6 @@ struct intel_audio_funcs {
struct intel_crtc_state *crtc_state);
};
/* DP N/M table */
#define LC_810M 810000
#define LC_540M 540000
#define LC_270M 270000
#define LC_162M 162000
struct dp_aud_n_m {
int sample_rate;
int clock;
u16 m;
u16 n;
};
struct hdmi_aud_ncts {
int sample_rate;
int clock;
@ -95,60 +82,6 @@ struct hdmi_aud_ncts {
int cts;
};
/* Values according to DP 1.4 Table 2-104 */
static const struct dp_aud_n_m dp_aud_n_m[] = {
{ 32000, LC_162M, 1024, 10125 },
{ 44100, LC_162M, 784, 5625 },
{ 48000, LC_162M, 512, 3375 },
{ 64000, LC_162M, 2048, 10125 },
{ 88200, LC_162M, 1568, 5625 },
{ 96000, LC_162M, 1024, 3375 },
{ 128000, LC_162M, 4096, 10125 },
{ 176400, LC_162M, 3136, 5625 },
{ 192000, LC_162M, 2048, 3375 },
{ 32000, LC_270M, 1024, 16875 },
{ 44100, LC_270M, 784, 9375 },
{ 48000, LC_270M, 512, 5625 },
{ 64000, LC_270M, 2048, 16875 },
{ 88200, LC_270M, 1568, 9375 },
{ 96000, LC_270M, 1024, 5625 },
{ 128000, LC_270M, 4096, 16875 },
{ 176400, LC_270M, 3136, 9375 },
{ 192000, LC_270M, 2048, 5625 },
{ 32000, LC_540M, 1024, 33750 },
{ 44100, LC_540M, 784, 18750 },
{ 48000, LC_540M, 512, 11250 },
{ 64000, LC_540M, 2048, 33750 },
{ 88200, LC_540M, 1568, 18750 },
{ 96000, LC_540M, 1024, 11250 },
{ 128000, LC_540M, 4096, 33750 },
{ 176400, LC_540M, 3136, 18750 },
{ 192000, LC_540M, 2048, 11250 },
{ 32000, LC_810M, 1024, 50625 },
{ 44100, LC_810M, 784, 28125 },
{ 48000, LC_810M, 512, 16875 },
{ 64000, LC_810M, 2048, 50625 },
{ 88200, LC_810M, 1568, 28125 },
{ 96000, LC_810M, 1024, 16875 },
{ 128000, LC_810M, 4096, 50625 },
{ 176400, LC_810M, 3136, 28125 },
{ 192000, LC_810M, 2048, 16875 },
};
static const struct dp_aud_n_m *
audio_config_dp_get_n_m(const struct intel_crtc_state *crtc_state, int rate)
{
int i;
for (i = 0; i < ARRAY_SIZE(dp_aud_n_m); i++) {
if (rate == dp_aud_n_m[i].sample_rate &&
crtc_state->port_clock == dp_aud_n_m[i].clock)
return &dp_aud_n_m[i];
}
return NULL;
}
static const struct {
int clock;
u32 config;
@ -386,47 +319,17 @@ hsw_dp_audio_config_update(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state)
{
struct drm_i915_private *i915 = to_i915(encoder->base.dev);
struct i915_audio_component *acomp = i915->display.audio.component;
enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
enum port port = encoder->port;
const struct dp_aud_n_m *nm;
int rate;
u32 tmp;
rate = acomp ? acomp->aud_sample_rate[port] : 0;
nm = audio_config_dp_get_n_m(crtc_state, rate);
if (nm)
drm_dbg_kms(&i915->drm, "using Maud %u, Naud %u\n", nm->m,
nm->n);
else
drm_dbg_kms(&i915->drm, "using automatic Maud, Naud\n");
/* Enable time stamps. Let HW calculate Maud/Naud values */
intel_de_rmw(i915, HSW_AUD_CFG(cpu_transcoder),
AUD_CONFIG_N_VALUE_INDEX |
AUD_CONFIG_PIXEL_CLOCK_HDMI_MASK |
AUD_CONFIG_UPPER_N_MASK |
AUD_CONFIG_LOWER_N_MASK |
AUD_CONFIG_N_PROG_ENABLE,
AUD_CONFIG_N_VALUE_INDEX);
tmp = intel_de_read(i915, HSW_AUD_CFG(cpu_transcoder));
tmp &= ~AUD_CONFIG_N_VALUE_INDEX;
tmp &= ~AUD_CONFIG_PIXEL_CLOCK_HDMI_MASK;
tmp &= ~AUD_CONFIG_N_PROG_ENABLE;
tmp |= AUD_CONFIG_N_VALUE_INDEX;
if (nm) {
tmp &= ~AUD_CONFIG_N_MASK;
tmp |= AUD_CONFIG_N(nm->n);
tmp |= AUD_CONFIG_N_PROG_ENABLE;
}
intel_de_write(i915, HSW_AUD_CFG(cpu_transcoder), tmp);
tmp = intel_de_read(i915, HSW_AUD_M_CTS_ENABLE(cpu_transcoder));
tmp &= ~AUD_CONFIG_M_MASK;
tmp &= ~AUD_M_CTS_M_VALUE_INDEX;
tmp &= ~AUD_M_CTS_M_PROG_ENABLE;
if (nm) {
tmp |= nm->m;
tmp |= AUD_M_CTS_M_VALUE_INDEX;
tmp |= AUD_M_CTS_M_PROG_ENABLE;
}
intel_de_write(i915, HSW_AUD_M_CTS_ENABLE(cpu_transcoder), tmp);
}
static void

View file

@ -1035,22 +1035,11 @@ parse_lfp_backlight(struct drm_i915_private *i915,
panel->vbt.backlight.type = INTEL_BACKLIGHT_DISPLAY_DDI;
panel->vbt.backlight.controller = 0;
if (i915->display.vbt.version >= 191) {
size_t exp_size;
const struct lfp_backlight_control_method *method;
if (i915->display.vbt.version >= 236)
exp_size = sizeof(struct bdb_lfp_backlight_data);
else if (i915->display.vbt.version >= 234)
exp_size = EXP_BDB_LFP_BL_DATA_SIZE_REV_234;
else
exp_size = EXP_BDB_LFP_BL_DATA_SIZE_REV_191;
if (get_blocksize(backlight_data) >= exp_size) {
const struct lfp_backlight_control_method *method;
method = &backlight_data->backlight_control[panel_type];
panel->vbt.backlight.type = method->type;
panel->vbt.backlight.controller = method->controller;
}
method = &backlight_data->backlight_control[panel_type];
panel->vbt.backlight.type = method->type;
panel->vbt.backlight.controller = method->controller;
}
panel->vbt.backlight.pwm_freq_hz = entry->pwm_freq_hz;

View file

@ -897,11 +897,6 @@ struct lfp_brightness_level {
u16 reserved;
} __packed;
#define EXP_BDB_LFP_BL_DATA_SIZE_REV_191 \
offsetof(struct bdb_lfp_backlight_data, brightness_level)
#define EXP_BDB_LFP_BL_DATA_SIZE_REV_234 \
offsetof(struct bdb_lfp_backlight_data, brightness_precision_bits)
struct bdb_lfp_backlight_data {
u8 entry_size;
struct lfp_backlight_data_entry data[16];

View file

@ -8,14 +8,14 @@
#include "intel_gt_ccs_mode.h"
#include "intel_gt_regs.h"
void intel_gt_apply_ccs_mode(struct intel_gt *gt)
unsigned int intel_gt_apply_ccs_mode(struct intel_gt *gt)
{
int cslice;
u32 mode = 0;
int first_ccs = __ffs(CCS_MASK(gt));
if (!IS_DG2(gt->i915))
return;
return 0;
/* Build the value for the fixed CCS load balancing */
for (cslice = 0; cslice < I915_MAX_CCS; cslice++) {
@ -35,5 +35,5 @@ void intel_gt_apply_ccs_mode(struct intel_gt *gt)
XEHP_CCS_MODE_CSLICE_MASK);
}
intel_uncore_write(gt->uncore, XEHP_CCS_MODE, mode);
return mode;
}

View file

@ -8,6 +8,6 @@
struct intel_gt;
void intel_gt_apply_ccs_mode(struct intel_gt *gt);
unsigned int intel_gt_apply_ccs_mode(struct intel_gt *gt);
#endif /* __INTEL_GT_CCS_MODE_H__ */

View file

@ -2828,6 +2828,7 @@ add_render_compute_tuning_settings(struct intel_gt *gt,
static void ccs_engine_wa_mode(struct intel_engine_cs *engine, struct i915_wa_list *wal)
{
struct intel_gt *gt = engine->gt;
u32 mode;
if (!IS_DG2(gt->i915))
return;
@ -2844,7 +2845,8 @@ static void ccs_engine_wa_mode(struct intel_engine_cs *engine, struct i915_wa_li
* After having disabled automatic load balancing we need to
* assign all slices to a single CCS. We will call it CCS mode 1
*/
intel_gt_apply_ccs_mode(gt);
mode = intel_gt_apply_ccs_mode(gt);
wa_masked_en(wal, XEHP_CCS_MODE, mode);
}
/*

View file

@ -24,6 +24,7 @@
#define noinline __attribute__((__noinline__))
#define noinline_for_stack __attribute__((__noinline__))
#define fallthrough do {} while (0)
#define __counted_by(x)
#define __PASTE(x,y) __CONCAT(x,y)

View file

@ -424,7 +424,7 @@ typedef struct _ATOM_PPLIB_SUMO_CLOCK_INFO{
typedef struct _ATOM_PPLIB_STATE_V2
{
//number of valid dpm levels in this state; Driver uses it to calculate the whole
//size of the state: sizeof(ATOM_PPLIB_STATE_V2) + (ucNumDPMLevels - 1) * sizeof(UCHAR)
//size of the state: struct_size(ATOM_PPLIB_STATE_V2, clockInfoIndex, ucNumDPMLevels)
UCHAR ucNumDPMLevels;
//a index to the array of nonClockInfos
@ -432,14 +432,14 @@ typedef struct _ATOM_PPLIB_STATE_V2
/**
* Driver will read the first ucNumDPMLevels in this array
*/
UCHAR clockInfoIndex[1];
UCHAR clockInfoIndex[] __counted_by(ucNumDPMLevels);
} ATOM_PPLIB_STATE_V2;
typedef struct _StateArray{
//how many states we have
UCHAR ucNumEntries;
ATOM_PPLIB_STATE_V2 states[1];
ATOM_PPLIB_STATE_V2 states[] __counted_by(ucNumEntries);
}StateArray;
@ -450,7 +450,7 @@ typedef struct _ClockInfoArray{
//sizeof(ATOM_PPLIB_CLOCK_INFO)
UCHAR ucEntrySize;
UCHAR clockInfo[1];
UCHAR clockInfo[] __counted_by(ucNumEntries);
}ClockInfoArray;
typedef struct _NonClockInfoArray{
@ -460,7 +460,7 @@ typedef struct _NonClockInfoArray{
//sizeof(ATOM_PPLIB_NONCLOCK_INFO)
UCHAR ucEntrySize;
ATOM_PPLIB_NONCLOCK_INFO nonClockInfo[1];
ATOM_PPLIB_NONCLOCK_INFO nonClockInfo[] __counted_by(ucNumEntries);
}NonClockInfoArray;
typedef struct _ATOM_PPLIB_Clock_Voltage_Dependency_Record

View file

@ -92,7 +92,7 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc)
*/
if (bdev->pool.use_dma_alloc && cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT)) {
page_flags |= TTM_TT_FLAG_DECRYPTED;
drm_info(ddev, "TT memory decryption enabled.");
drm_info_once(ddev, "TT memory decryption enabled.");
}
bo->ttm = bdev->funcs->ttm_tt_create(bo, page_flags);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: if_igc.c,v 1.23 2024/05/07 18:35:23 jan Exp $ */
/* $OpenBSD: if_igc.c,v 1.24 2024/05/21 11:19:39 bluhm Exp $ */
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
@ -107,21 +107,21 @@ void igc_setup_interface(struct igc_softc *);
void igc_init(void *);
void igc_start(struct ifqueue *);
int igc_txeof(struct tx_ring *);
int igc_txeof(struct igc_txring *);
void igc_stop(struct igc_softc *);
int igc_ioctl(struct ifnet *, u_long, caddr_t);
int igc_rxrinfo(struct igc_softc *, struct if_rxrinfo *);
int igc_rxfill(struct rx_ring *);
int igc_rxfill(struct igc_rxring *);
void igc_rxrefill(void *);
int igc_rxeof(struct rx_ring *);
int igc_rxeof(struct igc_rxring *);
void igc_rx_checksum(uint32_t, struct mbuf *, uint32_t);
void igc_watchdog(struct ifnet *);
void igc_media_status(struct ifnet *, struct ifmediareq *);
int igc_media_change(struct ifnet *);
void igc_iff(struct igc_softc *);
void igc_update_link_status(struct igc_softc *);
int igc_get_buf(struct rx_ring *, int);
int igc_tx_ctx_setup(struct tx_ring *, struct mbuf *, int, uint32_t *,
int igc_get_buf(struct igc_rxring *, int);
int igc_tx_ctx_setup(struct igc_txring *, struct mbuf *, int, uint32_t *,
uint32_t *);
void igc_configure_queues(struct igc_softc *);
@ -132,18 +132,18 @@ void igc_disable_intr(struct igc_softc *);
int igc_intr_link(void *);
int igc_intr_queue(void *);
int igc_allocate_transmit_buffers(struct tx_ring *);
int igc_allocate_transmit_buffers(struct igc_txring *);
int igc_setup_transmit_structures(struct igc_softc *);
int igc_setup_transmit_ring(struct tx_ring *);
int igc_setup_transmit_ring(struct igc_txring *);
void igc_initialize_transmit_unit(struct igc_softc *);
void igc_free_transmit_structures(struct igc_softc *);
void igc_free_transmit_buffers(struct tx_ring *);
int igc_allocate_receive_buffers(struct rx_ring *);
void igc_free_transmit_buffers(struct igc_txring *);
int igc_allocate_receive_buffers(struct igc_rxring *);
int igc_setup_receive_structures(struct igc_softc *);
int igc_setup_receive_ring(struct rx_ring *);
int igc_setup_receive_ring(struct igc_rxring *);
void igc_initialize_receive_unit(struct igc_softc *);
void igc_free_receive_structures(struct igc_softc *);
void igc_free_receive_buffers(struct rx_ring *);
void igc_free_receive_buffers(struct igc_rxring *);
void igc_initialize_rss_mapping(struct igc_softc *);
void igc_get_hw_control(struct igc_softc *);
@ -374,8 +374,8 @@ int
igc_allocate_queues(struct igc_softc *sc)
{
struct igc_queue *iq;
struct tx_ring *txr;
struct rx_ring *rxr;
struct igc_txring *txr;
struct igc_rxring *rxr;
int i, rsize, rxconf, tsize, txconf;
/* Allocate the top level queue structs. */
@ -387,7 +387,7 @@ igc_allocate_queues(struct igc_softc *sc)
}
/* Allocate the TX ring. */
sc->tx_rings = mallocarray(sc->sc_nqueues, sizeof(struct tx_ring),
sc->tx_rings = mallocarray(sc->sc_nqueues, sizeof(struct igc_txring),
M_DEVBUF, M_NOWAIT | M_ZERO);
if (sc->tx_rings == NULL) {
printf("%s: unable to allocate TX ring\n", DEVNAME(sc));
@ -395,7 +395,7 @@ igc_allocate_queues(struct igc_softc *sc)
}
/* Allocate the RX ring. */
sc->rx_rings = mallocarray(sc->sc_nqueues, sizeof(struct rx_ring),
sc->rx_rings = mallocarray(sc->sc_nqueues, sizeof(struct igc_rxring),
M_DEVBUF, M_NOWAIT | M_ZERO);
if (sc->rx_rings == NULL) {
printf("%s: unable to allocate RX ring\n", DEVNAME(sc));
@ -456,10 +456,12 @@ err_rx_desc:
err_tx_desc:
for (txr = sc->tx_rings; txconf > 0; txr++, txconf--)
igc_dma_free(sc, &txr->txdma);
free(sc->rx_rings, M_DEVBUF, sc->sc_nqueues * sizeof(struct rx_ring));
free(sc->rx_rings, M_DEVBUF,
sc->sc_nqueues * sizeof(struct igc_rxring));
sc->rx_rings = NULL;
rx_fail:
free(sc->tx_rings, M_DEVBUF, sc->sc_nqueues * sizeof(struct tx_ring));
free(sc->tx_rings, M_DEVBUF,
sc->sc_nqueues * sizeof(struct igc_txring));
sc->tx_rings = NULL;
fail:
return ENOMEM;
@ -833,8 +835,8 @@ igc_setup_interface(struct igc_softc *sc)
for (i = 0; i < sc->sc_nqueues; i++) {
struct ifqueue *ifq = ifp->if_ifqs[i];
struct ifiqueue *ifiq = ifp->if_iqs[i];
struct tx_ring *txr = &sc->tx_rings[i];
struct rx_ring *rxr = &sc->rx_rings[i];
struct igc_txring *txr = &sc->tx_rings[i];
struct igc_rxring *rxr = &sc->rx_rings[i];
ifq->ifq_softc = txr;
txr->ifq = ifq;
@ -849,7 +851,7 @@ igc_init(void *arg)
{
struct igc_softc *sc = (struct igc_softc *)arg;
struct ifnet *ifp = &sc->sc_ac.ac_if;
struct rx_ring *rxr;
struct igc_rxring *rxr;
uint32_t ctrl = 0;
int i, s;
@ -959,7 +961,7 @@ igc_start(struct ifqueue *ifq)
{
struct ifnet *ifp = ifq->ifq_if;
struct igc_softc *sc = ifp->if_softc;
struct tx_ring *txr = ifq->ifq_softc;
struct igc_txring *txr = ifq->ifq_softc;
union igc_adv_tx_desc *txdesc;
struct igc_tx_buf *txbuf;
bus_dmamap_t map;
@ -1067,7 +1069,7 @@ igc_start(struct ifqueue *ifq)
}
int
igc_txeof(struct tx_ring *txr)
igc_txeof(struct igc_txring *txr)
{
struct igc_softc *sc = txr->sc;
struct ifqueue *ifq = txr->ifq;
@ -1223,7 +1225,7 @@ int
igc_rxrinfo(struct igc_softc *sc, struct if_rxrinfo *ifri)
{
struct if_rxring_info *ifr;
struct rx_ring *rxr;
struct igc_rxring *rxr;
int error, i, n = 0;
ifr = mallocarray(sc->sc_nqueues, sizeof(*ifr), M_DEVBUF,
@ -1244,7 +1246,7 @@ igc_rxrinfo(struct igc_softc *sc, struct if_rxrinfo *ifri)
}
int
igc_rxfill(struct rx_ring *rxr)
igc_rxfill(struct igc_rxring *rxr)
{
struct igc_softc *sc = rxr->sc;
int i, post = 0;
@ -1277,7 +1279,7 @@ igc_rxfill(struct rx_ring *rxr)
void
igc_rxrefill(void *xrxr)
{
struct rx_ring *rxr = xrxr;
struct igc_rxring *rxr = xrxr;
struct igc_softc *sc = rxr->sc;
if (igc_rxfill(rxr)) {
@ -1296,7 +1298,7 @@ igc_rxrefill(void *xrxr)
*
*********************************************************************/
int
igc_rxeof(struct rx_ring *rxr)
igc_rxeof(struct igc_rxring *rxr)
{
struct igc_softc *sc = rxr->sc;
struct ifnet *ifp = &sc->sc_ac.ac_if;
@ -1657,7 +1659,7 @@ igc_update_link_status(struct igc_softc *sc)
*
**********************************************************************/
int
igc_get_buf(struct rx_ring *rxr, int i)
igc_get_buf(struct igc_rxring *rxr, int i)
{
struct igc_softc *sc = rxr->sc;
struct igc_rx_buf *rxbuf;
@ -1812,8 +1814,8 @@ igc_intr_queue(void *arg)
struct igc_queue *iq = arg;
struct igc_softc *sc = iq->sc;
struct ifnet *ifp = &sc->sc_ac.ac_if;
struct rx_ring *rxr = iq->rxr;
struct tx_ring *txr = iq->txr;
struct igc_rxring *rxr = iq->rxr;
struct igc_txring *txr = iq->txr;
if (ifp->if_flags & IFF_RUNNING) {
igc_txeof(txr);
@ -1833,7 +1835,7 @@ igc_intr_queue(void *arg)
*
**********************************************************************/
int
igc_allocate_transmit_buffers(struct tx_ring *txr)
igc_allocate_transmit_buffers(struct igc_txring *txr)
{
struct igc_softc *sc = txr->sc;
struct igc_tx_buf *txbuf;
@ -1875,7 +1877,7 @@ fail:
int
igc_setup_transmit_structures(struct igc_softc *sc)
{
struct tx_ring *txr = sc->tx_rings;
struct igc_txring *txr = sc->tx_rings;
int i;
for (i = 0; i < sc->sc_nqueues; i++, txr++) {
@ -1895,7 +1897,7 @@ fail:
*
**********************************************************************/
int
igc_setup_transmit_ring(struct tx_ring *txr)
igc_setup_transmit_ring(struct igc_txring *txr)
{
struct igc_softc *sc = txr->sc;
@ -1927,7 +1929,7 @@ void
igc_initialize_transmit_unit(struct igc_softc *sc)
{
struct ifnet *ifp = &sc->sc_ac.ac_if;
struct tx_ring *txr;
struct igc_txring *txr;
struct igc_hw *hw = &sc->hw;
uint64_t bus_addr;
uint32_t tctl, txdctl = 0;
@ -1981,7 +1983,7 @@ igc_initialize_transmit_unit(struct igc_softc *sc)
void
igc_free_transmit_structures(struct igc_softc *sc)
{
struct tx_ring *txr = sc->tx_rings;
struct igc_txring *txr = sc->tx_rings;
int i;
for (i = 0; i < sc->sc_nqueues; i++, txr++)
@ -1994,7 +1996,7 @@ igc_free_transmit_structures(struct igc_softc *sc)
*
**********************************************************************/
void
igc_free_transmit_buffers(struct tx_ring *txr)
igc_free_transmit_buffers(struct igc_txring *txr)
{
struct igc_softc *sc = txr->sc;
struct igc_tx_buf *txbuf;
@ -2035,7 +2037,7 @@ igc_free_transmit_buffers(struct tx_ring *txr)
**********************************************************************/
int
igc_tx_ctx_setup(struct tx_ring *txr, struct mbuf *mp, int prod,
igc_tx_ctx_setup(struct igc_txring *txr, struct mbuf *mp, int prod,
uint32_t *cmd_type_len, uint32_t *olinfo_status)
{
struct ether_extracted ext;
@ -2140,7 +2142,7 @@ igc_tx_ctx_setup(struct tx_ring *txr, struct mbuf *mp, int prod,
*
**********************************************************************/
int
igc_allocate_receive_buffers(struct rx_ring *rxr)
igc_allocate_receive_buffers(struct igc_rxring *rxr)
{
struct igc_softc *sc = rxr->sc;
struct igc_rx_buf *rxbuf;
@ -2183,7 +2185,7 @@ fail:
int
igc_setup_receive_structures(struct igc_softc *sc)
{
struct rx_ring *rxr = sc->rx_rings;
struct igc_rxring *rxr = sc->rx_rings;
int i;
for (i = 0; i < sc->sc_nqueues; i++, rxr++) {
@ -2203,7 +2205,7 @@ fail:
*
**********************************************************************/
int
igc_setup_receive_ring(struct rx_ring *rxr)
igc_setup_receive_ring(struct igc_rxring *rxr)
{
struct igc_softc *sc = rxr->sc;
struct ifnet *ifp = &sc->sc_ac.ac_if;
@ -2238,7 +2240,7 @@ igc_setup_receive_ring(struct rx_ring *rxr)
void
igc_initialize_receive_unit(struct igc_softc *sc)
{
struct rx_ring *rxr = sc->rx_rings;
struct igc_rxring *rxr = sc->rx_rings;
struct igc_hw *hw = &sc->hw;
uint32_t rctl, rxcsum, srrctl = 0;
int i;
@ -2342,7 +2344,7 @@ igc_initialize_receive_unit(struct igc_softc *sc)
void
igc_free_receive_structures(struct igc_softc *sc)
{
struct rx_ring *rxr;
struct igc_rxring *rxr;
int i;
for (i = 0, rxr = sc->rx_rings; i < sc->sc_nqueues; i++, rxr++)
@ -2358,7 +2360,7 @@ igc_free_receive_structures(struct igc_softc *sc)
*
**********************************************************************/
void
igc_free_receive_buffers(struct rx_ring *rxr)
igc_free_receive_buffers(struct igc_rxring *rxr)
{
struct igc_softc *sc = rxr->sc;
struct igc_rx_buf *rxbuf;

View file

@ -1,4 +1,4 @@
/* $OpenBSD: if_igc.h,v 1.3 2024/05/06 04:25:52 dlg Exp $ */
/* $OpenBSD: if_igc.h,v 1.4 2024/05/21 11:19:39 bluhm Exp $ */
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
@ -250,14 +250,14 @@ struct igc_queue {
char name[16];
pci_intr_handle_t ih;
void *tag;
struct tx_ring *txr;
struct rx_ring *rxr;
struct igc_txring *txr;
struct igc_rxring *rxr;
};
/*
* The transmit ring, one per tx queue.
*/
struct tx_ring {
struct igc_txring {
struct igc_softc *sc;
struct ifqueue *ifq;
uint32_t me;
@ -273,7 +273,7 @@ struct tx_ring {
/*
* The Receive ring, one per rx queue.
*/
struct rx_ring {
struct igc_rxring {
struct igc_softc *sc;
struct ifiqueue *ifiq;
uint32_t me;
@ -316,8 +316,8 @@ struct igc_softc {
unsigned int sc_nqueues;
struct igc_queue *queues;
struct tx_ring *tx_rings;
struct rx_ring *rx_rings;
struct igc_txring *tx_rings;
struct igc_rxring *rx_rings;
/* Multicast array memory */
uint8_t *mta;

View file

@ -1,4 +1,4 @@
/* $OpenBSD: if_ix.c,v 1.214 2024/05/13 01:15:51 jsg Exp $ */
/* $OpenBSD: if_ix.c,v 1.215 2024/05/21 11:19:39 bluhm Exp $ */
/******************************************************************************
@ -131,39 +131,39 @@ void ixgbe_config_delay_values(struct ix_softc *);
void ixgbe_add_media_types(struct ix_softc *);
void ixgbe_config_link(struct ix_softc *);
int ixgbe_allocate_transmit_buffers(struct tx_ring *);
int ixgbe_allocate_transmit_buffers(struct ix_txring *);
int ixgbe_setup_transmit_structures(struct ix_softc *);
int ixgbe_setup_transmit_ring(struct tx_ring *);
int ixgbe_setup_transmit_ring(struct ix_txring *);
void ixgbe_initialize_transmit_units(struct ix_softc *);
void ixgbe_free_transmit_structures(struct ix_softc *);
void ixgbe_free_transmit_buffers(struct tx_ring *);
void ixgbe_free_transmit_buffers(struct ix_txring *);
int ixgbe_allocate_receive_buffers(struct rx_ring *);
int ixgbe_allocate_receive_buffers(struct ix_rxring *);
int ixgbe_setup_receive_structures(struct ix_softc *);
int ixgbe_setup_receive_ring(struct rx_ring *);
int ixgbe_setup_receive_ring(struct ix_rxring *);
void ixgbe_initialize_receive_units(struct ix_softc *);
void ixgbe_free_receive_structures(struct ix_softc *);
void ixgbe_free_receive_buffers(struct rx_ring *);
void ixgbe_free_receive_buffers(struct ix_rxring *);
void ixgbe_initialize_rss_mapping(struct ix_softc *);
int ixgbe_rxfill(struct rx_ring *);
int ixgbe_rxfill(struct ix_rxring *);
void ixgbe_rxrefill(void *);
int ixgbe_intr(struct ix_softc *sc);
void ixgbe_enable_intr(struct ix_softc *);
void ixgbe_disable_intr(struct ix_softc *);
int ixgbe_txeof(struct tx_ring *);
int ixgbe_rxeof(struct rx_ring *);
int ixgbe_txeof(struct ix_txring *);
int ixgbe_rxeof(struct ix_rxring *);
void ixgbe_rx_offload(uint32_t, uint16_t, struct mbuf *);
void ixgbe_iff(struct ix_softc *);
void ixgbe_map_queue_statistics(struct ix_softc *);
void ixgbe_update_link_status(struct ix_softc *);
int ixgbe_get_buf(struct rx_ring *, int);
int ixgbe_encap(struct tx_ring *, struct mbuf *);
int ixgbe_get_buf(struct ix_rxring *, int);
int ixgbe_encap(struct ix_txring *, struct mbuf *);
int ixgbe_dma_malloc(struct ix_softc *, bus_size_t,
struct ixgbe_dma_alloc *, int);
void ixgbe_dma_free(struct ix_softc *, struct ixgbe_dma_alloc *);
static int
ixgbe_tx_ctx_setup(struct tx_ring *, struct mbuf *, uint32_t *,
ixgbe_tx_ctx_setup(struct ix_txring *, struct mbuf *, uint32_t *,
uint32_t *);
void ixgbe_set_ivar(struct ix_softc *, uint8_t, uint8_t, int8_t);
void ixgbe_configure_ivars(struct ix_softc *);
@ -188,8 +188,8 @@ int ixgbe_queue_intr(void *);
#if NKSTAT > 0
static void ix_kstats(struct ix_softc *);
static void ix_rxq_kstats(struct ix_softc *, struct rx_ring *);
static void ix_txq_kstats(struct ix_softc *, struct tx_ring *);
static void ix_rxq_kstats(struct ix_softc *, struct ix_rxring *);
static void ix_txq_kstats(struct ix_softc *, struct ix_txring *);
static void ix_kstats_tick(void *);
#endif
@ -451,7 +451,7 @@ ixgbe_start(struct ifqueue *ifq)
{
struct ifnet *ifp = ifq->ifq_if;
struct ix_softc *sc = ifp->if_softc;
struct tx_ring *txr = ifq->ifq_softc;
struct ix_txring *txr = ifq->ifq_softc;
struct mbuf *m_head;
unsigned int head, free, used;
int post = 0;
@ -639,7 +639,7 @@ int
ixgbe_rxrinfo(struct ix_softc *sc, struct if_rxrinfo *ifri)
{
struct if_rxring_info *ifr, ifr1;
struct rx_ring *rxr;
struct ix_rxring *rxr;
int error, i;
u_int n = 0;
@ -673,7 +673,7 @@ void
ixgbe_watchdog(struct ifnet * ifp)
{
struct ix_softc *sc = (struct ix_softc *)ifp->if_softc;
struct tx_ring *txr = sc->tx_rings;
struct ix_txring *txr = sc->tx_rings;
struct ixgbe_hw *hw = &sc->hw;
int tx_hang = FALSE;
int i;
@ -735,7 +735,7 @@ ixgbe_init(void *arg)
{
struct ix_softc *sc = (struct ix_softc *)arg;
struct ifnet *ifp = &sc->arpcom.ac_if;
struct rx_ring *rxr = sc->rx_rings;
struct ix_rxring *rxr = sc->rx_rings;
uint32_t k, txdctl, rxdctl, rxctrl, mhadd, itr;
int i, s, err;
@ -1076,8 +1076,8 @@ ixgbe_queue_intr(void *vque)
struct ix_queue *que = vque;
struct ix_softc *sc = que->sc;
struct ifnet *ifp = &sc->arpcom.ac_if;
struct rx_ring *rxr = que->rxr;
struct tx_ring *txr = que->txr;
struct ix_rxring *rxr = que->rxr;
struct ix_txring *txr = que->txr;
if (ISSET(ifp->if_flags, IFF_RUNNING)) {
ixgbe_rxeof(rxr);
@ -1101,8 +1101,8 @@ ixgbe_legacy_intr(void *arg)
{
struct ix_softc *sc = (struct ix_softc *)arg;
struct ifnet *ifp = &sc->arpcom.ac_if;
struct rx_ring *rxr = sc->rx_rings;
struct tx_ring *txr = sc->tx_rings;
struct ix_rxring *rxr = sc->rx_rings;
struct ix_txring *txr = sc->tx_rings;
int rv;
rv = ixgbe_intr(sc);
@ -1423,7 +1423,7 @@ ixgbe_media_change(struct ifnet *ifp)
**********************************************************************/
int
ixgbe_encap(struct tx_ring *txr, struct mbuf *m_head)
ixgbe_encap(struct ix_txring *txr, struct mbuf *m_head)
{
struct ix_softc *sc = txr->sc;
uint32_t olinfo_status = 0, cmd_type_len;
@ -1953,8 +1953,8 @@ ixgbe_setup_interface(struct ix_softc *sc)
for (i = 0; i < sc->num_queues; i++) {
struct ifqueue *ifq = ifp->if_ifqs[i];
struct ifiqueue *ifiq = ifp->if_iqs[i];
struct tx_ring *txr = &sc->tx_rings[i];
struct rx_ring *rxr = &sc->rx_rings[i];
struct ix_txring *txr = &sc->tx_rings[i];
struct ix_rxring *rxr = &sc->rx_rings[i];
ifq->ifq_softc = txr;
txr->ifq = ifq;
@ -2142,8 +2142,8 @@ ixgbe_allocate_queues(struct ix_softc *sc)
{
struct ifnet *ifp = &sc->arpcom.ac_if;
struct ix_queue *que;
struct tx_ring *txr;
struct rx_ring *rxr;
struct ix_txring *txr;
struct ix_rxring *rxr;
int rsize, tsize;
int txconf = 0, rxconf = 0, i;
@ -2156,14 +2156,14 @@ ixgbe_allocate_queues(struct ix_softc *sc)
/* Then allocate the TX ring struct memory */
if (!(sc->tx_rings = mallocarray(sc->num_queues,
sizeof(struct tx_ring), M_DEVBUF, M_NOWAIT | M_ZERO))) {
sizeof(struct ix_txring), M_DEVBUF, M_NOWAIT | M_ZERO))) {
printf("%s: Unable to allocate TX ring memory\n", ifp->if_xname);
goto fail;
}
/* Next allocate the RX */
if (!(sc->rx_rings = mallocarray(sc->num_queues,
sizeof(struct rx_ring), M_DEVBUF, M_NOWAIT | M_ZERO))) {
sizeof(struct ix_rxring), M_DEVBUF, M_NOWAIT | M_ZERO))) {
printf("%s: Unable to allocate RX ring memory\n", ifp->if_xname);
goto rx_fail;
}
@ -2235,10 +2235,10 @@ err_rx_desc:
err_tx_desc:
for (txr = sc->tx_rings; txconf > 0; txr++, txconf--)
ixgbe_dma_free(sc, &txr->txdma);
free(sc->rx_rings, M_DEVBUF, sc->num_queues * sizeof(struct rx_ring));
free(sc->rx_rings, M_DEVBUF, sc->num_queues * sizeof(struct ix_rxring));
sc->rx_rings = NULL;
rx_fail:
free(sc->tx_rings, M_DEVBUF, sc->num_queues * sizeof(struct tx_ring));
free(sc->tx_rings, M_DEVBUF, sc->num_queues * sizeof(struct ix_txring));
sc->tx_rings = NULL;
fail:
return (ENOMEM);
@ -2252,7 +2252,7 @@ fail:
*
**********************************************************************/
int
ixgbe_allocate_transmit_buffers(struct tx_ring *txr)
ixgbe_allocate_transmit_buffers(struct ix_txring *txr)
{
struct ix_softc *sc = txr->sc;
struct ifnet *ifp = &sc->arpcom.ac_if;
@ -2293,7 +2293,7 @@ fail:
*
**********************************************************************/
int
ixgbe_setup_transmit_ring(struct tx_ring *txr)
ixgbe_setup_transmit_ring(struct ix_txring *txr)
{
struct ix_softc *sc = txr->sc;
int error;
@ -2325,7 +2325,7 @@ ixgbe_setup_transmit_ring(struct tx_ring *txr)
int
ixgbe_setup_transmit_structures(struct ix_softc *sc)
{
struct tx_ring *txr = sc->tx_rings;
struct ix_txring *txr = sc->tx_rings;
int i, error;
for (i = 0; i < sc->num_queues; i++, txr++) {
@ -2348,7 +2348,7 @@ void
ixgbe_initialize_transmit_units(struct ix_softc *sc)
{
struct ifnet *ifp = &sc->arpcom.ac_if;
struct tx_ring *txr;
struct ix_txring *txr;
struct ixgbe_hw *hw = &sc->hw;
int i;
uint64_t tdba;
@ -2430,7 +2430,7 @@ ixgbe_initialize_transmit_units(struct ix_softc *sc)
void
ixgbe_free_transmit_structures(struct ix_softc *sc)
{
struct tx_ring *txr = sc->tx_rings;
struct ix_txring *txr = sc->tx_rings;
int i;
for (i = 0; i < sc->num_queues; i++, txr++)
@ -2443,7 +2443,7 @@ ixgbe_free_transmit_structures(struct ix_softc *sc)
*
**********************************************************************/
void
ixgbe_free_transmit_buffers(struct tx_ring *txr)
ixgbe_free_transmit_buffers(struct ix_txring *txr)
{
struct ix_softc *sc = txr->sc;
struct ixgbe_tx_buf *tx_buffer;
@ -2561,7 +2561,7 @@ ixgbe_tx_offload(struct mbuf *mp, uint32_t *vlan_macip_lens,
}
static int
ixgbe_tx_ctx_setup(struct tx_ring *txr, struct mbuf *mp,
ixgbe_tx_ctx_setup(struct ix_txring *txr, struct mbuf *mp,
uint32_t *cmd_type_len, uint32_t *olinfo_status)
{
struct ixgbe_adv_tx_context_desc *TXD;
@ -2614,7 +2614,7 @@ ixgbe_tx_ctx_setup(struct tx_ring *txr, struct mbuf *mp,
*
**********************************************************************/
int
ixgbe_txeof(struct tx_ring *txr)
ixgbe_txeof(struct ix_txring *txr)
{
struct ix_softc *sc = txr->sc;
struct ifqueue *ifq = txr->ifq;
@ -2684,7 +2684,7 @@ ixgbe_txeof(struct tx_ring *txr)
*
**********************************************************************/
int
ixgbe_get_buf(struct rx_ring *rxr, int i)
ixgbe_get_buf(struct ix_rxring *rxr, int i)
{
struct ix_softc *sc = rxr->sc;
struct ixgbe_rx_buf *rxbuf;
@ -2733,7 +2733,7 @@ ixgbe_get_buf(struct rx_ring *rxr, int i)
*
**********************************************************************/
int
ixgbe_allocate_receive_buffers(struct rx_ring *rxr)
ixgbe_allocate_receive_buffers(struct ix_rxring *rxr)
{
struct ix_softc *sc = rxr->sc;
struct ifnet *ifp = &sc->arpcom.ac_if;
@ -2774,7 +2774,7 @@ fail:
*
**********************************************************************/
int
ixgbe_setup_receive_ring(struct rx_ring *rxr)
ixgbe_setup_receive_ring(struct ix_rxring *rxr)
{
struct ix_softc *sc = rxr->sc;
struct ifnet *ifp = &sc->arpcom.ac_if;
@ -2806,7 +2806,7 @@ ixgbe_setup_receive_ring(struct rx_ring *rxr)
}
int
ixgbe_rxfill(struct rx_ring *rxr)
ixgbe_rxfill(struct ix_rxring *rxr)
{
struct ix_softc *sc = rxr->sc;
int post = 0;
@ -2842,7 +2842,7 @@ ixgbe_rxfill(struct rx_ring *rxr)
void
ixgbe_rxrefill(void *xrxr)
{
struct rx_ring *rxr = xrxr;
struct ix_rxring *rxr = xrxr;
struct ix_softc *sc = rxr->sc;
if (ixgbe_rxfill(rxr)) {
@ -2862,7 +2862,7 @@ ixgbe_rxrefill(void *xrxr)
int
ixgbe_setup_receive_structures(struct ix_softc *sc)
{
struct rx_ring *rxr = sc->rx_rings;
struct ix_rxring *rxr = sc->rx_rings;
int i;
for (i = 0; i < sc->num_queues; i++, rxr++)
@ -2886,7 +2886,7 @@ void
ixgbe_initialize_receive_units(struct ix_softc *sc)
{
struct ifnet *ifp = &sc->arpcom.ac_if;
struct rx_ring *rxr = sc->rx_rings;
struct ix_rxring *rxr = sc->rx_rings;
struct ixgbe_hw *hw = &sc->hw;
uint32_t bufsz, fctrl, srrctl, rxcsum, rdrxctl;
uint32_t hlreg;
@ -3061,7 +3061,7 @@ ixgbe_initialize_rss_mapping(struct ix_softc *sc)
void
ixgbe_free_receive_structures(struct ix_softc *sc)
{
struct rx_ring *rxr;
struct ix_rxring *rxr;
int i;
for (i = 0, rxr = sc->rx_rings; i < sc->num_queues; i++, rxr++)
@ -3077,7 +3077,7 @@ ixgbe_free_receive_structures(struct ix_softc *sc)
*
**********************************************************************/
void
ixgbe_free_receive_buffers(struct rx_ring *rxr)
ixgbe_free_receive_buffers(struct ix_rxring *rxr)
{
struct ix_softc *sc;
struct ixgbe_rx_buf *rxbuf;
@ -3116,7 +3116,7 @@ ixgbe_free_receive_buffers(struct rx_ring *rxr)
*
*********************************************************************/
int
ixgbe_rxeof(struct rx_ring *rxr)
ixgbe_rxeof(struct ix_rxring *rxr)
{
struct ix_softc *sc = rxr->sc;
struct ifnet *ifp = &sc->arpcom.ac_if;
@ -3850,7 +3850,7 @@ ix_kstats(struct ix_softc *sc)
}
static void
ix_rxq_kstats(struct ix_softc *sc, struct rx_ring *rxr)
ix_rxq_kstats(struct ix_softc *sc, struct ix_rxring *rxr)
{
struct ix_rxq_kstats *stats;
struct kstat *ks;
@ -3874,7 +3874,7 @@ ix_rxq_kstats(struct ix_softc *sc, struct rx_ring *rxr)
}
static void
ix_txq_kstats(struct ix_softc *sc, struct tx_ring *txr)
ix_txq_kstats(struct ix_softc *sc, struct ix_txring *txr)
{
struct ix_txq_kstats *stats;
struct kstat *ks;
@ -3980,7 +3980,7 @@ int
ix_rxq_kstats_read(struct kstat *ks)
{
struct ix_rxq_kstats *stats = ks->ks_data;
struct rx_ring *rxr = ks->ks_softc;
struct ix_rxring *rxr = ks->ks_softc;
struct ix_softc *sc = rxr->sc;
struct ixgbe_hw *hw = &sc->hw;
uint32_t i = rxr->me;
@ -4007,7 +4007,7 @@ int
ix_txq_kstats_read(struct kstat *ks)
{
struct ix_txq_kstats *stats = ks->ks_data;
struct tx_ring *txr = ks->ks_softc;
struct ix_txring *txr = ks->ks_softc;
struct ix_softc *sc = txr->sc;
struct ixgbe_hw *hw = &sc->hw;
uint32_t i = txr->me;

View file

@ -1,4 +1,4 @@
/* $OpenBSD: if_ix.h,v 1.46 2023/08/04 10:58:27 jan Exp $ */
/* $OpenBSD: if_ix.h,v 1.47 2024/05/21 11:19:39 bluhm Exp $ */
/******************************************************************************
@ -158,14 +158,14 @@ struct ix_queue {
char name[8];
pci_intr_handle_t ih;
void *tag;
struct tx_ring *txr;
struct rx_ring *rxr;
struct ix_txring *txr;
struct ix_rxring *rxr;
};
/*
* The transmit ring, one per tx queue
*/
struct tx_ring {
struct ix_txring {
struct ix_softc *sc;
struct ifqueue *ifq;
uint32_t me;
@ -190,7 +190,7 @@ struct tx_ring {
/*
* The Receive ring, one per rx queue
*/
struct rx_ring {
struct ix_rxring {
struct ix_softc *sc;
struct ifiqueue *ifiq;
uint32_t me;
@ -262,14 +262,14 @@ struct ix_softc {
* Transmit rings:
* Allocated at run time, an array of rings.
*/
struct tx_ring *tx_rings;
struct ix_txring *tx_rings;
int num_tx_desc;
/*
* Receive rings:
* Allocated at run time, an array of rings.
*/
struct rx_ring *rx_rings;
struct ix_rxring *rx_rings;
uint64_t que_mask;
int num_rx_desc;

View file

@ -1,4 +1,4 @@
/* $OpenBSD: if_mwx.c,v 1.2 2024/02/21 12:08:05 jsg Exp $ */
/* $OpenBSD: if_mwx.c,v 1.3 2024/05/20 21:22:43 martijn Exp $ */
/*
* Copyright (c) 2022 Claudio Jeker <claudio@openbsd.org>
* Copyright (c) 2021 MediaTek Inc.
@ -1426,7 +1426,7 @@ mwx_txwi_alloc(struct mwx_softc *sc, int count)
}
}
for (i = count; i >= MT_PACKET_ID_FIRST; i--)
for (i = count - 1; i >= MT_PACKET_ID_FIRST; i--)
LIST_INSERT_HEAD(&q->mt_freelist, &q->mt_data[i], mt_entry);
return 0;

View file

@ -1,4 +1,4 @@
/* $OpenBSD: if_rge.c,v 1.24 2024/04/13 23:44:11 jsg Exp $ */
/* $OpenBSD: if_rge.c,v 1.25 2024/05/20 01:51:32 kevlo Exp $ */
/*
* Copyright (c) 2019, 2020, 2023 Kevin Lo <kevlo@openbsd.org>
@ -209,7 +209,8 @@ rge_attach(struct device *parent, struct device *self, void *aux)
/*
* Allocate interrupt.
*/
if (pci_intr_map_msi(pa, &ih) == 0)
if (pci_intr_map_msix(pa, 0, &ih) == 0 ||
pci_intr_map_msi(pa, &ih) == 0)
sc->rge_flags |= RGE_FLAG_MSI;
else if (pci_intr_map(pa, &ih) != 0) {
printf(": couldn't map interrupt\n");

View file

@ -1,4 +1,4 @@
/* $OpenBSD: if_vmx.c,v 1.85 2024/05/13 01:15:51 jsg Exp $ */
/* $OpenBSD: if_vmx.c,v 1.86 2024/05/21 19:49:06 jan Exp $ */
/*
* Copyright (c) 2013 Tsubai Masanari
@ -203,7 +203,7 @@ void vmxnet3_rxintr(struct vmxnet3_softc *, struct vmxnet3_rxqueue *);
void vmxnet3_rxfill_tick(void *);
void vmxnet3_rxfill(struct vmxnet3_rxring *);
void vmxnet3_iff(struct vmxnet3_softc *);
void vmxnet3_rx_csum(struct vmxnet3_rxcompdesc *, struct mbuf *);
void vmxnet3_rx_offload(struct vmxnet3_rxcompdesc *, struct mbuf *);
void vmxnet3_stop(struct ifnet *);
void vmxnet3_reset(struct vmxnet3_softc *);
int vmxnet3_init(struct vmxnet3_softc *);
@ -1127,14 +1127,8 @@ vmxnet3_rxintr(struct vmxnet3_softc *sc, struct vmxnet3_rxqueue *rq)
}
m->m_pkthdr.len = m->m_len = len;
vmxnet3_rx_csum(rxcd, m);
#if NVLAN > 0
if (letoh32(rxcd->rxc_word2 & VMXNET3_RXC_VLAN)) {
m->m_flags |= M_VLANTAG;
m->m_pkthdr.ether_vtag = letoh32((rxcd->rxc_word2 >>
VMXNET3_RXC_VLANTAG_S) & VMXNET3_RXC_VLANTAG_M);
}
#endif
vmxnet3_rx_offload(rxcd, m);
if (((letoh32(rxcd->rxc_word0) >> VMXNET3_RXC_RSSTYPE_S) &
VMXNET3_RXC_RSSTYPE_M) != VMXNET3_RXC_RSSTYPE_NONE) {
m->m_pkthdr.ph_flowid = letoh32(rxcd->rxc_word1);
@ -1215,22 +1209,39 @@ vmxnet3_iff(struct vmxnet3_softc *sc)
void
vmxnet3_rx_csum(struct vmxnet3_rxcompdesc *rxcd, struct mbuf *m)
vmxnet3_rx_offload(struct vmxnet3_rxcompdesc *rxcd, struct mbuf *m)
{
if (letoh32(rxcd->rxc_word0 & VMXNET3_RXC_NOCSUM))
/*
* VLAN Offload
*/
#if NVLAN > 0
if (ISSET(rxcd->rxc_word2, VMXNET3_RXC_VLAN)) {
SET(m->m_flags, M_VLANTAG);
m->m_pkthdr.ether_vtag = letoh32((rxcd->rxc_word2 >>
VMXNET3_RXC_VLANTAG_S) & VMXNET3_RXC_VLANTAG_M);
}
#endif
/*
* Checksum Offload
*/
if (ISSET(rxcd->rxc_word0, VMXNET3_RXC_NOCSUM))
return;
if ((rxcd->rxc_word3 & (VMXNET3_RXC_IPV4 | VMXNET3_RXC_IPSUM_OK)) ==
(VMXNET3_RXC_IPV4 | VMXNET3_RXC_IPSUM_OK))
m->m_pkthdr.csum_flags |= M_IPV4_CSUM_IN_OK;
if (ISSET(rxcd->rxc_word3, VMXNET3_RXC_IPV4) &&
ISSET(rxcd->rxc_word3, VMXNET3_RXC_IPSUM_OK))
SET(m->m_pkthdr.csum_flags, M_IPV4_CSUM_IN_OK);
if (rxcd->rxc_word3 & VMXNET3_RXC_FRAGMENT)
if (ISSET(rxcd->rxc_word3, VMXNET3_RXC_FRAGMENT))
return;
if (rxcd->rxc_word3 & (VMXNET3_RXC_TCP | VMXNET3_RXC_UDP)) {
if (rxcd->rxc_word3 & VMXNET3_RXC_CSUM_OK)
m->m_pkthdr.csum_flags |=
M_TCP_CSUM_IN_OK | M_UDP_CSUM_IN_OK;
if (ISSET(rxcd->rxc_word3, VMXNET3_RXC_CSUM_OK)) {
if (ISSET(rxcd->rxc_word3, VMXNET3_RXC_TCP))
SET(m->m_pkthdr.csum_flags, M_TCP_CSUM_IN_OK);
else if (ISSET(rxcd->rxc_word3, VMXNET3_RXC_UDP))
SET(m->m_pkthdr.csum_flags, M_UDP_CSUM_IN_OK);
}
}

View file

@ -1,4 +1,4 @@
$OpenBSD: pcidevs,v 1.2074 2024/04/20 08:54:01 jsg Exp $
$OpenBSD: pcidevs,v 1.2075 2024/05/21 07:03:55 jsg Exp $
/* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */
/*
@ -790,8 +790,8 @@ product AMD 19_1X_PCIE_1 0x14a5 19h/1xh PCIE
product AMD 19_1X_RCEC 0x14a6 19h/1xh RCEC
product AMD 19_1X_PCIE_2 0x14a7 19h/1xh PCIE
product AMD 19_1X_PCIE_3 0x14aa 19h/1xh PCIE
product AMD 19_1X_PCIE_4 0x14ac 19h/1xh PCIE
product AMD 19_1X_PCIE_5 0x14ab 19h/1xh PCIE
product AMD 19_1X_PCIE_4 0x14ab 19h/1xh PCIE
product AMD 19_1X_PCIE_5 0x14ac 19h/1xh PCIE
product AMD 19_1X_DF_1 0x14ad 19h/1xh Data Fabric
product AMD 19_1X_DF_2 0x14ae 19h/1xh Data Fabric
product AMD 19_1X_DF_3 0x14af 19h/1xh Data Fabric
@ -1177,8 +1177,8 @@ product AQUANTIA AQC107 0x07b1 AQC107
product AQUANTIA AQC108 0x08b1 AQC108
product AQUANTIA AQC109 0x09b1 AQC109
product AQUANTIA AQC111 0x11b1 AQC111
product AQUANTIA AQC112 0x12b1 AQC112
product AQUANTIA AQC116C 0x11c0 AQC116C
product AQUANTIA AQC112 0x12b1 AQC112
product AQUANTIA AQC115C 0x12c0 AQC115C
product AQUANTIA AQC113C 0x14c0 AQC113C
product AQUANTIA AQC113CA 0x34c0 AQC113CA
@ -8800,10 +8800,10 @@ product REALTEK RTL8723AE 0x8723 8723AE
product REALTEK RTL8821AE 0x8821 8821AE
product REALTEK RTL8852AE 0x8852 8852AE
product REALTEK RTL8852AE_VT 0xa85a 8852AE-VT
product REALTEK RTL8852BE 0xb852 8852BE
product REALTEK RTL8852BE_2 0xb85b 8852BE
product REALTEK RTL8723BE 0xb723 8723BE
product REALTEK RTL8822BE 0xb822 8822BE
product REALTEK RTL8852BE 0xb852 8852BE
product REALTEK RTL8852BE_2 0xb85b 8852BE
product REALTEK RTL8821CE 0xc821 8821CE
product REALTEK RTL8822CE 0xc822 8822CE
product REALTEK RTL8852CE 0xc852 8852CE
@ -9337,11 +9337,11 @@ product SYMBIOS YELLOWFIN_1 0x0701 Yellowfin
product SYMBIOS YELLOWFIN_2 0x0702 Yellowfin
product SYMBIOS 61C102 0x0901 61C102
product SYMBIOS 63C815 0x1000 63C815
product SYMBIOS 1030R 0x1030 53c1030R
product SYMBIOS MEGARAID_39XX 0x10e1 MegaRAID SAS39XX
product SYMBIOS MEGARAID_39XX_2 0x10e2 MegaRAID SAS39XX
product SYMBIOS MEGARAID_38XX 0x10e5 MegaRAID SAS38XX
product SYMBIOS MEGARAID_38XX_2 0x10e6 MegaRAID SAS38XX
product SYMBIOS 1030R 0x1030 53c1030R
product SYMBIOS MEGARAID 0x1960 MegaRAID
/* Packet Engines products */
@ -9958,16 +9958,16 @@ product VORTEX GDT_8X22RZ 0x02f6 GDT8x22RZ
product VORTEX GDT_ICP 0x0300 ICP
product VORTEX GDT_ICP2 0x0301 ICP
/* Beijing WangXun Technology products */
product WANGXUN WX1860A2 0x0101 WX1860A2
product WANGXUN WX1860AL1 0x010b WX1860AL1
/* Nanjing QinHeng Electronics products */
product WCH CH352 0x3253 CH352
product WCH2 CH351 0x2273 CH351
product WCH2 CH382_2 0x3250 CH382
product WCH2 CH382_1 0x3253 CH382
/* Beijing WangXun Technology products */
product WANGXUN WX1860A2 0x0101 WX1860A2
product WANGXUN WX1860AL1 0x010b WX1860AL1
/* Western Digital products */
product WD WD33C193A 0x0193 WD33C193A
product WD WD33C196A 0x0196 WD33C196A

View file

@ -2,7 +2,7 @@
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
*
* generated from:
* OpenBSD: pcidevs,v 1.2074 2024/04/20 08:54:01 jsg Exp
* OpenBSD: pcidevs,v 1.2075 2024/05/21 07:03:55 jsg Exp
*/
/* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */
@ -795,8 +795,8 @@
#define PCI_PRODUCT_AMD_19_1X_RCEC 0x14a6 /* 19h/1xh RCEC */
#define PCI_PRODUCT_AMD_19_1X_PCIE_2 0x14a7 /* 19h/1xh PCIE */
#define PCI_PRODUCT_AMD_19_1X_PCIE_3 0x14aa /* 19h/1xh PCIE */
#define PCI_PRODUCT_AMD_19_1X_PCIE_4 0x14ac /* 19h/1xh PCIE */
#define PCI_PRODUCT_AMD_19_1X_PCIE_5 0x14ab /* 19h/1xh PCIE */
#define PCI_PRODUCT_AMD_19_1X_PCIE_4 0x14ab /* 19h/1xh PCIE */
#define PCI_PRODUCT_AMD_19_1X_PCIE_5 0x14ac /* 19h/1xh PCIE */
#define PCI_PRODUCT_AMD_19_1X_DF_1 0x14ad /* 19h/1xh Data Fabric */
#define PCI_PRODUCT_AMD_19_1X_DF_2 0x14ae /* 19h/1xh Data Fabric */
#define PCI_PRODUCT_AMD_19_1X_DF_3 0x14af /* 19h/1xh Data Fabric */
@ -1182,8 +1182,8 @@
#define PCI_PRODUCT_AQUANTIA_AQC108 0x08b1 /* AQC108 */
#define PCI_PRODUCT_AQUANTIA_AQC109 0x09b1 /* AQC109 */
#define PCI_PRODUCT_AQUANTIA_AQC111 0x11b1 /* AQC111 */
#define PCI_PRODUCT_AQUANTIA_AQC112 0x12b1 /* AQC112 */
#define PCI_PRODUCT_AQUANTIA_AQC116C 0x11c0 /* AQC116C */
#define PCI_PRODUCT_AQUANTIA_AQC112 0x12b1 /* AQC112 */
#define PCI_PRODUCT_AQUANTIA_AQC115C 0x12c0 /* AQC115C */
#define PCI_PRODUCT_AQUANTIA_AQC113C 0x14c0 /* AQC113C */
#define PCI_PRODUCT_AQUANTIA_AQC113CA 0x34c0 /* AQC113CA */
@ -8805,10 +8805,10 @@
#define PCI_PRODUCT_REALTEK_RTL8821AE 0x8821 /* 8821AE */
#define PCI_PRODUCT_REALTEK_RTL8852AE 0x8852 /* 8852AE */
#define PCI_PRODUCT_REALTEK_RTL8852AE_VT 0xa85a /* 8852AE-VT */
#define PCI_PRODUCT_REALTEK_RTL8852BE 0xb852 /* 8852BE */
#define PCI_PRODUCT_REALTEK_RTL8852BE_2 0xb85b /* 8852BE */
#define PCI_PRODUCT_REALTEK_RTL8723BE 0xb723 /* 8723BE */
#define PCI_PRODUCT_REALTEK_RTL8822BE 0xb822 /* 8822BE */
#define PCI_PRODUCT_REALTEK_RTL8852BE 0xb852 /* 8852BE */
#define PCI_PRODUCT_REALTEK_RTL8852BE_2 0xb85b /* 8852BE */
#define PCI_PRODUCT_REALTEK_RTL8821CE 0xc821 /* 8821CE */
#define PCI_PRODUCT_REALTEK_RTL8822CE 0xc822 /* 8822CE */
#define PCI_PRODUCT_REALTEK_RTL8852CE 0xc852 /* 8852CE */
@ -9342,11 +9342,11 @@
#define PCI_PRODUCT_SYMBIOS_YELLOWFIN_2 0x0702 /* Yellowfin */
#define PCI_PRODUCT_SYMBIOS_61C102 0x0901 /* 61C102 */
#define PCI_PRODUCT_SYMBIOS_63C815 0x1000 /* 63C815 */
#define PCI_PRODUCT_SYMBIOS_1030R 0x1030 /* 53c1030R */
#define PCI_PRODUCT_SYMBIOS_MEGARAID_39XX 0x10e1 /* MegaRAID SAS39XX */
#define PCI_PRODUCT_SYMBIOS_MEGARAID_39XX_2 0x10e2 /* MegaRAID SAS39XX */
#define PCI_PRODUCT_SYMBIOS_MEGARAID_38XX 0x10e5 /* MegaRAID SAS38XX */
#define PCI_PRODUCT_SYMBIOS_MEGARAID_38XX_2 0x10e6 /* MegaRAID SAS38XX */
#define PCI_PRODUCT_SYMBIOS_1030R 0x1030 /* 53c1030R */
#define PCI_PRODUCT_SYMBIOS_MEGARAID 0x1960 /* MegaRAID */
/* Packet Engines products */
@ -9963,16 +9963,16 @@
#define PCI_PRODUCT_VORTEX_GDT_ICP 0x0300 /* ICP */
#define PCI_PRODUCT_VORTEX_GDT_ICP2 0x0301 /* ICP */
/* Beijing WangXun Technology products */
#define PCI_PRODUCT_WANGXUN_WX1860A2 0x0101 /* WX1860A2 */
#define PCI_PRODUCT_WANGXUN_WX1860AL1 0x010b /* WX1860AL1 */
/* Nanjing QinHeng Electronics products */
#define PCI_PRODUCT_WCH_CH352 0x3253 /* CH352 */
#define PCI_PRODUCT_WCH2_CH351 0x2273 /* CH351 */
#define PCI_PRODUCT_WCH2_CH382_2 0x3250 /* CH382 */
#define PCI_PRODUCT_WCH2_CH382_1 0x3253 /* CH382 */
/* Beijing WangXun Technology products */
#define PCI_PRODUCT_WANGXUN_WX1860A2 0x0101 /* WX1860A2 */
#define PCI_PRODUCT_WANGXUN_WX1860AL1 0x010b /* WX1860AL1 */
/* Western Digital products */
#define PCI_PRODUCT_WD_WD33C193A 0x0193 /* WD33C193A */
#define PCI_PRODUCT_WD_WD33C196A 0x0196 /* WD33C196A */

View file

@ -2,7 +2,7 @@
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
*
* generated from:
* OpenBSD: pcidevs,v 1.2074 2024/04/20 08:54:01 jsg Exp
* OpenBSD: pcidevs,v 1.2075 2024/05/21 07:03:55 jsg Exp
*/
/* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */
@ -2911,14 +2911,14 @@ static const struct pci_known_product pci_known_products[] = {
PCI_VENDOR_AQUANTIA, PCI_PRODUCT_AQUANTIA_AQC111,
"AQC111",
},
{
PCI_VENDOR_AQUANTIA, PCI_PRODUCT_AQUANTIA_AQC112,
"AQC112",
},
{
PCI_VENDOR_AQUANTIA, PCI_PRODUCT_AQUANTIA_AQC116C,
"AQC116C",
},
{
PCI_VENDOR_AQUANTIA, PCI_PRODUCT_AQUANTIA_AQC112,
"AQC112",
},
{
PCI_VENDOR_AQUANTIA, PCI_PRODUCT_AQUANTIA_AQC115C,
"AQC115C",
@ -31767,14 +31767,6 @@ static const struct pci_known_product pci_known_products[] = {
PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RTL8852AE_VT,
"8852AE-VT",
},
{
PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RTL8852BE,
"8852BE",
},
{
PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RTL8852BE_2,
"8852BE",
},
{
PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RTL8723BE,
"8723BE",
@ -31783,6 +31775,14 @@ static const struct pci_known_product pci_known_products[] = {
PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RTL8822BE,
"8822BE",
},
{
PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RTL8852BE,
"8852BE",
},
{
PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RTL8852BE_2,
"8852BE",
},
{
PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RTL8821CE,
"8821CE",
@ -33619,6 +33619,10 @@ static const struct pci_known_product pci_known_products[] = {
PCI_VENDOR_SYMBIOS, PCI_PRODUCT_SYMBIOS_63C815,
"63C815",
},
{
PCI_VENDOR_SYMBIOS, PCI_PRODUCT_SYMBIOS_1030R,
"53c1030R",
},
{
PCI_VENDOR_SYMBIOS, PCI_PRODUCT_SYMBIOS_MEGARAID_39XX,
"MegaRAID SAS39XX",
@ -33635,10 +33639,6 @@ static const struct pci_known_product pci_known_products[] = {
PCI_VENDOR_SYMBIOS, PCI_PRODUCT_SYMBIOS_MEGARAID_38XX_2,
"MegaRAID SAS38XX",
},
{
PCI_VENDOR_SYMBIOS, PCI_PRODUCT_SYMBIOS_1030R,
"53c1030R",
},
{
PCI_VENDOR_SYMBIOS, PCI_PRODUCT_SYMBIOS_MEGARAID,
"MegaRAID",
@ -35827,6 +35827,14 @@ static const struct pci_known_product pci_known_products[] = {
PCI_VENDOR_VORTEX, PCI_PRODUCT_VORTEX_GDT_ICP2,
"ICP",
},
{
PCI_VENDOR_WANGXUN, PCI_PRODUCT_WANGXUN_WX1860A2,
"WX1860A2",
},
{
PCI_VENDOR_WANGXUN, PCI_PRODUCT_WANGXUN_WX1860AL1,
"WX1860AL1",
},
{
PCI_VENDOR_WCH, PCI_PRODUCT_WCH_CH352,
"CH352",
@ -35843,14 +35851,6 @@ static const struct pci_known_product pci_known_products[] = {
PCI_VENDOR_WCH2, PCI_PRODUCT_WCH2_CH382_1,
"CH382",
},
{
PCI_VENDOR_WANGXUN, PCI_PRODUCT_WANGXUN_WX1860A2,
"WX1860A2",
},
{
PCI_VENDOR_WANGXUN, PCI_PRODUCT_WANGXUN_WX1860AL1,
"WX1860AL1",
},
{
PCI_VENDOR_WD, PCI_PRODUCT_WD_WD33C193A,
"WD33C193A",

View file

@ -1,4 +1,4 @@
$OpenBSD: usbdevs,v 1.763 2024/05/15 01:41:19 kevlo Exp $
$OpenBSD: usbdevs,v 1.764 2024/05/21 07:13:29 jsg Exp $
/* $NetBSD: usbdevs,v 1.322 2003/05/10 17:47:14 hamajima Exp $ */
/*
@ -1004,8 +1004,8 @@ product APPLE WELLSPRING9_JIS 0x0274 Keyboard/Trackpad
product APPLE WELLSPRING8_ANSI 0x0290 Keyboard/Trackpad
product APPLE WELLSPRING8_ISO 0x0291 Keyboard/Trackpad
product APPLE WELLSPRING8_JIS 0x0292 Keyboard/Trackpad
product APPLE WELLSPRINGM1_J293 0x0341 Keyboard/Trackpad
product APPLE OPTMOUSE 0x0302 Optical mouse
product APPLE WELLSPRINGM1_J293 0x0341 Keyboard/Trackpad
product APPLE BLUETOOTH_HCI 0x1000 HID-proxy
product APPLE SPEAKERS 0x1101 Speakers
product APPLE IPHONE 0x1290 iPhone

View file

@ -1,10 +1,10 @@
/* $OpenBSD: usbdevs.h,v 1.775 2024/05/15 01:41:41 kevlo Exp $ */
/* $OpenBSD: usbdevs.h,v 1.776 2024/05/21 07:14:20 jsg Exp $ */
/*
* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
*
* generated from:
* OpenBSD: usbdevs,v 1.763 2024/05/15 01:41:19 kevlo Exp
* OpenBSD: usbdevs,v 1.764 2024/05/21 07:13:29 jsg Exp
*/
/* $NetBSD: usbdevs,v 1.322 2003/05/10 17:47:14 hamajima Exp $ */
@ -1011,8 +1011,8 @@
#define USB_PRODUCT_APPLE_WELLSPRING8_ANSI 0x0290 /* Keyboard/Trackpad */
#define USB_PRODUCT_APPLE_WELLSPRING8_ISO 0x0291 /* Keyboard/Trackpad */
#define USB_PRODUCT_APPLE_WELLSPRING8_JIS 0x0292 /* Keyboard/Trackpad */
#define USB_PRODUCT_APPLE_WELLSPRINGM1_J293 0x0341 /* Keyboard/Trackpad */
#define USB_PRODUCT_APPLE_OPTMOUSE 0x0302 /* Optical mouse */
#define USB_PRODUCT_APPLE_WELLSPRINGM1_J293 0x0341 /* Keyboard/Trackpad */
#define USB_PRODUCT_APPLE_BLUETOOTH_HCI 0x1000 /* HID-proxy */
#define USB_PRODUCT_APPLE_SPEAKERS 0x1101 /* Speakers */
#define USB_PRODUCT_APPLE_IPHONE 0x1290 /* iPhone */

View file

@ -1,10 +1,10 @@
/* $OpenBSD: usbdevs_data.h,v 1.769 2024/05/15 01:41:41 kevlo Exp $ */
/* $OpenBSD: usbdevs_data.h,v 1.770 2024/05/21 07:14:20 jsg Exp $ */
/*
* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
*
* generated from:
* OpenBSD: usbdevs,v 1.763 2024/05/15 01:41:19 kevlo Exp
* OpenBSD: usbdevs,v 1.764 2024/05/21 07:13:29 jsg Exp
*/
/* $NetBSD: usbdevs,v 1.322 2003/05/10 17:47:14 hamajima Exp $ */
@ -925,14 +925,14 @@ const struct usb_known_product usb_known_products[] = {
USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING8_JIS,
"Keyboard/Trackpad",
},
{
USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRINGM1_J293,
"Keyboard/Trackpad",
},
{
USB_VENDOR_APPLE, USB_PRODUCT_APPLE_OPTMOUSE,
"Optical mouse",
},
{
USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRINGM1_J293,
"Keyboard/Trackpad",
},
{
USB_VENDOR_APPLE, USB_PRODUCT_APPLE_BLUETOOTH_HCI,
"HID-proxy",

View file

@ -1,4 +1,4 @@
/* $OpenBSD: kern_exit.c,v 1.220 2024/01/19 01:43:26 bluhm Exp $ */
/* $OpenBSD: kern_exit.c,v 1.221 2024/05/20 10:32:20 claudio Exp $ */
/* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */
/*
@ -132,8 +132,6 @@ exit1(struct proc *p, int xexit, int xsig, int flags)
/* nope, multi-threaded */
if (flags == EXIT_NORMAL)
single_thread_set(p, SINGLE_EXIT);
else if (flags == EXIT_THREAD)
single_thread_check(p, 0);
}
if (flags == EXIT_NORMAL && !(pr->ps_flags & PS_EXITING)) {
@ -157,15 +155,27 @@ exit1(struct proc *p, int xexit, int xsig, int flags)
}
/* unlink ourselves from the active threads */
SCHED_LOCK(s);
mtx_enter(&pr->ps_mtx);
TAILQ_REMOVE(&pr->ps_threads, p, p_thr_link);
SCHED_UNLOCK(s);
pr->ps_threadcnt--;
pr->ps_exitcnt++;
/*
* if somebody else wants to take us to single threaded mode,
* count ourselves out.
*/
if (pr->ps_single) {
if (--pr->ps_singlecnt == 0)
wakeup(&pr->ps_singlecnt);
}
if ((p->p_flag & P_THREAD) == 0) {
/* main thread gotta wait because it has the pid, et al */
while (pr->ps_threadcnt > 1)
tsleep_nsec(&pr->ps_threads, PWAIT, "thrdeath", INFSLP);
while (pr->ps_threadcnt + pr->ps_exitcnt > 1)
msleep_nsec(&pr->ps_threads, &pr->ps_mtx, PWAIT,
"thrdeath", INFSLP);
}
mtx_leave(&pr->ps_mtx);
rup = pr->ps_ru;
if (rup == NULL) {
@ -352,9 +362,11 @@ exit1(struct proc *p, int xexit, int xsig, int flags)
/* just a thread? detach it from its process */
if (p->p_flag & P_THREAD) {
/* scheduler_wait_hook(pr->ps_mainproc, p); XXX */
if (--pr->ps_threadcnt == 1)
mtx_enter(&pr->ps_mtx);
pr->ps_exitcnt--;
if (pr->ps_threadcnt + pr->ps_exitcnt == 1)
wakeup(&pr->ps_threads);
KASSERT(pr->ps_threadcnt > 0);
mtx_leave(&pr->ps_mtx);
}
/*
@ -829,7 +841,8 @@ process_zap(struct process *pr)
if (otvp)
vrele(otvp);
KASSERT(pr->ps_threadcnt == 1);
KASSERT(pr->ps_threadcnt == 0);
KASSERT(pr->ps_exitcnt == 1);
if (pr->ps_ptstat != NULL)
free(pr->ps_ptstat, M_SUBPROC, sizeof(*pr->ps_ptstat));
pool_put(&rusage_pool, pr->ps_ru);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: kern_fork.c,v 1.257 2024/01/24 19:23:38 cheloha Exp $ */
/* $OpenBSD: kern_fork.c,v 1.258 2024/05/20 10:32:20 claudio Exp $ */
/* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */
/*
@ -535,7 +535,7 @@ thread_fork(struct proc *curp, void *stack, void *tcb, pid_t *tidptr,
struct proc *p;
pid_t tid;
vaddr_t uaddr;
int s, error;
int error;
if (stack == NULL)
return EINVAL;
@ -559,7 +559,6 @@ thread_fork(struct proc *curp, void *stack, void *tcb, pid_t *tidptr,
/* other links */
p->p_p = pr;
pr->ps_threadcnt++;
/* local copies */
p->p_fd = pr->ps_fd;
@ -578,18 +577,19 @@ thread_fork(struct proc *curp, void *stack, void *tcb, pid_t *tidptr,
LIST_INSERT_HEAD(&allproc, p, p_list);
LIST_INSERT_HEAD(TIDHASH(p->p_tid), p, p_hash);
SCHED_LOCK(s);
mtx_enter(&pr->ps_mtx);
TAILQ_INSERT_TAIL(&pr->ps_threads, p, p_thr_link);
pr->ps_threadcnt++;
/*
* if somebody else wants to take us to single threaded mode,
* count ourselves in.
*/
if (pr->ps_single) {
atomic_inc_int(&pr->ps_singlecount);
pr->ps_singlecnt++;
atomic_setbits_int(&p->p_flag, P_SUSPSINGLE);
}
SCHED_UNLOCK(s);
mtx_leave(&pr->ps_mtx);
/*
* Return tid to parent thread and copy it out to userspace

View file

@ -1,4 +1,4 @@
/* $OpenBSD: kern_proc.c,v 1.97 2024/01/19 01:43:27 bluhm Exp $ */
/* $OpenBSD: kern_proc.c,v 1.98 2024/05/20 10:32:20 claudio Exp $ */
/* $NetBSD: kern_proc.c,v 1.14 1996/02/09 18:59:41 christos Exp $ */
/*
@ -495,9 +495,9 @@ proc_printit(struct proc *p, const char *modif,
p->p_p->ps_flags, PS_BITS, p->p_flag, P_BITS);
(*pr)(" runpri=%u, usrpri=%u, slppri=%u, nice=%d\n",
p->p_runpri, p->p_usrpri, p->p_slppri, p->p_p->ps_nice);
(*pr)(" wchan=%p, wmesg=%s, ps_single=%p\n",
(*pr)(" wchan=%p, wmesg=%s, ps_single=%p scnt=%d ecnt=%d\n",
p->p_wchan, (p->p_wchan && p->p_wmesg) ? p->p_wmesg : "",
p->p_p->ps_single);
p->p_p->ps_single, p->p_p->ps_singlecnt, p->p_p->ps_exitcnt);
(*pr)(" forw=%p, list=%p,%p\n",
TAILQ_NEXT(p, p_runq), p->p_list.le_next, p->p_list.le_prev);
(*pr)(" process=%p user=%p, vmspace=%p\n",

Some files were not shown because too many files have changed in this diff Show more