Lines Matching +full:boot +full:- +full:time

1 /* SPDX-License-Identifier: GPL-2.0-only */
5 * Generic code for various authentication-related caches
22 * - A 'struct cache_detail' which contains information specific to the cache
24 * - An item structure that must contain a "struct cache_head"
25 * - A lookup function defined using DefineCacheLookup
26 * - A 'put' function that can release a cache item. It will only
29 * - A function to calculate a hash of an item's key.
49 time64_t expiry_time; /* After time expiry_time, don't use
54 * be *after* ->flush_time.
63 CACHE_NEGATIVE, /* Negative entry - there is no match for the key */
117 atomic_t writers; /* how many time is /channel open */
140 * delayed awaiting cache-fill
154 * since boot. This is the best for measuring differences in
155 * real time.
163 struct timespec64 boot; in seconds_since_boot() local
164 getboottime64(&boot); in seconds_since_boot()
165 return ktime_get_real_seconds() - boot.tv_sec; in seconds_since_boot()
170 struct timespec64 boot; in convert_to_wallclock() local
171 getboottime64(&boot); in convert_to_wallclock()
172 return boot.tv_sec + sinceboot; in convert_to_wallclock()
197 kref_get(&h->ref); in cache_get()
203 if (kref_get_unless_zero(&h->ref)) in cache_get_rcu()
210 if (kref_read(&h->ref) <= 2 && in cache_put()
211 h->expiry_time < cd->nextcheck) in cache_put()
212 cd->nextcheck = h->expiry_time; in cache_put()
213 kref_put(&h->ref, cd->cache_put); in cache_put()
218 if (h->expiry_time < seconds_since_boot()) in cache_is_expired()
220 if (!test_bit(CACHE_VALID, &h->flags)) in cache_is_expired()
222 return detail->flush_time >= h->last_refresh; in cache_is_expired()
246 /* Must store cache_detail in seq_file->private if using next three functions */
263 return -EINVAL; in get_int()
265 return -ENOENT; in get_int()
269 return -EINVAL; in get_int()
281 return -EINVAL; in get_uint()
283 return -ENOENT; in get_uint()
286 return -EINVAL; in get_uint()
291 static inline int get_time(char **bpp, time64_t *time) in get_time() argument
298 return -EINVAL; in get_time()
300 return -ENOENT; in get_time()
303 return -EINVAL; in get_time()
305 *time = ll; in get_time()
312 struct timespec64 boot; in get_expiry() local
318 getboottime64(&boot); in get_expiry()
319 (*rvp) -= boot.tv_sec; in get_expiry()