| /linux/net/tipc/ |
| H A D | monitor.c | 73 * @down_cnt: - numbers of other peers which have reported this on lost 102 return tipc_net(net)->monitors[bearer_id]; in tipc_monitor() 148 int i = 0; in dom_size() 168 return list_last_entry(&peer->list, struct tipc_peer, list); in peer_prev() 173 return list_first_entry(&peer->list, struct tipc_peer, list); in peer_nxt() 178 while (!peer->is_head) in peer_head() 183 static struct tipc_peer *get_peer(struct tipc_monitor *mon, u32 addr) in get_peer() argument 188 hlist_for_each_entry(peer, &mon->peers[thash], hash) { in get_peer() 189 if (peer->addr == addr) in get_peer() 197 struct tipc_monitor *mon = tipc_monitor(net, bearer_id); in get_self() local [all …]
|
| /linux/include/rv/ |
| H A D | ltl_monitor.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 28 task->comm, task->pid); in rv_cond_react() 38 static void ltl_atoms_fetch(struct task_struct *task, struct ltl_monitor *mon); 39 static void ltl_atoms_init(struct task_struct *task, struct ltl_monitor *mon, bool task_creation); 43 return &task->rv[ltl_monitor_slot].ltl_mon; in ltl_get_monitor() 48 struct ltl_monitor *mon = ltl_get_monitor(task); in ltl_task_init() local 50 memset(&mon->states, 0, sizeof(mon->states)); in ltl_task_init() 52 for (int i = 0; i < LTL_NUM_ATOM; ++i) in ltl_task_init() 53 __set_bit(i, mon->unknown_atoms); in ltl_task_init() 55 ltl_atoms_init(task, mon, task_creation); in ltl_task_init() [all …]
|
| /linux/kernel/trace/rv/ |
| H A D | rv.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2019-2022 Red Hat, Inc. Daniel Bristot de Oliveira <bristot@kernel.org> 16 * safety-critical systems. 24 * Springer, Cham, 2019. p. 315-332. 28 * De Oliveira, Daniel Bristot, et al. Automata-based formal analysis 29 * and verification of the real-time Linux kernel. PhD Thesis, 2020. 40 * model of the system, a set of instances of the monitor (per-cpu monitor, 41 * per-task monitor, and so on), and the helper functions that glue the 46 * Linux +----- RV Monitor ----------------------------------+ Formal 48 * +-------------------+ +----------------+ +-----------------+ [all …]
|
| H A D | rv_reactors.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2019-2022 Red Hat, Inc. Daniel Bristot de Oliveira <bristot@kernel.org> 10 * But other reactions can be added (on-demand) via this interface. 33 * - List the available reactors, one per line. 42 * - It is an on/off general switch for reactors, disabling 46 * - List available reactors, with the select reaction for the given 49 * - Writing the name of an reactor enables it to the given 78 if (strcmp(name, r->name) == 0) in get_reactor_rdef_by_name() 91 seq_printf(m, "%s\n", reactor->name); in reactors_show() 92 return 0; in reactors_show() [all …]
|
| H A D | rv.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 27 int rv_disable_monitor(struct rv_monitor *mon); 28 int rv_enable_monitor(struct rv_monitor *mon); 29 bool rv_is_container_monitor(struct rv_monitor *mon); 30 bool rv_is_nested_monitor(struct rv_monitor *mon); 33 int reactor_populate_monitor(struct rv_monitor *mon); 36 static inline int reactor_populate_monitor(struct rv_monitor *mon) in reactor_populate_monitor() argument 38 return 0; in reactor_populate_monitor() 43 return 0; in init_rv_reactors()
|
| /linux/kernel/trace/rv/monitors/sleep/ |
| H A D | sleep.c | 1 // SPDX-License-Identifier: GPL-2.0 25 static void ltl_atoms_fetch(struct task_struct *task, struct ltl_monitor *mon) in ltl_atoms_fetch() argument 28 * This includes "actual" real-time tasks and also PI-boosted in ltl_atoms_fetch() 29 * tasks. A task being PI-boosted means it is blocking an "actual" in ltl_atoms_fetch() 30 * real-task, therefore it should also obey the monitor's rule, in ltl_atoms_fetch() 31 * otherwise the "actual" real-task may be delayed. in ltl_atoms_fetch() 33 ltl_atom_set(mon, LTL_RT, rt_or_dl_task(task)); in ltl_atoms_fetch() 36 static void ltl_atoms_init(struct task_struct *task, struct ltl_monitor *mon, bool task_creation) in ltl_atoms_init() argument 38 ltl_atom_set(mon, LTL_SLEEP, false); in ltl_atoms_init() 39 ltl_atom_set(mon, LTL_WAKE, false); in ltl_atoms_init() [all …]
|
| /linux/tools/power/cpupower/utils/idle_monitor/ |
| H A D | cpupower-monitor.c | 1 // SPDX-License-Identifier: GPL-2.0-only 20 #include "idle_monitor/cpupower-monitor.h" 28 0 57 if ((end.tv_nsec - start.tv_nsec) < 0) { in timespec_diff_us() 58 temp.tv_sec = end.tv_sec - start.tv_sec - 1; in timespec_diff_us() 59 temp.tv_nsec = 1000000000 + end.tv_nsec - start.tv_nsec; in timespec_diff_us() 61 temp.tv_sec = end.tv_sec - start.tv_sec; in timespec_diff_us() 62 temp.tv_nsec = end.tv_nsec - start.tv_nsec; in timespec_diff_us() 70 for (x = 0; x < n; x++) in print_n_spaces() 83 return -1; in fill_string_with_spaces() [all …]
|
| /linux/fs/resctrl/ |
| H A D | rdtgroup.c | 1 // SPDX-License-Identifier: GPL-2.0-only 119 list_for_each_entry(dom, &r->ctrl_domains, hdr.list) in rdt_staged_configs_clear() 120 memset(dom->staged_config, 0, sizeof(dom->staged_config)); in rdt_staged_configs_clear() 140 * - We give up some options in configuring resource groups across multi-socket 142 * - Our choices on how to configure each resource become progressively more 157 u32 rdt_min_closid = ~0; in closid_init() 161 return 0; in closid_init() 165 rdt_min_closid = min(rdt_min_closid, s->num_closid); in closid_init() 169 return -ENOMEM; in closid_init() 176 return 0; in closid_init() [all …]
|
| H A D | monitor.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * - Monitoring code 32 * struct rmid_entry - dirty tracking for all RMID. 36 * @list: Member of the rmid_free_lru list when busy == 0. 51 * @rmid_free_lru - A least recently used list of free RMIDs 65 * @rmid_limbo_count - count of currently unused but (potentially) 74 * @rmid_entry - The entry in the limbo and free lists. 80 * RMID available for re-allocation. 110 WARN_ON_ONCE(entry->closid != closid); in __rmid_entry() 111 WARN_ON_ONCE(entry->rmid != rmid); in __rmid_entry() [all …]
|
| /linux/arch/arm/mach-shmobile/ |
| H A D | regulator-quirk-rcar-gen2.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * R-Car Generation 2 da9063(L)/da9210 regulator quirk 9 * After cold boot or da9063-induced restart, both the da9063 and da9210 seem 32 #define IRQC_BASE 0xe61c0000 33 #define IRQC_MONITOR 0x104 /* IRQn Signal Level Monitor Register */ 38 #define DA9210_REG_MASK_A 0x54 53 static u8 da9063_irq_clr[] = { DA9063_REG_IRQ_MASK_A, 0xff, 0xff, 0xff, 0xff }; 54 static u8 da9210_irq_clr[] = { DA9210_REG_MASK_A, 0xff, 0xff }; 81 u32 mon; in regulator_quirk_notify() local 84 return 0; in regulator_quirk_notify() [all …]
|
| /linux/arch/sh/boards/mach-sh03/ |
| H A D | rtc.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * linux/arch/sh/boards/sh03/rtc.c -- CTP/PCI-SH03 on-chip RTC support 19 #define RTC_BASE 0xb0000000 20 #define RTC_SEC1 (RTC_BASE + 0) 43 unsigned int year, mon, day, hour, min, sec; in sh03_rtc_gettimeofday() local 48 sec = (__raw_readb(RTC_SEC1) & 0xf) + (__raw_readb(RTC_SEC10) & 0x7) * 10; in sh03_rtc_gettimeofday() 49 min = (__raw_readb(RTC_MIN1) & 0xf) + (__raw_readb(RTC_MIN10) & 0xf) * 10; in sh03_rtc_gettimeofday() 50 hour = (__raw_readb(RTC_HOU1) & 0xf) + (__raw_readb(RTC_HOU10) & 0xf) * 10; in sh03_rtc_gettimeofday() 51 day = (__raw_readb(RTC_DAY1) & 0xf) + (__raw_readb(RTC_DAY10) & 0xf) * 10; in sh03_rtc_gettimeofday() 52 mon = (__raw_readb(RTC_MON1) & 0xf) + (__raw_readb(RTC_MON10) & 0xf) * 10; in sh03_rtc_gettimeofday() [all …]
|
| /linux/arch/m68k/bvme6000/ |
| H A D | rtc.c | 1 // SPDX-License-Identifier: GPL-2.0 35 {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; 51 /* Ensure clock and real-time-mode-register are accessible */ in rtc_ioctl() 52 msr = rtc->msr & 0xc0; in rtc_ioctl() 53 rtc->msr = 0x40; in rtc_ioctl() 54 memset(&wtime, 0, sizeof(struct rtc_time)); in rtc_ioctl() 56 wtime.tm_sec = bcd2bin(rtc->bcd_sec); in rtc_ioctl() 57 wtime.tm_min = bcd2bin(rtc->bcd_min); in rtc_ioctl() 58 wtime.tm_hour = bcd2bin(rtc->bcd_hr); in rtc_ioctl() 59 wtime.tm_mday = bcd2bin(rtc->bcd_dom); in rtc_ioctl() [all …]
|
| /linux/include/linux/ |
| H A D | rv.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 20 * Deterministic automaton per-object variables. 38 * struct ltl_monitor - A linear temporal logic runtime verification monitor 40 * non-deterministic state machine, the monitor can be in multiple 43 * - The monitor has not started yet (e.g. because not all 45 * - There is no possible state to be in. In other words, a 56 static inline bool rv_ltl_valid_state(struct ltl_monitor *mon) in rv_ltl_valid_state() argument 58 for (int i = 0; i < ARRAY_SIZE(mon->states); ++i) { in rv_ltl_valid_state() 59 if (mon->states[i]) in rv_ltl_valid_state() 65 static inline bool rv_ltl_all_atoms_known(struct ltl_monitor *mon) in rv_ltl_all_atoms_known() argument [all …]
|
| /linux/arch/m68k/atari/ |
| H A D | time.c | 6 * Assembled of parts of former atari/config.c 97-12-18 by Roman Hodek 66 st_mfp.tim_ct_cd = (st_mfp.tim_ct_cd & 15) | 0x60; in atari_sched_init() 85 * the result may briefly stop changing after counter wrap-around. in atari_read_clk() 90 ticks = INT_TICKS - count; in atari_read_clk() 100 #define COPY(v) val->v=(mste_rtc.v & 0xf) in mste_read() 108 } while (val->sec_ones != (mste_rtc.sec_ones & 0xf)); in mste_read() 114 #define COPY(v) mste_rtc.v=val->v in mste_write() 122 } while (val->sec_ones != (mste_rtc.sec_ones & 0xf)); in mste_write() 137 } while(0) 145 int hr24=0; in atari_mste_hwclk() [all …]
|
| /linux/arch/powerpc/platforms/chrp/ |
| H A D | time.c | 1 // SPDX-License-Identifier: GPL-2.0 33 #define NVRAM_AS0 0x74 34 #define NVRAM_AS1 0x75 35 #define NVRAM_DATA 0x77 49 rtcs = of_find_compatible_node(NULL, "rtc", "ds1385-rtc"); in chrp_time_init() 51 return 0; in chrp_time_init() 52 if (of_address_to_resource(rtcs, 0, &r)) { in chrp_time_init() 54 return 0; in chrp_time_init() 59 nvram_as1 = 0; in chrp_time_init() 63 return 0; in chrp_time_init() [all …]
|
| /linux/kernel/trace/rv/monitors/pagefault/ |
| H A D | pagefault.c | 1 // SPDX-License-Identifier: GPL-2.0 21 static void ltl_atoms_fetch(struct task_struct *task, struct ltl_monitor *mon) in ltl_atoms_fetch() argument 24 * This includes "actual" real-time tasks and also PI-boosted in ltl_atoms_fetch() 25 * tasks. A task being PI-boosted means it is blocking an "actual" in ltl_atoms_fetch() 26 * real-task, therefore it should also obey the monitor's rule, in ltl_atoms_fetch() 27 * otherwise the "actual" real-task may be delayed. in ltl_atoms_fetch() 29 ltl_atom_set(mon, LTL_RT, rt_or_dl_task(task)); in ltl_atoms_fetch() 32 static void ltl_atoms_init(struct task_struct *task, struct ltl_monitor *mon, bool task_creation) in ltl_atoms_init() argument 35 ltl_atom_set(mon, LTL_PAGEFAULT, false); in ltl_atoms_init() 55 return 0; in enable_pagefault()
|
| /linux/arch/mips/dec/ |
| H A D | time.c | 1 // SPDX-License-Identifier: GPL-2.0 6 * This file contains the time handling details for PC-style clocks as 15 #include <asm/cpu-features.h> 24 unsigned int year, mon, day, hour, min, sec, real_year; in read_persistent_clock64() local 34 mon = CMOS_READ(RTC_MONTH); in read_persistent_clock64() 51 mon = bcd2bin(mon); in read_persistent_clock64() 55 year += real_year - 72 + 2000; in read_persistent_clock64() 57 ts->tv_sec = mktime64(year, mon, day, hour, min, sec); in read_persistent_clock64() 58 ts->tv_nsec = 0; in read_persistent_clock64() 71 int retval = 0; in update_persistent_clock64() [all …]
|
| /linux/arch/mips/sibyte/swarm/ |
| H A D | rtc_xicor1241.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 27 #define X1241REG_SR_BAT 0x80 /* currently on battery power */ 28 #define X1241REG_SR_RWEL 0x04 /* r/w latch is enabled, can write RTC */ 29 #define X1241REG_SR_WEL 0x02 /* r/w latch is unlocked, can enable r/w now */ 30 #define X1241REG_SR_RTCF 0x01 /* clock failed */ 31 #define X1241REG_BL_BP2 0x80 /* block protect 2 */ 32 #define X1241REG_BL_BP1 0x40 /* block protect 1 */ 33 #define X1241REG_BL_BP0 0x20 /* block protect 0 */ 34 #define X1241REG_BL_WD1 0x10 35 #define X1241REG_BL_WD0 0x08 [all …]
|
| H A D | rtc_m41t81.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 27 #define M41T81REG_SC_ST 0x80 /* stop bit */ 28 #define M41T81REG_HR_CB 0x40 /* century bit */ 29 #define M41T81REG_HR_CEB 0x80 /* century enable bit */ 30 #define M41T81REG_CTL_S 0x20 /* sign bit */ 31 #define M41T81REG_CTL_FT 0x40 /* frequency test bit */ 32 #define M41T81REG_CTL_OUT 0x80 /* output level */ 33 #define M41T81REG_WD_RB0 0x01 /* watchdog resolution bit 0 */ 34 #define M41T81REG_WD_RB1 0x02 /* watchdog resolution bit 1 */ 35 #define M41T81REG_WD_BMB0 0x04 /* watchdog multiplier bit 0 */ [all …]
|
| /linux/drivers/rtc/ |
| H A D | rtc-m48t35.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Driver for the SGS-Thomson M48T35 Timekeeper RAM chip 22 u8 pad[0x7ff8]; /* starts at 0x7ff8 */ 44 #define M48T35_RTC_SET 0x80 45 #define M48T35_RTC_READ 0x40 64 * by the RTC when initially set to a non-zero value. in m48t35_read_time() 66 spin_lock_irq(&priv->lock); in m48t35_read_time() 67 control = readb(&priv->reg->control); in m48t35_read_time() 68 writeb(control | M48T35_RTC_READ, &priv->reg->control); in m48t35_read_time() 69 tm->tm_sec = readb(&priv->reg->sec); in m48t35_read_time() [all …]
|
| H A D | rtc-bq4802.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 /* rtc-bq4802.c: TI BQ4802 RTC driver. 32 return inb(p->ioport + off); in bq4802_read_io() 37 outb(val, p->ioport + off); in bq4802_write_io() 42 return readb(p->regs + off); in bq4802_read_mem() 47 writeb(val, p->regs + off); in bq4802_write_mem() 57 spin_lock_irqsave(&p->lock, flags); in bq4802_read_time() 59 val = p->read(p, 0x0e); in bq4802_read_time() 60 p->write(p, 0xe, val | 0x08); in bq4802_read_time() 62 tm->tm_sec = p->read(p, 0x00); in bq4802_read_time() [all …]
|
| H A D | rtc-mc146818-lib.c | 1 // SPDX-License-Identifier: GPL-2.0-only 16 * Execute a function while the UIP (Update-in-progress) bit of the RTC is 29 for (i = 0; UIP_RECHECK_LOOPS_MS(i) < timeout; i++) { in mc146818_avoid_UIP() 91 * If the UIP (Update-in-progress) bit of the RTC is set for more then 119 * by the RTC when initially set to a non-zero value. in mc146818_get_time_callback() 121 p->time->tm_sec = seconds; in mc146818_get_time_callback() 122 p->time->tm_min = CMOS_READ(RTC_MINUTES); in mc146818_get_time_callback() 123 p->time->tm_hour = CMOS_READ(RTC_HOURS); in mc146818_get_time_callback() 124 p->time->tm_mday = CMOS_READ(RTC_DAY_OF_MONTH); in mc146818_get_time_callback() 125 p->time->tm_mon = CMOS_READ(RTC_MONTH); in mc146818_get_time_callback() [all …]
|
| H A D | rtc-ds1511.c | 1 // SPDX-License-Identifier: GPL-2.0-only 25 #define DS1511_SEC 0x0 26 #define DS1511_MIN 0x1 27 #define DS1511_HOUR 0x2 28 #define DS1511_DOW 0x3 29 #define DS1511_DOM 0x4 30 #define DS1511_MONTH 0x5 31 #define DS1511_YEAR 0x6 32 #define DS1511_CENTURY 0x7 33 #define DS1511_AM1_SEC 0x8 [all …]
|
| /linux/tools/verification/rvgen/rvgen/ |
| H A D | ltl2k.py | 2 # SPDX-License-Identifier: GPL-2.0-only 10 def line_len(line: str) -> int: 14 def break_long_line(line: str, indent='') -> list[str]: 17 i = line[:COLUMN_LIMIT - line_len(line)].rfind(' ') 41 def abbreviate_atoms(atoms: list[str]) -> list[str]: 42 def shorten(s: str) -> str: 48 for i in range(len(atom), -1, -1): 70 def _fill_states(self) -> str: 128 buf.append("\tbool %s = test_bit(LTL_%s, mon->atoms);" % (atom.lower(), atom)) 140 … "ltl_possible_next_states(struct ltl_monitor *mon, unsigned int state, unsigned long *next)", [all …]
|
| /linux/arch/x86/kernel/cpu/resctrl/ |
| H A D | monitor.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * - Monitoring code 45 * 1. The threshold 0 is changed to rmid count - 1 so don't do correction 48 * equal to (x86_cache_max_rmid + 1) / 8 - 1 and is from 0 up to 27. 101 * When Sub-NUMA Cluster (SNC) mode is not enabled (as indicated by 106 * via MSR 0xCA0 (see the "RMID Sharing Mode" section in the "Intel 133 return lrmid + (cpu_to_node(cpu) % snc_nodes_per_l3_cache) * r->mon.num_rmid; in logical_rmid_to_physical_rmid() 141 * As per the SDM, when IA32_QM_EVTSEL.EvtID (bits 7:0) is configured in __rmid_read_phys() 144 * IA32_QM_CTR.data (bits 61:0) reports the monitored data. in __rmid_read_phys() 152 return -EIO; in __rmid_read_phys() [all …]
|