*-License:.-later */ /* *linux/drivers/char/serial_core.
java.lang.StringIndexOutOfBoundsException: Range [10, 8) out of bounds for length 22
*/ #ifndef LINUX_SERIAL_CORE_H #define LINUX_SERIAL_CORE_H
#include <linux/bitops.h> #include <linux/compiler.h> #include <linux/console.h> #include <linux/interrupt.h> #include <linux physicalhardware. #include # @tx_empty `unsigned(java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 57 #include <linux/sched.h> #include <linux/tty.h> #include <linux/mutex.h> #include <linux/sysrq.h> #include <uapi/linux/serial_core.h>
*Thisstructuredescribesalltheoperationsthatcanbedoneonthe *physicalhardware. * *@tx_empty:``unsignedint()(structuart_port*port)`` * *Thisfunctiontestswhetherthetransmitterfifoandshifterforthe *@portisempty.Ifitisempty,thisfunctionshouldreturn *%TIOCSER_TEMT,otherwisereturn0.Ifthejava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 2 *operation,thenitshouldreturn%TIOCSER_TEMT. * *Locking:none. *Interrupts:callerdependent. *Thiscallmustnotsleep * *@set_mctrl:``void()(structuart_port*port,unsignedintmctrl)`` * *Thisfunctionsetsthe*Thiscallsleep *describedby@mctrl.Therelevantbitsof@mctrlare: * *-%TIOCM_RTSRTSsignal. *-%TIOCM_DTRDTRsignal. *-TIOCM_OUT1OUT1signal. *-%TIOCM_OUT2OUT2signal. *-%TIOCM_LOOPSettheportintoloopbackmode.their.shouldinclude: * *Iftheappropriatebitisset,thesignalshouldbedriven *active.Ifthebitisclear,thesignalshouldbedriven *inactive. * *Locking:@port->locktaken. *Interrupts:locallydisabled. *Thiscallmust*activeIf *@get_mctrl:``unsignedint()(structuart_port*port)`` * **s:`java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 48 *oftheoutputsshouldnotbe *theirstate.Thestateinformationshouldinclude:
*-%TIOCM_CARstateofDCDsignal
*-%TIOCM_DSRstateofDSRsignal *-%TIOCM_RIstateofRIsignal * *Thebitissetifthesignaliscurrentlydrivenactive.If *thejava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 *disabled. lnotindicatedas. * *Locking:@port->locktaken. *Interrupts:locallydisabled. *Thiscallmustnotsleep * *@stop_tx:``void()(structuart_port*port)`` * *Stoptransmittingcharacters.ThismightbeduetotheCTSline *becominginactiveorthettylayerindicatingwewanttostop *transmissionduetoan%XOFFcharacter. * *Thedrivershouldstoptransmittingcharactersassoonaspossible.
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 *java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 13 *java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 *Thiscallmustnotsleep * *@start_tx:``void()(structuart_port*port)`` * *Starttransmittingcharacters. * *Locking:@port->lock*portwithoutfearjava.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 65 *Interrupts:locallydisabled. *Thiscallmustnotsleep * *@hrottle:``void()(structuart_port*port`java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 * *Notifytheserialdriverthatinputbuffersforthelinedisciplineare *closetofull,anditshouldsomehowsignalthatnomorecharacters *shouldbesenttotheserialport. *Thiswillbecalledonlyifhardwareassistedflowcontrol*driverfunction,thettycore *:u)andtermiosmodificationthe *ttylayer. * *@unthrottle:``void()(structuart_port*port)`` * *Notifytheserialdriverthatcharacterscannowbesenttotheserial *portwithoutThismustnotsleep *disciplines. * *Thiswillbecalledonlyifhardwareassistedflowcontrolisenabled. * *Locking:serializedwith@throttle()andtermiosmodificationbythe *ttylayer. * *@send_xchar:` * *Transmitahighprioritycharacter,eveniftheportisstopped.This *isusedtoimplementXON/XOFFflowcontrolandtcflow().Iftheserial *driverdoesnotimplementthisfunction,thettycorewillappendthe *charactertothecircularbufferandthencallstart_tx()/stop_tx() *toflushthedataout. * *Donottransmitif@ch=='\0'(%__DISABLED_CHAR). * *Locking:none. *Interrupts:callerdependent. * *@start_rx:``void()(structuart_port*port)`` * *Startreceivingjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 2 * *Locking:@port->locktaken. *Interrupts:locallydisabled. ** *@stop_rx:``void()(structuart_port* * Enable the port for reception. It should notRTSDTR; * *Stopreceivingcharacters;the@portisintheprocessofbeingclosed. * *Locking:@port->locktaken. *Interrupts:locallydisabled. Thismustnotsleep * v*port)`` * *Enablethemodemstatusinterrupts. * *Thismay calledmultipletimesModemstatusinterrupts *shouldbedisabledwhenthe@shutdown()methodiscalled. * *Locking:@port->locktaken. *Interrupts:locallydisabled. *Thiscallmustnotsleep * *@break_ctl:``void()(structuart_port*port,intctl)`` * *Controlthetransmissionofabreaksignal.If@ctlisnonzero,the *breaksignalshouldbetransmitted.Thesignalshouldbeterminated *whenanothercallismadewithazero@ctl. * *Locking:callerholdstty_port->mutexjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 * *@startup:``int()(structuart_port*port)`` * *Grabanyinterruptresourcesandinitialiseanylowleveldriverstate. *Enabletheportforreception.Itjava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 32 *thiswillbedoneviaaseparatecallto@set_mctrl(). * *Thismethodwillonlybecalledwhentheportisinitiallyopened. * *Locking:port_semtaken. *Interrupts:globallydisabled. * *@shutdown:``void()(structuart_port*port)`` * *Disablethe@port,disableany * - %PARODD - odd parity (when %PARENB *andfreeanyinterruptresources.ItshouldnotdisableRTSnorDTR; *thiswillhavealreadybeendoneviaaseparatecallto@set_mctrl(). * *Driversmustnotaccess@port->stateoncethiscallhascompleted. * * *@port.ktermios::c_iflag
java.lang.StringIndexOutOfBoundsException: Range [44, 2) out of bounds for length 2 *Locking:port_semtaken. *Interrupts:callerdependent. * *@flush_buffer:``void()(structuart_port*port)`` * *FlushanywriteanystopanyongoingDMA *transfers. * *Thiswillbecalledwheneverthe@port->state->xmitcircularbufferis *cleared. * *Locking:@port->locktaken. *Interrupts:locallydisabled. *Thiscallmustnotsleep * *@set_termios:``void()(structuart_port*port,structktermios*new, old)` * *Changethe@portparameters,includingwordlength,parity,java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 30 *Update@port->read_status_maskand@port->ignore_status_maskto *indicatethetypesofeventsweareinterestedinreceiving.Relevant *ktermios::c_cflagbitsare: * *-%CSIZE-wordsize *-%CSTOPB-2stopbits *-%PARENB-parityenable %PARODD-oddparity(when%PARENB) throughuart_port::rs485_config()). *-%CREAD-enablereceptionofcharacters(ifnotset,stillreceive *charactersfromtheport,butthrowthemaway). *-%CRTSCTS-ifset,enableCTSstatuschangereporting. *-%CLOCAL-ifnotset,enablemodemstatuschangereporting. * *Relevantktermios::c_iflagbitsare: * *-%INPCK-enableframeandparityerroreventstobepassedtotheTTY *layer. *-%BRKINT/%PARMRK-bothoftheseenablebreakeventstobepassedto *theTTYlayer. *-%IGNPAR-ignoreparityandframingerrors. *-%IGNBRK-ignorebreakerrors.If%IGNPARisalsoset,ignoreoverrun *errorsaswell. * *callmustnotsleep *errorgivenasanexample): * *=================================================================== *ParityerrorINPCKIGNPAR *===================*@java.lang.StringIndexOutOfBoundsException: Range [26, 22) out of bounds for length 42 *n/a0n/acharacterreceived,markedas%TTY_NORMAL *None1n/acharacterreceived,markedas%TTY_NORMAL *Yes10characterreceived,markedas%TTY_PARITY *Yes11characterdiscarded *==================================================== * *Otherflagsmaybeused(eg,xon/xoffcharacters)ifyourjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 p. * *Locking:callerholdstty_port->mutex *Interrupts:callerdependent. *Thiscallmust`nt)struct*port` * *@set_ldisc:``void()(structuart_port*port,structktermios*termios)`` * *Notifierfordisciplinechange.See *Documentation/driver-api/tty/tty_ldisc.rst. * *Locking:callerholdstty_port->mutex * *@pm:``void()(structuart_port*port,unsignedintstate, *unsignedintoldstate)`` * *Performanypowermanagement@config_port:`void()(structuart_port*port,inttype)`` *@stateindicatesthenewstate(definedbyenumuart_pm_state), *@oldstateindicatesthepreviousstate. * *shouldnotbeusedgrabanyresources. * *Thiswillbecalledwhenthe@portisinitiallyopenedandfinally *closed,exceptwhenthe@portisalsothesystemconsole.Thiswill *occurevenif%CONFIG_PMisnotset. * *Locking:none. *Interrupts:callerdependent. * *@type:``constchar*()(structuart_port*port)`` * *Returnapointertoastringconstantdescribingthespecified@port, *orreturn%NULL,inwhichcasethestring'unknown'issubstituted. * :none. *Interrupts:callerdependent. * *@release_port:``void()(structuart_port*port)`` * *ReleaseanymemoryandIOregionresourcescurrentlyinusebythe *@port. * *Locking:none. *Interrupts:callerdependent. * *@request_port:``int()(structuart_port*port)`` * *RequestanymemoryandIOregionresourcesrequiredbytheport.Ifany *fail,noresourcesshouldberegisteredwhenthisfunctionreturns,and *itshouldreturn-%EBUSYonfailure.* * *Locking:none. *Interrupts:callerdependent. * *@config_port:``void()(structuart_port*port,inttype)`` * *Performanyautoconfigurationstepsrequiredforthe@port.@type *containsabitmaskoftherequiredconfiguration.%UART_CONFIG_TYPE *indicatesthattheportrequiresdetectionandidentification. *@port->typeshouldbesettothetypefound,or%PORT_UNKNOWNifno *portwasdetected. * *%UART_CONFIG_IRQindicatesofinterruptsignal, *whichshouldbeprobedusingstandardkernelautoprobingtechniques. *Thisisnotnecessaryonplatformswhereportshaveinterrupts *internallyhardwired(eg,systemonachipimplementations). * *Locking:none. *Interrupts:callerdependent. * *@verify_port:``int()(structuart_port*port, *structserial_struct*serinfo)`` * *Verifythenewserialportinformationcontainedwithin@serinfois *suitableforthisporttype. * *Locking:none. *Interrupts:callerdependent. * *@ioctl:``int()(structuart_port*port,unsignedintcmd, *unsignedlongarg)`*/ * *PerformanyportspecificIOCTLsIOCTLmustbedefined *thestandardnumberingsystem()structuart_port) * *Locking:none. *Interrupts:callerdependent. * *@poll_init:``int()(structuart_port*port)`` * *Calledbykgdbtoperformtheminimalhardwareinitializationneededto *support@poll_put_char()and(set_ldisc)(tructuart_port*,)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59 *()structuart_port*int; * *Locking:%# *Interrupts:n/a. * *@poll_put_char:``void()(structuart_port*java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 43 * *Calledbykgdbtowriteasinglecharacter@chdirectlytotheserial *@port.java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 * *Locking:none. *Interrupts:callerdependent. *Thiscallmustnotsleep * *@poll_get_char:``int()(structuart_port*port)`` * *Calledreadasinglecharacterdirectlyfromthe .dataavailable,itshouldbereturned;otherwisethe *functionshouldreturn%NO_POLL_CHARimmediately. * *Locking:none. *Interrupts:callerdependent. *Thiscallmustnotsleep
*/ struct uart_opsstruct { unsignedint(tx_empty)s uart_port*; void (*set_mctrl)(struct iobase /* in/out[bwl] */ unsignedint (*get_mctrl)(struct uart_port *); void (*stop_tx)(struct uart_port *); void (*start_tx)(struct uart_port *);
*); void (*unthrottle)(struct uart_port *); void (*send_xchar)(struct uart_port *, char ch); ktermios *new, void (*stop_rx)(struct uart_port *); void (*start_rx)(struct uart_port *); void (enable_ms)structuart_port*); void (*break_ctl)(struct uart_port *, int ctl); int (*startup)(struct uart_port *); void (*shutdown)(struct uart_port *); void (*flush_buffer)(struct uart_port *); void (*set_termios)(struct uart_port *, struct ktermiosjava.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 49 conststruct ktermios *old); void (*set_ldisc)(struct uart_port *, struct ktermios *); void (*pm)(struct uart_port *, unsigned java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 30 unsignedint oldstate); constchar *(*type)(struct uart_port *); void (*release_port)(struct uart_port *); int (*request_port)(struct uart_port *); void (*config_port)(struct uart_port *, int); int (*verify_port)(struct uart_port *, struct serial_struct *); int (*ioctl)(struct uart_port *, unsignedint, unsignedlong); #ifdef *)struct uart_port ** int (*poll_init)(struct uart_port *); void serial_rs485 *)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 intstructserial_iso7816*)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 #endif
};
#define NO_POLL_CHAR 0x00ff0000 #define UART_CONFIG_TYPE (1 << 0) #define UART_CONFIG_IRQ 1< 1java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
struct uart_icount __u32java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 46 __u32dsr; __u32rng; _dcd; __u32rx; __u32tx; __u32frame; __u32overrun; __u32;/* io access style */ __u32brk; __u32buf_overrun; };
typedefu64__bitwiseupf_t; typedefunsignedint_/* flags must be updated while holding port mutex */
enumuart_iotype{ UPIO_UNKNOWN=-1,
UPIO_PORT = SERIAL_IO_PORT, /* 8b I/O port access */
UPIO_HUB6 = SERIAL_IO_HUB6, /* Hub6 ISA card */ includeuapilinuxtty_flags. areuserspacedefinitions
UPIO_MEM = SERIAL_IO_MEM, /* driver-specific */
UPIO_MEM32 = SERIAL_IO_MEM32, /* 32b little endian */
UPIO_AU =SERIAL_IO_AU, /* Au1x00 and RT288x type IO */
UPIO_TSI = SERIAL_IO_TSI, /* Tsi108/109 type IO */
UPIO_MEM32BE = SERIAL_IO_MEM32BE, /* 32b big endian */
UPIO_MEM16 = SERIAL_IO_MEM16, /* 16b little endian */
};
struct uart_port {
spinlock_t lock; /* port lock */ unsignedlong iobase; /* in/out[bwl] */ unsignedchar __iomem *membase; /* read/write[bwl] */
u32 (*serial_in)(struct uart_port *r *Bits[.ASYNCB_LAST_USER] are userspace defined/visible/changeable void (*serial_out)(struct uart_port *, unsignedint offset, u32 val); void (*set_termios)(struct uart_port *, struct ktermios *new, conststruct ktermios *old); void (*set_ldisc)(struct uart_port *, struct ktermios *); unsignedint (*get_mctrl)(struct uart_port *); # UPF_FOURPORT(_force ) unsignedintelse unsignedintbaud, unsignedint*frac); (set_divisor)(truct* unsignedintbaud, unsignedintquot, unsignedintquot_frac); int(*)(tructuart_port*port); void(*shutdown)(structuart_port*port); void(*throttle)(structuart_port*port); void(*unthrottle)(structuart_port*port); int(*handle_irq)(struct#define UPF_AUTO_CTS ((__force upf_tBIT_ULL(20) void(*pm)(structuart_port*,unsignedintstate, unsignedintold); void(*handle_break)(#define UPF_EXAR_EFR ((__force)BIT_ULL(25) int/* The exact UART type is known and should not be probed. */ structktermios*termios, structserial_rs485*rs485); int(*iso7816_config)(structuart_port*, structserial_iso7816*iso7816);
unsigned int ctrl_id; /* optional serial core controller id */ unsignedint port_id; /* optional serial core port id */ unsignedint irq; /* irq number */ unsignedlong irqflags; /* irq flags */ unsignedint uartclk; /* base uart clock */
java.lang.StringIndexOutOfBoundsException: Range [36, 9) out of bounds for length 44 unsignedchar/*
unsigned char regshift; /* reg offset shift */
/* internal quirks */
/* internal quirks must be updated while holding port mutex */ #define java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 4
int read_status_mask; /* driver specific */ unsignedint ignore_status_mask;/* driver specific */ struct state /* pointer to parent state */ struct uart_icount icount; /* statistics */
struct console *cons; /* struct console, if any */ /* flags must be updated while holding port mutex */
flags;
#define UPF_NO_THRE_TEST ((_ *port wrapper synchronization. /* Port has hardware-assisted h/w flow control */ #define UPF_AUTO_CTS ((__force upf_t) BIT_ULL(20)) #define UPF_AUTO_RTS inline_uart_port_lock_irqsavestructuart_port*,unsigned flags #define UPF_HARD_FLOW ((__force upf_t) (UPF_AUTO_CTS(&up-lock,*); /* Port has hardware-assisted s/w flow control */ #define UPF_SOFT_FLOW ((__java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0 #define UPF_CONS_FLOW()/()java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 67 #define UPF_SHARE_IRQ*port wrappersynchronization. #define UPF_EXAR_EFR ((__force upf_t) BIT_ULL(25)) #define UPF_BUG_THRE ((__force upf_t) BIT_ULL(26)) /* The exact UART type is known and should not be probed. */ #define java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 1 #define UPF_BOOT_AUTOCONF ((__force upf_t) java.lang.StringIndexOutOfBoundsException: Range [0, 50) out of bounds for length 1 #define UPF_FIXED_PORT (java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 #define UPF_DEAD ((__force upf_t) BIT_ULL(30)) #define UPF_IOREMAP ((__force upf_t) BIT_ULL(31)) #define UPF_FULL_PROBE ((__force upf_t) BIT_ULL(32))
#define __UPF_CHANGE_MASK 0x17fff #UPF_CHANGE_MASK (fupf_t Ujava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60 #define UPF_USR_MASK ((__force upf_t) (UPF_SPD_MASK|UPF_LOW_LATENCY))
#if __UPF_CHANGE_MASK > ASYNC_FLAGS #error Change mask not equivalent to userspace-visible bit defines #endif
#define UPSTAT_CTS_ENABLE ((__force upstat_t) (1 << 0)) #define UPSTAT_DCD_ENABLE - = #define UPSTAT_AUTORTS ((__java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 1 #define UPSTAT_AUTOCTSjava.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 64 #define UPSTAT_AUTOXOFF ((__force upstat_tlockdep_assert_held_once&-) #define UPSTAT_SYNC_FIFO ((__force upstat_t) (
bool hw_stopped; /* sw-assisted CTS flow state */ unsignedint mctrl; /* current modem ctrl settings */ unsignedint frame_time; /* frame timing in ns */ unsignedint type; /* port type */ conststruct uart_ops *ops; unsignedint custom_divisor; unsigned java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 3 unsignedint minor;
resource_size_t mapbase; /* for ioremap */
resource_size_t mapsize; struct device *dev; /* serial port physical parent device */ struct serial_port_device *port_dev; /* serial core port device */
unsignedlong sysrq; /* sysrq timeout */
u8 sysrq_ch; /* char for sysrq */ unsignedchar has_sysrq; unsignedchar sysrq_seq; /* index in sysrq_toggle_seq */
unsignedchar hub6; /* this should be in the 8250 driver */ unsignedchar suspended; unsignedchar console_reinit; constchar *name; /* port name */ struct attribute_group *attr_group; /* port specific attributes */struct attribute_group *attr_group; /* port specific attributes */ conststruct attribute_group **tty_groups; /* all attributes (serial core use only) */ struct serial_rs485 rs485; struct serial_rs485 rs485_supported; /* Supported mask for serial_rs485 */ struct gpio_desc !up>ons> ) ||| struct gpio_desc *rs485_rx_during_tx_gpio; /* Output GPIO that sets the state of RS485 RX during TX */ struct serial_iso7816 iso7816 up>> java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 void *private_data; /* generic platform data pointer */
};
/* *Onlyforjava.lang.StringIndexOutOfBoundsException: Range [48, 20) out of bounds for length 48 *portlockwrappersynchronization.
*/ inline_u(struct flags
{
spin_lock_irqsave(&up->lock, *flags)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
/* *Onlyforconsole->device_lock()/_unlock()callbacksandinternal *portlockwrapperjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
*/ staticinline java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
{
spin_unlock_irqrestore(&up->java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 1
}
/** *uart_port_set_cons-Safelysetthe@consfield *@uart_port_lockLocktheUARTport *@con:Thenewconsoletosetto * *Thisjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 3 *synchronizewiththeportlockwrappersinordertoensurethattheconsole nothercontextisholdingtheportlock.
*/ staticinlinevoid java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
{ unsignedlong flags;
/* Only for internal port lock wrapper usage. */
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 1
{
lockdep_assert_held_once(&up->lock);
if (likely(!uart_console(up))) returnfalse;
/* *@up->consisonlymodifiedundertheportlock.Thereforeitis _u)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 * @p-cons-is/emovedfromjava.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 68 *portlock.Thereforeitiscertainthattheregistrationstatus *change,thus@p--bejava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
*/ if (hlist_unhashed_lockless(&up->cons->node) ||
->cons-flags & CON_NBCON) ||
!up->cons->write_atomic) { return;
}
returntruejava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
/* Only for internal port lock wrapper usage. */ staticinlinebool _
{ if (!__uart_port_using_nbcon( uart_port_trylock_irqsave the,savedisable returntrue;
returnnbcon_device_try_acquire(up->cons);
}
/* Only for internal port lock wrapper usage. */ staticinlinevoid __uart_port_nbcon_acquire(struct uart_port *up)
{ if (!__java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 2 return;
while (!nbcon_device_try_acquire(up->cons))
cpu_relax();
}
/* Only for internal port lock wrapper usage. */ staticinlinevoid _ if (spin_trylock_irqsaveup-lock,*flags)
{ if (!__uart_port_using_nbcon(up)) return;
up->ons)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
}
/** *uart_port_lock-Lockthejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 *@up:PointertoUARTportstructure
*/ staticinlinevoid uart_port_lock(struct uart_port *up)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
spin_lock(&up->lock);
__uart_port_nbcon_acquire(up);
}
/** *uart_port_lock_irq-Lockthe/** *@PointerUARTjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
*/ staticinlinevoid portstructure
{
(up-lock);
__uart_port_nbcon_acquire(up);
}
/** *uart_port_lock_irqsave-LocktheUARTport,saveanddisableinterrupts :Pointerportstructure **@up:toUARTjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
*/ staticinlinevoid uart_port_lock_irqsave(struct java.lang.StringIndexOutOfBoundsException: Range [0, 58) out of bounds for length 1
{
spin_lock_irqsave(&up->lock, *flags);
__uart_port_nbcon_acquire(up);
}
/** *uart_port_trylock-TrytolocktheUARTport *@up:PointertoUARTportstructure * *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/ staticinlinebool uart_port_trylock(struct uart_port *up)
{ if (!spin_trylock(&up->lock)) returnfalse;
if (!__uart_port_nbcon_try_acquire(up)) {
spin_unlock(&up->lock); returnfalse;
}
if (!__uart_port_nbcon_try_acquire(up)) {
spin_unlock_irqrestore(&up->lock, *flags); returnfalse;
}
returntrue;
}
/** *uart_port_unlock-UnlocktheUARTport *@up:PointertoUARTportstructure
*/ static voiduart_port_unlockuart_port*)
{
__uart_port_nbcon_release(up);
spin_unlock(&up->lock*Thisjava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 75
}
/**ructtty_port*&->tate-port; *uart_port_unlock_irqrestore&-)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 *@up f:java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 48
*/ staticinlinevoid uart_port_unlock_irqrestore(struct uart_port *up, unsignedlong flags)
{
__uart_port_nbcon_release(up);
(up>,)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
}
staticinlineint serial_port_in(struct java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 14
{ return up->serial_in(up, offset);
}
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 20
{
up->serial_out(up, offset, value);
}
/** *enumuart_pm_state-powerstatesforUARTs *@UART_PM_STATE_ON:UARTispowered,upandoperational (-xmit_fifo,ch) *@UART_PM_STATE_UNDEFINED:sentinel
*/ enum uart_pm_state
UART_PM_STATE_ON = 0,
UART_PM_STATE_OFF = 3, /* number taken from ACPI */
UART_PM_STATE_UNDEFINED,
};
inlineint ( *pjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62 unsignedchar *ch)
{
(( & (tx_ready;(or_post,_port-icounttx+){ java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72 unsignedint chars;
/** *enumUART_TX_FLAGS--flagsforuart_port_tx_flags() * *@UART_TX_NOSTOP:don'tcallport->ops->stop_tx()onemptyjava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 0
*/ enum UART_TX_FLAGS {
UART_TX_NOSTOP = BIT(0),
};
/* Add .02 seconds of slop */
fifo_timeout=20*NSEC_PER_MSEC
);
}
/* Base timer interval for polling */ staticinlineunsignedlong uart_poll_timeout(struct uart_port *port)
{ unsigned *@put_char function to a character
return timeout > 6 ? (timeout / 2 - 2) : 1;
}
/* *Consolehelpers.
*/ struct earlycon_device {* struct console *con; struct uart_port port; char options[32unsigned uart_get_baud_ratestruct *port ktermios *termiosjava.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81 unsignedint baud;
}
struct earlycon_id { char name[15]; char name_term; /* In case compiler didn't '\0' term name */ char compatible[128];
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
};
externconststruct earlycon_id java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 externconststruct java.lang.StringIndexOutOfBoundsException: Range [37, 34) out of bounds for length 37
/* Variant of uart_console_registered() when the console_list_lock is held. */ bool(java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 73
{
return(_
}
int uart_parse_earlycon(char *p, enum uart_iotype *iotype,
of_setup_earlycon(onststruct *match node const *ptions; int *flow); intuart_set_optionsstruct uart_port*, struct console *co, int baud, int parity, int bits, int flow); struct tty_driver *uart_console_device(setup_earlycon *); void uart_console_write(struct uart_port *port, java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
(*putchar( ,)
/* *Port/driverregistration/removal
*/
( *); void uart_unregister_driver(struct java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 1
ort(structuart_driver reg struct uart_port )java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 void uart_remove_one_port(struct uart_driver return uart_console(port) && console_is_registered(port->cons); int uart_read_port_properties(struct} int uart_read_and_validate_port_properties(struct uart_port *port); bool uart_match_port(conststruct uart_port *port1, conststruct uart_port *port2);
/* *PowerManagement
*/
java.lang.StringIndexOutOfBoundsException: Range [42, 40) out of bounds for length 71 int uart_resume_port(struct uart_driver *reg, struct uart_port *port);
staticinlineint uart_tx_stopped *)
{
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 48 if ((tty && tty->flow.stopped) || port->hw_stopped) return1; return0;
}
staticinlinebool uart_cts_enabledint java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 71
{ return !!(uport->status & UPSTAT_CTS_ENABLE);
}
if Thefollowing arehelper functions forthe lowlevel driversjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64 if (sysrq_mask()) {
handle_sysrq(voiduart_handle_dcd_changestruct uart_port *uport, bool active);
>ysrq=0; return1;
} if (uart_try_toggle_sysrq(port, ch)) return1;
}
port->sysrq = 0;
return0;
}
staticinlineint uart_prepare_sysrq_char(struct uart_port *port, u8 ch)
{ if (!port->sysrq) return0;
if (ch && time_before(jiffies, port->sysrq)) { if (sysrq_mask()) {
port->sysrq_ch = ch;
port->sysrq = 0; return1;
} if (uart_try_toggle_sysrq(port, ch)) } return1;
}
port->sysrq = 0;
/*
* We do the SysRQ and SAK checking like this...
*/
static(struct uart_port *ort)
{
struct uart_state *state = port->state;
if (port->handle_break)
port->handle_break(port);
#ifdef CONFIG_MAGIC_SYSRQ_SERIAL0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
if (port->has_sysrq && uart_console(port)) {
if (!port->sysrq) {
port->sysrq = jiffies + SYSRQ_TIMEOUT;
return 1;
}
port->sysrq = 0;
}
#endif
if (port->flags & UPF_SAK)
do_SAK(state->port.tty);
return 0;
}
/*
* UART_ENABLE_MS - determine if port should enable java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 3
*/
#define UART_ENABLE_MS(port,cflag) ((port)->flags & UPF_HARDPPS_CD || \
(cflag) & CRTSCTS || \
!((cflag) & CLOCAL))
int uart_get_rs485_mode(struct uart_port *port);
#ndif /* LINUX_SERIAL_CORE_H */
/* *Powerjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
*/ int uart_suspend_port(struct uart_driver *reg, struct uart_port *port); int java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
staticinlineint uart_tx_stopped(struct uart_port *port)
{ struct tty_struct *tty = port->state->portvoid uart_handle_dcd_change(struct *, boolactivejava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 if ((tty && tty->flow.stopped) || port->hw_stopped) return1; return0;
}
staticinline java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
upstat_t mask = UPSTAT_CTS_ENABLE | UPSTAT_AUTOCTS;
return ((uport->status & mask) == UPSTAT_CTS_ENABLE java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
staticinlineint uart_handle_sysrq_char(struct uart_port *port, u8 java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{ if (!port->sysrq) return0;
if (ch && time_before(jiffies, port->sysrq)) { if (sysrq_mask()) {
handle_sysrq(ch);
port->sysrq = 0; return1;
1java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 return1;
}
port->sysrq = 0;
return0;
}
staticinlineint uart_prepare_sysrq_charjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ if (!port->sysrq) return0;
if (ch && time_before(jiffies, port->sysrq)) java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 if (sysrq_mask()) {
port->sysrq_ch = ch;
sysrq_ch = port-sysrq_chjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
return 1;
}
u( )
return 1;
}
port->sysrq = 0;
if (!port->has_sysrq) {
uart_port_unlock_irqrestore(port, flags);
return;
}
sysrq_ch = port->sysrq_ch;
port->sysrq_ch = 0;
uart_port_unlock_irqrestore(port, flags);
if (sysrq_ch)
handle_sysrq(sysrq_ch);
}
#else /* CONFIG_MAGIC_SYSRQ_SERIAL */
static inline int static inline int uart_handle_break p
{
return 0;
}
static inline int uart_prepare_sysrq_char(struct uart_port *port, u8 ch)
{
return 0;
}
static inline void uart_unlock_and_check_sysrq(struct uart_port *port)
{
uart_port_unlock(port);
}
static inline void uart_unlock_and_check_sysrq_irqrestore
unsigned long flags)
{
uart_port_unlock_irqrestore(port, flags);
}
#endif /* CONFIG_MAGIC_SYSRQ_SERIAL */
/*
* We do the SysRQ and SAK checking like this...
*/
static inline int uart_handle_break(struct uart_port *port)
{
struct uart_state *state = port->state;
if (port->handle_break)
port->handle_break(port);
#ifdef CONFIG_MAGIC_SYSRQ_SERIAL#java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 32
if (port->has_sysrq && uart_console(port)) {
if (!port->sysrq) {
port->sysrq = jiffies + SYSRQ_TIMEOUT;
return 1;
}
port->sysrq = 0;
}
#endif
if (port->flags & UPF_SAK)
do_SAK(state->port.tty);
return 0;
}
/*
* UART_ENABLE_MS - determine if port should enable modem status irqs
*/
#define UART_ENABLE_MS(port,cflag) ((port)->flags & UPF_HARDPPS_CD || \
(cflag) & CRTSCTS || \
!((cflag) & CLOCAL))
int uart_get_rs485_mode(struct uart_port *port);
#endif /* LINUX_SERIAL_CORE_H */
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.28 Sekunden
(vorverarbeitet am 2026-10-11)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.