| /kernel/linux/linux-5.10/net/tipc/ |
| 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() 111 return ((void *)&dom->members - (void *)dom) + (mcnt * sizeof(u32)); in dom_rec_len() 118 int i = 0; in dom_size() 138 return list_last_entry(&peer->list, struct tipc_peer, list); in peer_prev() 143 return list_first_entry(&peer->list, struct tipc_peer, list); in peer_nxt() 148 while (!peer->is_head) in peer_head() 153 static struct tipc_peer *get_peer(struct tipc_monitor *mon, u32 addr) in get_peer() argument 158 hlist_for_each_entry(peer, &mon->peers[thash], hash) { in get_peer() 159 if (peer->addr == addr) in get_peer() [all …]
|
| /kernel/linux/linux-5.10/tools/power/cpupower/utils/idle_monitor/ |
| D | cpupower-monitor.c | 1 // SPDX-License-Identifier: GPL-2.0-only 19 #include "idle_monitor/cpupower-monitor.h" 27 0 56 if ((end.tv_nsec - start.tv_nsec) < 0) { in timespec_diff_us() 57 temp.tv_sec = end.tv_sec - start.tv_sec - 1; in timespec_diff_us() 58 temp.tv_nsec = 1000000000 + end.tv_nsec - start.tv_nsec; in timespec_diff_us() 60 temp.tv_sec = end.tv_sec - start.tv_sec; in timespec_diff_us() 61 temp.tv_nsec = end.tv_nsec - start.tv_nsec; in timespec_diff_us() 69 for (x = 0; x < n; x++) in print_n_spaces() 82 return -1; in fill_string_with_spaces() [all …]
|
| /kernel/linux/linux-5.10/tools/testing/selftests/timers/ |
| D | raw_skew.c | 9 * $ gcc raw_skew.c -o raw_skew -lrt 36 __x < 0 ? -(-__x >> __s) : __x >> __s; \ 41 if (val < 0) in llabs() 42 val = -val; in llabs() 66 return end_ns - start_ns; in diff_timespec() 69 void get_monotonic_and_raw(struct timespec *mon, struct timespec *raw) in get_monotonic_and_raw() argument 72 long long diff = 0, tmp; in get_monotonic_and_raw() 75 for (i = 0; i < 3; i++) { in get_monotonic_and_raw() 83 if (diff == 0 || newdiff < diff) { in get_monotonic_and_raw() 87 *mon = nsec_to_ts(tmp); in get_monotonic_and_raw() [all …]
|
| /kernel/linux/linux-5.10/arch/arm/mach-shmobile/ |
| 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 …]
|
| /kernel/linux/linux-5.10/arch/sh/boards/mach-sh03/ |
| 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 20 #define RTC_BASE 0xb0000000 21 #define RTC_SEC1 (RTC_BASE + 0) 44 unsigned int year, mon, day, hour, min, sec; in sh03_rtc_gettimeofday() local 49 sec = (__raw_readb(RTC_SEC1) & 0xf) + (__raw_readb(RTC_SEC10) & 0x7) * 10; in sh03_rtc_gettimeofday() 50 min = (__raw_readb(RTC_MIN1) & 0xf) + (__raw_readb(RTC_MIN10) & 0xf) * 10; in sh03_rtc_gettimeofday() 51 hour = (__raw_readb(RTC_HOU1) & 0xf) + (__raw_readb(RTC_HOU10) & 0xf) * 10; in sh03_rtc_gettimeofday() 52 day = (__raw_readb(RTC_DAY1) & 0xf) + (__raw_readb(RTC_DAY10) & 0xf) * 10; in sh03_rtc_gettimeofday() 53 mon = (__raw_readb(RTC_MON1) & 0xf) + (__raw_readb(RTC_MON10) & 0xf) * 10; in sh03_rtc_gettimeofday() [all …]
|
| /kernel/linux/linux-5.10/arch/m68k/bvme6000/ |
| 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 …]
|
| /kernel/linux/linux-5.10/arch/x86/kernel/cpu/resctrl/ |
| D | rdtgroup.c | 1 // SPDX-License-Identifier: GPL-2.0-only 84 * + We can simply set "current->closid" to assign a task to a resource 88 * - We give up some options in configuring resource groups across multi-socket 90 * - Our choices on how to configure each resource become progressively more 108 rdt_min_closid = min(rdt_min_closid, r->num_closid); in closid_init() 110 closid_free_map = BIT_MASK(rdt_min_closid) - 1; in closid_init() 112 /* CLOSID 0 is always reserved for the default group */ in closid_init() 121 if (closid == 0) in closid_alloc() 122 return -ENOSPC; in closid_alloc() 123 closid--; in closid_alloc() [all …]
|
| D | monitor.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * - Monitoring code 46 * @rmid_entry - The entry in the limbo and free lists. 63 * RMID available for re-allocation. 72 WARN_ON(entry->rmid != rmid); in __rmid_entry() 82 * As per the SDM, when IA32_QM_EVTSEL.EvtID (bits 7:0) is configured in __rmid_read() 85 * IA32_QM_CTR.data (bits 61:0) reports the monitored data. in __rmid_read() 97 u64 val = __rmid_read(entry->rmid, QOS_L3_OCCUP_EVENT_ID); in rmid_dirty() 117 * Skip RMID 0 and start from RMID 1 and check all the RMIDs that in __check_limbo() 120 * RMID and move it to the free list when the counter reaches 0. in __check_limbo() [all …]
|
| /kernel/linux/linux-5.10/arch/m68k/mvme16x/ |
| D | rtc.c | 1 // SPDX-License-Identifier: GPL-2.0 34 {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; 49 /* Ensure clock and real-time-mode-register are accessible */ in rtc_ioctl() 50 rtc->ctrl = RTC_READ; in rtc_ioctl() 51 memset(&wtime, 0, sizeof(struct rtc_time)); in rtc_ioctl() 52 wtime.tm_sec = bcd2bin(rtc->bcd_sec); in rtc_ioctl() 53 wtime.tm_min = bcd2bin(rtc->bcd_min); in rtc_ioctl() 54 wtime.tm_hour = bcd2bin(rtc->bcd_hr); in rtc_ioctl() 55 wtime.tm_mday = bcd2bin(rtc->bcd_dom); in rtc_ioctl() 56 wtime.tm_mon = bcd2bin(rtc->bcd_mth)-1; in rtc_ioctl() [all …]
|
| /kernel/linux/linux-5.10/include/linux/mfd/ |
| D | rohm-bd71828.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 7 #include <linux/mfd/rohm-generic.h> 8 #include <linux/mfd/rohm-shared.h> 29 #define BD71828_BUCK1267_VOLTS 0x100 30 #define BD71828_BUCK3_VOLTS 0x20 31 #define BD71828_BUCK4_VOLTS 0x40 32 #define BD71828_BUCK5_VOLTS 0x20 33 #define BD71828_LDO_VOLTS 0x40 40 #define BD71828_REG_PS_CTRL_1 0x04 41 #define BD71828_REG_PS_CTRL_2 0x05 [all …]
|
| /kernel/linux/linux-5.10/arch/m68k/atari/ |
| D | time.c | 6 * Assembled of parts of former atari/config.c 97-12-18 by Roman Hodek 51 timer_routine(0, NULL); in mfp_timer_c_handler() 63 st_mfp.tim_ct_cd = (st_mfp.tim_ct_cd & 15) | 0x60; in atari_sched_init() 82 * the result may briefly stop changing after counter wrap-around. in atari_read_clk() 87 ticks = INT_TICKS - count; in atari_read_clk() 97 #define COPY(v) val->v=(mste_rtc.v & 0xf) in mste_read() 105 } while (val->sec_ones != (mste_rtc.sec_ones & 0xf)); in mste_read() 111 #define COPY(v) mste_rtc.v=val->v in mste_write() 119 } while (val->sec_ones != (mste_rtc.sec_ones & 0xf)); in mste_write() 134 } while(0) [all …]
|
| /kernel/linux/linux-5.10/drivers/rtc/ |
| D | rtc-mc146818-lib.c | 1 // SPDX-License-Identifier: GPL-2.0-only 29 unsigned char century = 0; in mc146818_get_time() 38 * to poll-wait (up to 1s - eeccch) for the falling edge of RTC_UIP. in mc146818_get_time() 51 * by the RTC when initially set to a non-zero value. in mc146818_get_time() 54 time->tm_sec = CMOS_READ(RTC_SECONDS); in mc146818_get_time() 55 time->tm_min = CMOS_READ(RTC_MINUTES); in mc146818_get_time() 56 time->tm_hour = CMOS_READ(RTC_HOURS); in mc146818_get_time() 57 time->tm_mday = CMOS_READ(RTC_DAY_OF_MONTH); in mc146818_get_time() 58 time->tm_mon = CMOS_READ(RTC_MONTH); in mc146818_get_time() 59 time->tm_year = CMOS_READ(RTC_YEAR); in mc146818_get_time() [all …]
|
| 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 …]
|
| 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 …]
|
| D | rtc-ds1286.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 27 return __raw_readl(&priv->rtcregs[reg]) & 0xff; in ds1286_rtc_read() 32 __raw_writel(data, &priv->rtcregs[reg]); in ds1286_rtc_write() 43 spin_lock_irqsave(&priv->lock, flags); in ds1286_alarm_irq_enable() 50 spin_unlock_irqrestore(&priv->lock, flags); in ds1286_alarm_irq_enable() 52 return 0; in ds1286_alarm_irq_enable() 66 spin_lock_irqsave(&priv->lock, flags); in ds1286_ioctl() 70 spin_unlock_irqrestore(&priv->lock, flags); in ds1286_ioctl() 74 spin_lock_irqsave(&priv->lock, flags); in ds1286_ioctl() 78 spin_unlock_irqrestore(&priv->lock, flags); in ds1286_ioctl() [all …]
|
| /kernel/linux/linux-5.10/arch/x86/platform/intel-mid/ |
| D | intel_mid_vrtc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 23 #include <asm/intel-mid.h> 34 /* vRTC's registers range from 0x0 to 0xD */ in vrtc_cmos_read() 35 if (reg > 0xd || !vrtc_virt_base) in vrtc_cmos_read() 36 return 0xff; in vrtc_cmos_read() 47 if (reg > 0xd || !vrtc_virt_base) in vrtc_cmos_write() 58 u8 sec, min, hour, mday, mon; in vrtc_get_time() local 71 mon = vrtc_cmos_read(RTC_MONTH); in vrtc_get_time() 80 "mon: %d year: %d\n", sec, min, hour, mday, mon, year); in vrtc_get_time() 82 now->tv_sec = mktime64(year, mon, mday, hour, min, sec); in vrtc_get_time() [all …]
|
| /kernel/linux/linux-5.10/arch/powerpc/platforms/chrp/ |
| D | time.c | 1 // SPDX-License-Identifier: GPL-2.0 35 #define NVRAM_AS0 0x74 36 #define NVRAM_AS1 0x75 37 #define NVRAM_DATA 0x77 51 rtcs = of_find_compatible_node(NULL, "rtc", "ds1385-rtc"); in chrp_time_init() 53 return 0; in chrp_time_init() 54 if (of_address_to_resource(rtcs, 0, &r)) { in chrp_time_init() 56 return 0; in chrp_time_init() 61 nvram_as1 = 0; in chrp_time_init() 65 return 0; in chrp_time_init() [all …]
|
| /kernel/linux/linux-5.10/arch/mips/include/asm/ |
| D | mc146818-time.h | 35 int retval = 0; in mc146818_set_rtc_mmss() 57 if (((abs(real_minutes - cmos_minutes) + 15)/30) & 1) in mc146818_set_rtc_mmss() 61 if (abs(real_minutes - cmos_minutes) < 30) { in mc146818_set_rtc_mmss() 72 retval = -1; in mc146818_set_rtc_mmss() 80 * sheets anyway ... -- Markus Kuhn in mc146818_set_rtc_mmss() 91 unsigned int year, mon, day, hour, min, sec; in mc146818_get_cmos_time() local 101 mon = CMOS_READ(RTC_MONTH); in mc146818_get_cmos_time() 110 mon = bcd2bin(mon); in mc146818_get_cmos_time() 116 return mktime64(year, mon, day, hour, min, sec); in mc146818_get_cmos_time()
|
| /kernel/linux/linux-5.10/arch/powerpc/platforms/maple/ |
| D | time.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 54 tm->tm_sec = maple_clock_read(RTC_SECONDS); in maple_get_rtc_time() 55 tm->tm_min = maple_clock_read(RTC_MINUTES); in maple_get_rtc_time() 56 tm->tm_hour = maple_clock_read(RTC_HOURS); in maple_get_rtc_time() 57 tm->tm_mday = maple_clock_read(RTC_DAY_OF_MONTH); in maple_get_rtc_time() 58 tm->tm_mon = maple_clock_read(RTC_MONTH); in maple_get_rtc_time() 59 tm->tm_year = maple_clock_read(RTC_YEAR); in maple_get_rtc_time() 60 } while (tm->tm_sec != maple_clock_read(RTC_SECONDS)); in maple_get_rtc_time() 64 tm->tm_sec = bcd2bin(tm->tm_sec); in maple_get_rtc_time() 65 tm->tm_min = bcd2bin(tm->tm_min); in maple_get_rtc_time() [all …]
|
| /kernel/linux/linux-5.10/arch/mips/dec/ |
| 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 …]
|
| /kernel/linux/linux-5.10/arch/mips/sibyte/swarm/ |
| 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 …]
|
| 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 …]
|
| /kernel/linux/linux-5.10/arch/x86/kernel/ |
| D | rtc.c | 1 // SPDX-License-Identifier: GPL-2.0 16 #include <asm/intel-mid.h> 23 * CMOS/RTC registers. See include/asm-i386/mc146818rtc.h for details. 44 unsigned long long nowtime = now->tv_sec; in mach_set_rtc_mmss() 46 int retval = 0; in mach_set_rtc_mmss() 58 retval = -EINVAL; in mach_set_rtc_mmss() 65 unsigned int status, year, mon, day, hour, min, sec, century = 0; in mach_get_cmos_time() local 69 * If pm_trace abused the RTC as storage, set the timespec to 0, in mach_get_cmos_time() 73 now->tv_sec = now->tv_nsec = 0; in mach_get_cmos_time() 82 * is the reliable way to read RTC - registers. If UIP is set in mach_get_cmos_time() [all …]
|
| /kernel/linux/linux-5.10/tools/gpio/ |
| D | gpio-event-mon.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * gpio-event-mon - monitor GPIO line events from userspace 8 * gpio-event-mon -n <device-name> -o <offset> 26 #include "gpio-utils.h" 38 int i = 0; in monitor_device() 41 if (ret < 0) in monitor_device() 42 return -ENOMEM; in monitor_device() 44 cfd = open(chrdev_name, 0); in monitor_device() 45 if (cfd == -1) { in monitor_device() 46 ret = -errno; in monitor_device() [all …]
|
| /kernel/linux/linux-5.10/drivers/mfd/ |
| D | rohm-bd71828.c | 1 // SPDX-License-Identifier: GPL-2.0-only 14 #include <linux/mfd/rohm-bd71828.h> 22 .gpio = -1, 29 .name = "bd71828-pwrkey", 33 DEFINE_RES_IRQ_NAMED(BD71828_INT_RTC0, "bd71828-rtc-alm-0"), 34 DEFINE_RES_IRQ_NAMED(BD71828_INT_RTC1, "bd71828-rtc-alm-1"), 35 DEFINE_RES_IRQ_NAMED(BD71828_INT_RTC2, "bd71828-rtc-alm-2"), 39 { .name = "bd71828-pmic", }, 40 { .name = "bd71828-gpio", }, 41 { .name = "bd71828-led", .of_compatible = "rohm,bd71828-leds" }, [all …]
|