/linux/tools/perf/pmu-events/ |
H A D | metric.py | 115 def __init__(self, operator: str, lhs: Union[int, float, Expression], 118 self.lhs = _Constify(lhs) 137 other (Expression): is a lhs or rhs operator 154 return (f'{self.Bracket(self.lhs, self.lhs.ToPerfJson())} {self.operator} ' 158 return (f'{self.Bracket(self.lhs, self.lhs.ToPython())} {self.operator} ' 162 lhs = self.lhs.Simplify() 164 if isinstance(lhs, Constant) and isinstance(rhs, Constant): 165 return Constant(ast.literal_eval(lhs + self.operator + rhs)) 167 if isinstance(self.lhs, Constant): 168 if self.operator in ('+', '|') and lhs.value == '0': [all …]
|
/linux/tools/testing/selftests/bpf/ |
H A D | bpf_experimental.h | 251 #define __bpf_assert_check(LHS, op, RHS) \ argument 252 _Static_assert(sizeof(&(LHS)), "1st argument must be an lvalue expression"); \ 253 _Static_assert(sizeof(LHS) == 8, "Only 8-byte integers are supported\n"); \ 254 _Static_assert(__builtin_constant_p(__bpf_assert_signed(LHS)), "internal static assert"); \ 257 #define __bpf_assert(LHS, op, cons, RHS, VAL) \ argument 260 asm volatile ("if %[lhs] " op " %[rhs] goto +2; r1 = %[value]; call bpf_throw" \ 261 : : [lhs] "r"(LHS), [rhs] cons(RHS), [value] "ri"(VAL) : ); \ 264 #define __bpf_assert_op_sign(LHS, op, cons, RHS, VAL, supp_sign) \ argument 266 __bpf_assert_check(LHS, op, RHS); \ 267 if (__bpf_assert_signed(LHS) && !(supp_sign)) \ [all …]
|
/linux/include/linux/ |
H A D | time64.h | 58 * lhs < rhs: return <0 in timespec64_compare() 59 * lhs == rhs: return 0 in timespec64_compare() 60 * lhs > rhs: return >0 in timespec64_compare() 62 static inline int timespec64_compare(const struct timespec64 *lhs, const struct timespec64 *rhs) in timespec64_compare() 64 if (lhs->tv_sec < rhs->tv_sec) in timespec64_compare() 66 if (lhs->tv_sec > rhs->tv_sec) 68 return lhs->tv_nsec - rhs->tv_nsec; in timespec64_add() argument 73 static inline struct timespec64 timespec64_add(struct timespec64 lhs, in timespec64_add() 77 set_normalized_timespec64(&ts_delta, lhs.tv_sec + rhs.tv_sec, 78 lhs 57 timespec64_compare(const struct timespec64 * lhs,const struct timespec64 * rhs) timespec64_compare() argument 80 timespec64_sub(struct timespec64 lhs,struct timespec64 rhs) timespec64_sub() argument [all...] |
H A D | iosys-map.h | 205 * @lhs: The iosys_map structure 214 static inline bool iosys_map_is_equal(const struct iosys_map *lhs, in iosys_map_is_equal() argument 217 if (lhs->is_iomem != rhs->is_iomem) in iosys_map_is_equal() 219 else if (lhs->is_iomem) in iosys_map_is_equal() 220 return lhs->vaddr_iomem == rhs->vaddr_iomem; in iosys_map_is_equal() 222 return lhs->vaddr == rhs->vaddr; in iosys_map_is_equal()
|
H A D | rtc.h | 32 static inline time64_t rtc_tm_sub(struct rtc_time *lhs, struct rtc_time *rhs) in rtc_tm_sub() argument 34 return rtc_tm_to_time64(lhs) - rtc_tm_to_time64(rhs); in rtc_tm_sub()
|
/linux/arch/arm64/kvm/hyp/nvhe/ |
H A D | gen-hyprel.c | 180 #define assert_op(lhs, rhs, fmt, op) \ argument 182 typeof(lhs) _lhs = (lhs); \ 186 fatal_error("assertion " #lhs " " #op " " #rhs \ 187 " failed (lhs=" fmt ", rhs=" fmt \ 192 #define assert_eq(lhs, rhs, fmt) assert_op(lhs, rhs, fmt, ==) argument 193 #define assert_ne(lhs, rhs, fmt) assert_op(lhs, rhs, fmt, !=) argument 194 #define assert_lt(lhs, rhs, fmt) assert_op(lhs, rhs, fmt, <) argument 195 #define assert_ge(lhs, rhs, fmt) assert_op(lhs, rhs, fmt, >=) argument
|
/linux/lib/ |
H A D | ubsan.c | 239 static void handle_overflow(struct overflow_data *data, void *lhs, in handle_overflow() argument 254 val_to_string(lhs_val_str, sizeof(lhs_val_str), type, lhs); in handle_overflow() 266 void *lhs, void *rhs) in __ubsan_handle_add_overflow() argument 269 handle_overflow(data, lhs, rhs, '+'); in __ubsan_handle_add_overflow() 274 void *lhs, void *rhs) in __ubsan_handle_sub_overflow() argument 276 handle_overflow(data, lhs, rhs, '-'); in __ubsan_handle_sub_overflow() 281 void *lhs, void *rhs) in __ubsan_handle_mul_overflow() argument 283 handle_overflow(data, lhs, rhs, '*'); in __ubsan_handle_mul_overflow() 307 void __ubsan_handle_divrem_overflow(void *_data, void *lhs, void *rhs) in __ubsan_handle_divrem_overflow() argument 433 void __ubsan_handle_shift_out_of_bounds(void *_data, void *lhs, void *rhs) in __ubsan_handle_shift_out_of_bounds() argument [all …]
|
H A D | ubsan.h | 140 void ubsan_linkage __ubsan_handle_add_overflow(void *data, void *lhs, void *rhs); 141 void ubsan_linkage __ubsan_handle_sub_overflow(void *data, void *lhs, void *rhs); 142 void ubsan_linkage __ubsan_handle_mul_overflow(void *data, void *lhs, void *rhs); 144 void ubsan_linkage __ubsan_handle_divrem_overflow(void *_data, void *lhs, void *rhs); 148 void ubsan_linkage __ubsan_handle_shift_out_of_bounds(void *_data, void *lhs, void *rhs);
|
/linux/tools/perf/util/ |
H A D | expr.y | 130 #define BINARY_OP(RESULT, OP, LHS, RHS) \ 131 if (!compute_ids || (is_const(LHS.val) && is_const(RHS.val))) { \ 132 assert(LHS.ids == NULL); \ 134 if (isnan(LHS.val) || isnan(RHS.val)) { \ 137 RESULT.val = LHS.val OP RHS.val; \ 141 RESULT = union_expr(LHS, RHS); \ 180 * LHS == RHS, so both are an identical constant. No need to 190 * Value is either the LHS or RHS and we need the IF expression 307 /* LHS and/or RHS need computing from event IDs so union. */ 322 /* LHS and/or RHS need computing from event IDs so union. */ [all …]
|
/linux/drivers/md/ |
H A D | dm-bio-prison-v2.c | 88 static int cmp_keys(struct dm_cell_key_v2 *lhs, in cmp_keys() argument 91 if (lhs->virtual < rhs->virtual) in cmp_keys() 94 if (lhs->virtual > rhs->virtual) in cmp_keys() 97 if (lhs->dev < rhs->dev) in cmp_keys() 100 if (lhs->dev > rhs->dev) in cmp_keys() 103 if (lhs->block_end <= rhs->block_begin) in cmp_keys() 106 if (lhs->block_begin >= rhs->block_end) in cmp_keys()
|
/linux/include/linux/ceph/ |
H A D | msgr.h | 90 static inline bool ceph_addr_equal_no_type(const struct ceph_entity_addr *lhs, in ceph_addr_equal_no_type() argument 93 return !memcmp(&lhs->in_addr, &rhs->in_addr, sizeof(lhs->in_addr)) && in ceph_addr_equal_no_type() 94 lhs->nonce == rhs->nonce; in ceph_addr_equal_no_type()
|
H A D | osdmap.h | 34 int ceph_pg_compare(const struct ceph_pg *lhs, const struct ceph_pg *rhs); 35 int ceph_spg_compare(const struct ceph_spg *lhs, const struct ceph_spg *rhs);
|
/linux/tools/lib/perf/ |
H A D | cpumap.c | 315 bool perf_cpu_map__equal(const struct perf_cpu_map *lhs, const struct perf_cpu_map *rhs) in perf_cpu_map__has_any_cpu_or_is_empty() 319 if (lhs == rhs) in perf_cpu_map__idx() 322 if (!lhs || !rhs) in perf_cpu_map__idx() 325 nr = __perf_cpu_map__nr(lhs); in perf_cpu_map__idx() 330 if (__perf_cpu_map__cpu(lhs, idx).cpu != __perf_cpu_map__cpu(rhs, idx).cpu) in perf_cpu_map__idx() 349 perf_cpu_map__equal(const struct perf_cpu_map * lhs,const struct perf_cpu_map * rhs) perf_cpu_map__equal() argument
|
/linux/drivers/bluetooth/ |
H A D | hci_mrvl.c | 52 __le16 lhs; member 170 if ((pkt->lhs ^ pkt->rhs) != 0xffff) { in mrvl_recv_fw_req() 184 mrvl->tx_len = le16_to_cpu(pkt->lhs); in mrvl_recv_fw_req() 200 u16 version = le16_to_cpu(pkt->lhs); in mrvl_recv_chip_ver() 203 if ((pkt->lhs ^ pkt->rhs) != 0xffff) { in mrvl_recv_chip_ver()
|
/linux/arch/riscv/kernel/tests/module_test/ |
H A D | test_module_linking_main.c | 29 #define CHECK_EQ(lhs, rhs) KUNIT_ASSERT_EQ(test, lhs, rhs) argument
|
/linux/drivers/net/ethernet/sfc/ |
H A D | tc.c | 845 * (the hardware equivalent of chain_index), while LHS rules may go in either 866 * LHS rule). If rule is +trk, then a CT action could in efx_tc_rule_is_lhs_rule() 880 /* A foreign LHS rule has matches on enc_ keys at the TC layer (including an 882 * so that we can use the same MAE machinery as local LHS rules (and so that 886 * efx_tc_match_fields and (b) semantically an LHS rule doesn't have inner 938 /* If a foreign LHS rule wants to match on keys that are only available after 1036 NL_SET_ERR_MSG_MOD(extack, "Can't clear ct in LHS rule"); in efx_tc_flower_handle_lhs_actions() 1042 NL_SET_ERR_MSG_MOD(extack, "Can't perform NAT in LHS rule - packet isn't conntracked yet"); in efx_tc_flower_handle_lhs_actions() 1046 NL_SET_ERR_MSG_FMT_MOD(extack, "Unhandled ct.action %u for LHS rule\n", in efx_tc_flower_handle_lhs_actions() 1059 NL_SET_ERR_MSG_FMT_MOD(extack, "Unhandled action %u for LHS rule\n", in efx_tc_flower_handle_lhs_actions() [all …]
|
/linux/drivers/iommu/iommufd/ |
H A D | io_pagetable.c | 1231 struct iopt_area *lhs; in iopt_area_split() local 1247 lhs = iopt_area_alloc(); in iopt_area_split() 1248 if (!lhs) in iopt_area_split() 1277 rc = iopt_insert_area(iopt, lhs, area->pages, start_iova, in iopt_area_split() 1296 interval_tree_insert(&lhs->pages_node, &pages->domains_itree); in iopt_area_split() 1300 lhs->storage_domain = area->storage_domain; in iopt_area_split() 1301 lhs->pages = area->pages; in iopt_area_split() 1315 interval_tree_remove(&lhs->node, &iopt->area_itree); in iopt_area_split() 1322 kfree(lhs); in iopt_area_split()
|
/linux/kernel/bpf/ |
H A D | offload.c | 727 bool bpf_prog_dev_bound_match(const struct bpf_prog *lhs, const struct bpf_prog *rhs) in bpf_prog_dev_bound_match() argument 731 if (bpf_prog_is_offloaded(lhs->aux) != bpf_prog_is_offloaded(rhs->aux)) in bpf_prog_dev_bound_match() 735 ret = lhs->aux->offload && rhs->aux->offload && in bpf_prog_dev_bound_match() 736 lhs->aux->offload->netdev && in bpf_prog_dev_bound_match() 737 lhs->aux->offload->netdev == rhs->aux->offload->netdev; in bpf_prog_dev_bound_match()
|
/linux/drivers/gpu/drm/amd/display/dc/core/ |
H A D | dc_link_enc_cfg.c | 224 static bool are_ep_ids_equal(struct display_endpoint_id *lhs, struct display_endpoint_id *rhs) in are_ep_ids_equal() argument 228 if (lhs->link_id.id == rhs->link_id.id && in are_ep_ids_equal() 229 lhs->link_id.enum_id == rhs->link_id.enum_id && in are_ep_ids_equal() 230 lhs->link_id.type == rhs->link_id.type && in are_ep_ids_equal() 231 lhs->ep_type == rhs->ep_type) in are_ep_ids_equal()
|
/linux/drivers/net/ethernet/freescale/ |
H A D | fec_ptp.c | 352 u64 lhs, rhs; in fec_ptp_adjfine() local 369 lhs = NSEC_PER_SEC; in fec_ptp_adjfine() 372 if (lhs >= rhs) { in fec_ptp_adjfine() 374 corr_period = div_u64(lhs, rhs); in fec_ptp_adjfine() 377 lhs += NSEC_PER_SEC; in fec_ptp_adjfine()
|
/linux/net/ceph/ |
H A D | osdmap.c | 677 int ceph_pg_compare(const struct ceph_pg *lhs, const struct ceph_pg *rhs) in ceph_pg_compare() argument 679 if (lhs->pool < rhs->pool) in ceph_pg_compare() 681 if (lhs->pool > rhs->pool) in ceph_pg_compare() 683 if (lhs->seed < rhs->seed) in ceph_pg_compare() 685 if (lhs->seed > rhs->seed) in ceph_pg_compare() 691 int ceph_spg_compare(const struct ceph_spg *lhs, const struct ceph_spg *rhs) in ceph_spg_compare() argument 695 ret = ceph_pg_compare(&lhs->pgid, &rhs->pgid); in ceph_spg_compare() 699 if (lhs->shard < rhs->shard) in ceph_spg_compare() 701 if (lhs->shard > rhs->shard) in ceph_spg_compare() 2235 static bool __osds_equal(const struct ceph_osds *lhs, in __osds_equal() argument [all …]
|
/linux/kernel/trace/ |
H A D | trace_dynevent.c | 315 * The lhs argument string will be appended to the current cmd string, 339 ret = seq_buf_printf(&cmd->seq, " %s%c%s%c", arg_pair->lhs, in dynevent_arg_pair_add() 343 pr_err("field string is too long: %s%c%s%c\n", arg_pair->lhs, in dynevent_arg_pair_add()
|
/linux/kernel/kcsan/ |
H A D | debugfs.c | 89 static int cmp_filterlist_addrs(const void *rhs, const void *lhs) in cmp_filterlist_addrs() argument 92 const unsigned long b = *(const unsigned long *)lhs; in cmp_filterlist_addrs()
|
/linux/drivers/md/bcache/ |
H A D | alloc.c | 176 struct bucket **lhs = (struct bucket **)l; in new_bucket_max_cmp() local 180 return new_bucket_prio(ca, *lhs) > new_bucket_prio(ca, *rhs); in new_bucket_max_cmp() 185 struct bucket **lhs = (struct bucket **)l; in new_bucket_min_cmp() local 189 return new_bucket_prio(ca, *lhs) < new_bucket_prio(ca, *rhs); in new_bucket_min_cmp()
|
/linux/tools/perf/tests/ |
H A D | cpumap.c | 159 static int __test__cpu_map_merge(const char *lhs, const char *rhs, int nr, const char *expected) in test__cpu_map_merge() 161 struct perf_cpu_map *a = perf_cpu_map__new(lhs); in test__cpu_map_merge() 207 static int __test__cpu_map_intersect(const char *lhs, const char *rhs, int nr, const char *expected) in test__cpu_map_intersect() 209 struct perf_cpu_map *a = perf_cpu_map__new(lhs); in test__cpu_map_intersect() 174 __test__cpu_map_intersect(const char * lhs,const char * rhs,int nr,const char * expected) __test__cpu_map_intersect() argument
|