arch/arm64/kvm/emulate-nested.c
1312
.pol = p, \
arch/arm64/kvm/emulate-nested.c
2178
if (tc.pol)
arch/arm64/kvm/emulate-nested.c
2184
if (tc.pol)
arch/arm64/kvm/emulate-nested.c
2457
if (tc.pol)
arch/mips/alchemy/devboards/db1200.c
676
static void db1200_spi_cs_en(struct au1550_spi_info *spi, int cs, int pol)
arch/mips/alchemy/devboards/db1550.c
261
static void db1550_spi_cs_en(struct au1550_spi_info *spi, int cs, int pol)
arch/mips/include/asm/mips-gic.h
194
GIC_ACCESSOR_RW_INTR_BIT(0x100, pol)
arch/mips/include/asm/txx9pio.h
20
__u32 pol;
block/blk-cgroup-rwstat.c
114
if (pol)
block/blk-cgroup-rwstat.c
115
rwstat = (void *)blkg_to_pd(pos_blkg, pol) + off;
block/blk-cgroup-rwstat.c
97
void blkg_rwstat_recursive_sum(struct blkcg_gq *blkg, struct blkcg_policy *pol,
block/blk-cgroup-rwstat.h
48
void blkg_rwstat_recursive_sum(struct blkcg_gq *blkg, struct blkcg_policy *pol,
block/blk-cgroup.c
1219
struct blkcg_policy *pol = blkcg_policy[i];
block/blk-cgroup.c
1221
if (!blkg->pd[i] || !pol->pd_stat_fn)
block/blk-cgroup.c
1224
pol->pd_stat_fn(blkg->pd[i], s);
block/blk-cgroup.c
1429
struct blkcg_policy *pol = blkcg_policy[i];
block/blk-cgroup.c
1438
if (!pol || !pol->cpd_alloc_fn)
block/blk-cgroup.c
1441
cpd = pol->cpd_alloc_fn(GFP_KERNEL);
block/blk-cgroup.c
1578
int blkcg_activate_policy(struct gendisk *disk, const struct blkcg_policy *pol)
block/blk-cgroup.c
1586
if (blkcg_policy_enabled(q, pol))
block/blk-cgroup.c
1594
if (WARN_ON_ONCE(!pol->pd_alloc_fn || !pol->pd_free_fn))
block/blk-cgroup.c
1606
if (blkg->pd[pol->plid])
block/blk-cgroup.c
1614
pd = pol->pd_alloc_fn(disk, blkg->blkcg,
block/blk-cgroup.c
1631
pol->pd_free_fn(pd_prealloc);
block/blk-cgroup.c
1632
pd_prealloc = pol->pd_alloc_fn(disk, blkg->blkcg,
block/blk-cgroup.c
1643
pd->plid = pol->plid;
block/blk-cgroup.c
1644
blkg->pd[pol->plid] = pd;
block/blk-cgroup.c
1646
if (pol->pd_init_fn)
block/blk-cgroup.c
1647
pol->pd_init_fn(pd);
block/blk-cgroup.c
1649
if (pol->pd_online_fn)
block/blk-cgroup.c
1650
pol->pd_online_fn(pd);
block/blk-cgroup.c
1656
__set_bit(pol->plid, q->blkcg_pols);
block/blk-cgroup.c
1666
pol->pd_free_fn(pd_prealloc);
block/blk-cgroup.c
1677
pd = blkg->pd[pol->plid];
block/blk-cgroup.c
1679
if (pd->online && pol->pd_offline_fn)
block/blk-cgroup.c
1680
pol->pd_offline_fn(pd);
block/blk-cgroup.c
1682
pol->pd_free_fn(pd);
block/blk-cgroup.c
1683
blkg->pd[pol->plid] = NULL;
block/blk-cgroup.c
1702
const struct blkcg_policy *pol)
block/blk-cgroup.c
1708
if (!blkcg_policy_enabled(q, pol))
block/blk-cgroup.c
1717
__clear_bit(pol->plid, q->blkcg_pols);
block/blk-cgroup.c
1723
if (blkg->pd[pol->plid]) {
block/blk-cgroup.c
1724
if (blkg->pd[pol->plid]->online && pol->pd_offline_fn)
block/blk-cgroup.c
1725
pol->pd_offline_fn(blkg->pd[pol->plid]);
block/blk-cgroup.c
1726
pol->pd_free_fn(blkg->pd[pol->plid]);
block/blk-cgroup.c
1727
blkg->pd[pol->plid] = NULL;
block/blk-cgroup.c
1740
static void blkcg_free_all_cpd(struct blkcg_policy *pol)
block/blk-cgroup.c
1745
if (blkcg->cpd[pol->plid]) {
block/blk-cgroup.c
1746
pol->cpd_free_fn(blkcg->cpd[pol->plid]);
block/blk-cgroup.c
1747
blkcg->cpd[pol->plid] = NULL;
block/blk-cgroup.c
1759
int blkcg_policy_register(struct blkcg_policy *pol)
block/blk-cgroup.c
1768
if ((!pol->cpd_alloc_fn ^ !pol->cpd_free_fn) ||
block/blk-cgroup.c
1769
(!pol->pd_alloc_fn ^ !pol->pd_free_fn))
block/blk-cgroup.c
1786
pol->plid = i;
block/blk-cgroup.c
1787
blkcg_policy[pol->plid] = pol;
block/blk-cgroup.c
1790
if (pol->cpd_alloc_fn) {
block/blk-cgroup.c
1794
cpd = pol->cpd_alloc_fn(GFP_KERNEL);
block/blk-cgroup.c
1800
blkcg->cpd[pol->plid] = cpd;
block/blk-cgroup.c
1802
cpd->plid = pol->plid;
block/blk-cgroup.c
1809
if (pol->dfl_cftypes == pol->legacy_cftypes) {
block/blk-cgroup.c
1811
pol->dfl_cftypes));
block/blk-cgroup.c
1814
pol->dfl_cftypes));
block/blk-cgroup.c
1816
pol->legacy_cftypes));
block/blk-cgroup.c
1822
if (pol->cpd_free_fn)
block/blk-cgroup.c
1823
blkcg_free_all_cpd(pol);
block/blk-cgroup.c
1825
blkcg_policy[pol->plid] = NULL;
block/blk-cgroup.c
1839
void blkcg_policy_unregister(struct blkcg_policy *pol)
block/blk-cgroup.c
1843
if (WARN_ON(blkcg_policy[pol->plid] != pol))
block/blk-cgroup.c
1847
if (pol->dfl_cftypes)
block/blk-cgroup.c
1848
cgroup_rm_cftypes(pol->dfl_cftypes);
block/blk-cgroup.c
1849
if (pol->legacy_cftypes)
block/blk-cgroup.c
1850
cgroup_rm_cftypes(pol->legacy_cftypes);
block/blk-cgroup.c
1855
if (pol->cpd_free_fn)
block/blk-cgroup.c
1856
blkcg_free_all_cpd(pol);
block/blk-cgroup.c
1858
blkcg_policy[pol->plid] = NULL;
block/blk-cgroup.c
333
struct blkcg_policy *pol = blkcg_policy[i];
block/blk-cgroup.c
336
if (!blkcg_policy_enabled(disk->queue, pol))
block/blk-cgroup.c
340
pd = pol->pd_alloc_fn(disk, blkcg, gfp_mask);
block/blk-cgroup.c
411
struct blkcg_policy *pol = blkcg_policy[i];
block/blk-cgroup.c
413
if (blkg->pd[i] && pol->pd_init_fn)
block/blk-cgroup.c
414
pol->pd_init_fn(blkg->pd[i]);
block/blk-cgroup.c
425
struct blkcg_policy *pol = blkcg_policy[i];
block/blk-cgroup.c
428
if (pol->pd_online_fn)
block/blk-cgroup.c
429
pol->pd_online_fn(blkg->pd[i]);
block/blk-cgroup.c
540
struct blkcg_policy *pol = blkcg_policy[i];
block/blk-cgroup.c
544
if (pol->pd_offline_fn)
block/blk-cgroup.c
545
pol->pd_offline_fn(blkg->pd[i]);
block/blk-cgroup.c
606
struct blkcg_policy *pol = blkcg_policy[i];
block/blk-cgroup.c
608
if (pol)
block/blk-cgroup.c
609
__clear_bit(pol->plid, q->blkcg_pols);
block/blk-cgroup.c
668
struct blkcg_policy *pol = blkcg_policy[i];
block/blk-cgroup.c
670
if (blkg->pd[i] && pol->pd_reset_stats_fn)
block/blk-cgroup.c
671
pol->pd_reset_stats_fn(blkg->pd[i]);
block/blk-cgroup.c
708
const struct blkcg_policy *pol, int data,
block/blk-cgroup.c
717
if (blkcg_policy_enabled(blkg->q, pol))
block/blk-cgroup.c
718
total += prfill(sf, blkg->pd[pol->plid], data);
block/blk-cgroup.c
861
int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol,
block/blk-cgroup.c
881
if (!blkcg_policy_enabled(q, pol)) {
block/blk-cgroup.c
922
if (!blkcg_policy_enabled(q, pol)) {
block/blk-cgroup.h
199
int blkcg_policy_register(struct blkcg_policy *pol);
block/blk-cgroup.h
200
void blkcg_policy_unregister(struct blkcg_policy *pol);
block/blk-cgroup.h
201
int blkcg_activate_policy(struct gendisk *disk, const struct blkcg_policy *pol);
block/blk-cgroup.h
203
const struct blkcg_policy *pol);
block/blk-cgroup.h
209
const struct blkcg_policy *pol, int data,
block/blk-cgroup.h
223
int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol,
block/blk-cgroup.h
282
struct blkcg_policy *pol)
block/blk-cgroup.h
284
return blkg ? blkg->pd[pol->plid] : NULL;
block/blk-cgroup.h
288
struct blkcg_policy *pol)
block/blk-cgroup.h
290
return blkcg ? blkcg->cpd[pol->plid] : NULL;
block/blk-cgroup.h
458
const struct blkcg_policy *pol)
block/blk-cgroup.h
460
return pol && test_bit(pol->plid, q->blkcg_pols);
block/blk-cgroup.h
483
static inline int blkcg_policy_register(struct blkcg_policy *pol) { return 0; }
block/blk-cgroup.h
484
static inline void blkcg_policy_unregister(struct blkcg_policy *pol) { }
block/blk-cgroup.h
486
const struct blkcg_policy *pol) { return 0; }
block/blk-cgroup.h
488
const struct blkcg_policy *pol) { }
block/blk-cgroup.h
491
struct blkcg_policy *pol) { return NULL; }
drivers/acpi/resource.c
786
u8 pol = p ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH;
drivers/acpi/resource.c
788
if (triggering != trig || polarity != pol) {
drivers/acpi/resource.c
793
pol == polarity ? "" : "(!)");
drivers/acpi/resource.c
795
polarity = pol;
drivers/bcma/driver_gpio.c
116
u32 pol = bcma_cc_read32(cc, BCMA_CC_GPIOPOL);
drivers/bcma/driver_gpio.c
117
unsigned long irqs = (val ^ pol) & mask;
drivers/counter/104-quad-8.c
648
const u32 pol = (polarity == COUNTER_SIGNAL_POLARITY_POSITIVE) ? POSITIVE_INDEX_POLARITY :
drivers/counter/104-quad-8.c
651
return quad8_index_polarity_set(counter, signal, pol);
drivers/counter/ti-ecap-capture.c
237
size_t idx, enum counter_signal_polarity *pol)
drivers/counter/ti-ecap-capture.c
246
*pol = bitval ? COUNTER_SIGNAL_POLARITY_NEGATIVE : COUNTER_SIGNAL_POLARITY_POSITIVE;
drivers/counter/ti-ecap-capture.c
253
size_t idx, enum counter_signal_polarity pol)
drivers/counter/ti-ecap-capture.c
258
if (pol == COUNTER_SIGNAL_POLARITY_NEGATIVE)
drivers/cpufreq/cpufreq.c
1125
unsigned int pol = CPUFREQ_POLICY_UNKNOWN;
drivers/cpufreq/cpufreq.c
1148
pol = policy->last_policy;
drivers/cpufreq/cpufreq.c
1150
pol = cpufreq_parse_policy(default_governor);
drivers/cpufreq/cpufreq.c
1156
if (pol == CPUFREQ_POLICY_UNKNOWN)
drivers/cpufreq/cpufreq.c
1157
pol = policy->policy;
drivers/cpufreq/cpufreq.c
1159
if (pol != CPUFREQ_POLICY_PERFORMANCE &&
drivers/cpufreq/cpufreq.c
1160
pol != CPUFREQ_POLICY_POWERSAVE)
drivers/cpufreq/cpufreq.c
1164
ret = cpufreq_set_policy(policy, gov, pol);
drivers/cpufreq/powernow-k8.c
1022
static int powernowk8_cpu_init(struct cpufreq_policy *pol)
drivers/cpufreq/powernow-k8.c
1028
smp_call_function_single(pol->cpu, check_supported_cpu, &rc, 1);
drivers/cpufreq/powernow-k8.c
1036
data->cpu = pol->cpu;
drivers/cpufreq/powernow-k8.c
1047
if (pol->cpu != 0) {
drivers/cpufreq/powernow-k8.c
1057
pol->cpuinfo.transition_latency = (
drivers/cpufreq/powernow-k8.c
1061
pol->cpuinfo.transition_latency = get_transition_latency(data);
drivers/cpufreq/powernow-k8.c
1071
cpumask_copy(pol->cpus, topology_core_cpumask(pol->cpu));
drivers/cpufreq/powernow-k8.c
1072
data->available_cores = pol->cpus;
drivers/cpufreq/powernow-k8.c
1073
pol->freq_table = data->powernow_table;
drivers/cpufreq/powernow-k8.c
1079
for_each_cpu(cpu, pol->cpus)
drivers/cpufreq/powernow-k8.c
1092
static void powernowk8_cpu_exit(struct cpufreq_policy *pol)
drivers/cpufreq/powernow-k8.c
1094
struct powernow_k8_data *data = per_cpu(powernow_data, pol->cpu);
drivers/cpufreq/powernow-k8.c
1105
for_each_cpu(cpu, pol->related_cpus)
drivers/cpufreq/powernow-k8.c
923
struct cpufreq_policy *pol;
drivers/cpufreq/powernow-k8.c
930
struct cpufreq_policy *pol = pta->pol;
drivers/cpufreq/powernow-k8.c
932
struct powernow_k8_data *data = per_cpu(powernow_data, pol->cpu);
drivers/cpufreq/powernow-k8.c
949
pol->cpu, data->powernow_table[newstate].frequency, pol->min,
drivers/cpufreq/powernow-k8.c
950
pol->max);
drivers/cpufreq/powernow-k8.c
969
ret = transition_frequency_fidvid(data, newstate, pol);
drivers/cpufreq/powernow-k8.c
978
pol->cur = find_khz_freq_from_fid(data->currfid);
drivers/cpufreq/powernow-k8.c
984
static int powernowk8_target(struct cpufreq_policy *pol, unsigned index)
drivers/cpufreq/powernow-k8.c
986
struct powernowk8_target_arg pta = { .pol = pol, .newstate = index };
drivers/cpufreq/powernow-k8.c
988
return work_on_cpu(pol->cpu, powernowk8_target_fn, &pta);
drivers/gpio/gpio-dwapb.c
185
u32 pol;
drivers/gpio/gpio-dwapb.c
192
pol = dwapb_read(gpio, GPIO_INT_POLARITY);
drivers/gpio/gpio-dwapb.c
196
pol &= ~BIT(offs);
drivers/gpio/gpio-dwapb.c
198
pol |= BIT(offs);
drivers/gpio/gpio-dwapb.c
200
dwapb_write(gpio, GPIO_INT_POLARITY, pol);
drivers/gpio/gpio-grgpio.c
124
u32 pol;
drivers/gpio/gpio-grgpio.c
129
pol = 0;
drivers/gpio/gpio-grgpio.c
133
pol = mask;
drivers/gpio/gpio-grgpio.c
137
pol = 0;
drivers/gpio/gpio-grgpio.c
141
pol = mask;
drivers/gpio/gpio-grgpio.c
153
gpio_generic_write_reg(&priv->chip, priv->regs + GRGPIO_IPOL, ipol | pol);
drivers/gpio/gpio-loongson-64bit.c
183
u8 pol = 0, edge = 0, dual = 0;
drivers/gpio/gpio-loongson-64bit.c
192
pol = 1;
drivers/gpio/gpio-loongson-64bit.c
199
pol = 1;
drivers/gpio/gpio-loongson-64bit.c
211
writeb(pol, lgpio->reg_base + lgpio->chip_data->intpol_offset + hwirq);
drivers/gpio/gpio-xlp.c
142
int pol, irq_type;
drivers/gpio/gpio-xlp.c
147
pol = XLP_GPIO_IRQ_POL_HIGH;
drivers/gpio/gpio-xlp.c
151
pol = XLP_GPIO_IRQ_POL_LOW;
drivers/gpio/gpio-xlp.c
155
pol = XLP_GPIO_IRQ_POL_HIGH;
drivers/gpio/gpio-xlp.c
159
pol = XLP_GPIO_IRQ_POL_LOW;
drivers/gpio/gpio-xlp.c
166
xlp_gpio_set_reg(priv->gpio_intr_pol, d->hwirq, pol);
drivers/gpu/drm/bridge/chipone-icn6211.c
351
u8 pol, sys_ctrl_1, id[4];
drivers/gpu/drm/bridge/chipone-icn6211.c
420
pol = ((mode->flags & DRM_MODE_FLAG_PHSYNC) ? BIST_POL_HSYNC_POL : 0) |
drivers/gpu/drm/bridge/chipone-icn6211.c
423
chipone_writeb(icn, BIST_POL, pol);
drivers/gpu/drm/bridge/lontium-lt9611.c
196
u8 pol = 0x10;
drivers/gpu/drm/bridge/lontium-lt9611.c
199
pol |= 0x2;
drivers/gpu/drm/bridge/lontium-lt9611.c
201
pol |= 0x1;
drivers/gpu/drm/bridge/lontium-lt9611.c
202
regmap_write(lt9611->regmap, 0x831d, pol);
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c
100
pol |= DCU_SYN_POL_INV_HS_LOW;
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c
103
pol |= DCU_SYN_POL_INV_VS_LOW;
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c
116
regmap_write(fsl_dev->regmap, DCU_SYN_POL, pol);
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c
88
unsigned int pol = 0;
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c
97
pol |= DCU_SYN_POL_INV_PXCK;
drivers/gpu/drm/gma500/intel_bios.h
249
u8 pol:1;
drivers/gpu/drm/gma500/psb_intel_lvds.c
112
if (dev_priv->lvds_bl->pol == BLC_POLARITY_INVERSE)
drivers/gpu/drm/gma500/psb_intel_lvds.c
144
if (dev_priv->lvds_bl->pol == BLC_POLARITY_INVERSE)
drivers/gpu/drm/mediatek/mtk_dpi.c
271
unsigned int pol;
drivers/gpu/drm/mediatek/mtk_dpi.c
275
pol = (dpi_pol->hsync_pol == MTK_DPI_POLARITY_RISING ? 0 : HSYNC_POL) |
drivers/gpu/drm/mediatek/mtk_dpi.c
279
pol |= (dpi_pol->ck_pol == MTK_DPI_POLARITY_RISING ?
drivers/gpu/drm/mediatek/mtk_dpi.c
285
mtk_dpi_mask(dpi, DPI_OUTPUT_SETTING, pol, mask);
drivers/gpu/drm/omapdrm/dss/dsi.c
2959
u8 lane, pol;
drivers/gpu/drm/omapdrm/dss/dsi.c
2974
pol = 1;
drivers/gpu/drm/omapdrm/dss/dsi.c
2978
pol = 0;
drivers/gpu/drm/omapdrm/dss/dsi.c
2984
lanes[lane].polarity = pol;
drivers/gpu/drm/omapdrm/dss/hdmi_phy.c
37
u8 lane, pol;
drivers/gpu/drm/omapdrm/dss/hdmi_phy.c
52
pol = 1;
drivers/gpu/drm/omapdrm/dss/hdmi_phy.c
56
pol = 0;
drivers/gpu/drm/omapdrm/dss/hdmi_phy.c
62
phy->lane_polarity[lane] = pol;
drivers/hwmon/ltc2947-core.c
1031
ret = device_property_read_u32(st->dev, "adi,gpio-out-pol", &pol);
drivers/hwmon/ltc2947-core.c
1035
LTC2947_GPIO_FAN_POL(pol);
drivers/hwmon/ltc2947-core.c
936
u32 dummy, deadband, pol;
drivers/input/touchscreen/wm97xx-core.c
229
enum wm97xx_gpio_pol pol, enum wm97xx_gpio_sticky sticky,
drivers/input/touchscreen/wm97xx-core.c
237
if (pol == WM97XX_GPIO_POL_HIGH)
drivers/input/touchscreen/wm97xx-core.c
305
u16 status, pol;
drivers/input/touchscreen/wm97xx-core.c
308
pol = wm97xx_reg_read(wm, AC97_GPIO_POLARITY);
drivers/input/touchscreen/wm97xx-core.c
310
if (WM97XX_GPIO_13 & pol & status) {
drivers/input/touchscreen/wm97xx-core.c
312
wm97xx_reg_write(wm, AC97_GPIO_POLARITY, pol &
drivers/input/touchscreen/wm97xx-core.c
316
wm97xx_reg_write(wm, AC97_GPIO_POLARITY, pol |
drivers/irqchip/irq-mips-gic.c
310
unsigned int irq, pol, trig, dual;
drivers/irqchip/irq-mips-gic.c
318
pol = GIC_POL_FALLING_EDGE;
drivers/irqchip/irq-mips-gic.c
323
pol = GIC_POL_RISING_EDGE;
drivers/irqchip/irq-mips-gic.c
328
pol = 0; /* Doesn't matter */
drivers/irqchip/irq-mips-gic.c
333
pol = GIC_POL_ACTIVE_LOW;
drivers/irqchip/irq-mips-gic.c
339
pol = GIC_POL_ACTIVE_HIGH;
drivers/irqchip/irq-mips-gic.c
346
change_gic_redir_pol(irq, pol);
drivers/irqchip/irq-mips-gic.c
351
change_gic_pol(irq, pol);
drivers/irqchip/irq-tb10x.c
44
uint32_t mod, pol, im = data->mask;
drivers/irqchip/irq-tb10x.c
49
pol = ab_irqctl_readreg(gc, AB_IRQCTL_SRC_POLARITY) | im;
drivers/irqchip/irq-tb10x.c
53
pol ^= im;
drivers/irqchip/irq-tb10x.c
63
pol ^= im;
drivers/irqchip/irq-tb10x.c
76
ab_irqctl_writereg(gc, AB_IRQCTL_SRC_POLARITY, pol);
drivers/media/pci/zoran/videocodec.h
260
struct vfe_settings *cap, struct vfe_polarity *pol);
drivers/media/pci/zoran/zr36016.c
214
struct vfe_settings *cap, struct vfe_polarity *pol)
drivers/media/pci/zoran/zr36050.c
544
struct vfe_settings *cap, struct vfe_polarity *pol)
drivers/media/pci/zoran/zr36060.c
484
struct vfe_settings *cap, struct vfe_polarity *pol)
drivers/media/pci/zoran/zr36060.c
508
reg = (!pol->vsync_pol ? ZR060_VPR_VS_POL : 0)
drivers/media/pci/zoran/zr36060.c
509
| (!pol->hsync_pol ? ZR060_VPR_HS_POL : 0)
drivers/media/pci/zoran/zr36060.c
510
| (pol->field_pol ? ZR060_VPR_FI_POL : 0)
drivers/media/pci/zoran/zr36060.c
511
| (pol->blank_pol ? ZR060_VPR_BL_POL : 0)
drivers/media/pci/zoran/zr36060.c
512
| (pol->subimg_pol ? ZR060_VPR_S_IMG_POL : 0)
drivers/media/pci/zoran/zr36060.c
513
| (pol->poe_pol ? ZR060_VPR_POE_POL : 0)
drivers/media/pci/zoran/zr36060.c
514
| (pol->pvalid_pol ? ZR060_VPR_P_VAL_POL : 0)
drivers/media/pci/zoran/zr36060.c
515
| (pol->vclk_pol ? ZR060_VPR_VCLK_POL : 0);
drivers/media/platform/qcom/camss/camss-csiphy.h
26
u8 pol;
drivers/media/platform/qcom/camss/camss.c
4427
lncfg->clk.pol = mipi_csi2->lane_polarities[0];
drivers/media/platform/qcom/camss/camss.c
4438
lncfg->data[i].pol = mipi_csi2->lane_polarities[i + 1];
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.h
25
#define CSI_CFG_VREF_POL(pol) ((pol) << 2)
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.h
26
#define CSI_CFG_HREF_POL(pol) ((pol) << 1)
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.h
27
#define CSI_CFG_PCLK_POL(pol) ((pol) << 0)
drivers/media/platform/ti/omap3isp/isp.c
2057
buscfg->bus.csi2.lanecfg.clk.pol =
drivers/media/platform/ti/omap3isp/isp.c
2060
buscfg->bus.csi2.lanecfg.clk.pol,
drivers/media/platform/ti/omap3isp/isp.c
2068
buscfg->bus.csi2.lanecfg.data[i].pol =
drivers/media/platform/ti/omap3isp/isp.c
2072
buscfg->bus.csi2.lanecfg.data[i].pol,
drivers/media/platform/ti/omap3isp/isp.c
2087
buscfg->bus.ccp2.lanecfg.clk.pol = vep->bus.mipi_csi1.lane_polarity[0];
drivers/media/platform/ti/omap3isp/isp.c
2089
buscfg->bus.ccp2.lanecfg.clk.pol,
drivers/media/platform/ti/omap3isp/isp.c
2093
buscfg->bus.ccp2.lanecfg.data[0].pol =
drivers/media/platform/ti/omap3isp/isp.c
2097
buscfg->bus.ccp2.lanecfg.data[0].pol,
drivers/media/platform/ti/omap3isp/ispcsiphy.c
191
if (lanes->data[i].pol > 1 || lanes->data[i].pos > 3)
drivers/media/platform/ti/omap3isp/ispcsiphy.c
200
if (lanes->clk.pol > 1 || lanes->clk.pos > 3)
drivers/media/platform/ti/omap3isp/ispcsiphy.c
249
reg |= (lanes->data[i].pol <<
drivers/media/platform/ti/omap3isp/ispcsiphy.c
257
reg |= lanes->clk.pol << ISPCSI2_PHY_CFG_CLOCK_POL_SHIFT;
drivers/media/platform/ti/omap3isp/omap3isp.h
70
u8 pol;
drivers/mfd/wm8350-gpio.c
162
static int gpio_set_polarity(struct wm8350 *wm8350, int gpio, int pol)
drivers/mfd/wm8350-gpio.c
164
if (pol == WM8350_GPIO_ACTIVE_HIGH)
drivers/mfd/wm8350-gpio.c
184
int pol, int pull, int invert, int debounce)
drivers/mfd/wm8350-gpio.c
206
if (gpio_set_polarity(wm8350, gpio, pol))
drivers/net/dsa/lantiq/mxl-gsw1xx.c
237
unsigned int pol;
drivers/net/dsa/lantiq/mxl-gsw1xx.c
272
phy_modes(interface), &pol);
drivers/net/dsa/lantiq/mxl-gsw1xx.c
283
if (pol == PHY_POL_NORMAL)
drivers/net/dsa/lantiq/mxl-gsw1xx.c
294
phy_modes(interface), &pol);
drivers/net/dsa/lantiq/mxl-gsw1xx.c
298
if (pol == PHY_POL_INVERT)
drivers/net/dsa/ocelot/felix.c
2007
struct ocelot_policer pol = {
drivers/net/dsa/ocelot/felix.c
2012
return ocelot_port_policer_add(ocelot, port, &pol);
drivers/net/dsa/ocelot/felix_vsc9959.c
2256
struct ocelot_policer pol;
drivers/net/dsa/ocelot/felix_vsc9959.c
2299
pol = (struct ocelot_policer) {
drivers/net/dsa/ocelot/felix_vsc9959.c
2303
ret = ocelot_vcap_policer_add(ocelot, index, &pol);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h
196
struct mlx5_flow_table *pol;
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
1184
ft = rx->chains ? ipsec_chains_get_table(rx->chains, prio) : rx->ft.pol;
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
1262
mlx5_del_flow_rules(tx->pol.rule);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
1263
mlx5_destroy_flow_group(tx->pol.group);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
1264
mlx5_destroy_flow_table(tx->ft.pol);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
1339
&tx->ft.pol);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
1353
tx->ft.pol = ft;
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
1356
err = ipsec_miss_create(mdev, tx->ft.pol, &tx->pol, &dest);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
1358
mlx5_destroy_flow_table(tx->ft.pol);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
1363
err = mlx5_ipsec_fs_roce_tx_create(mdev, roce, tx->ft.pol, false);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
1372
mlx5_del_flow_rules(tx->pol.rule);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
1373
mlx5_destroy_flow_group(tx->pol.group);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
1374
mlx5_destroy_flow_table(tx->ft.pol);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
1430
ipsec_esw_tx_ft_policy_set(mdev, tx->ft.pol);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
1464
ft = tx->chains ? ipsec_chains_get_table(tx->chains, prio) : tx->ft.pol;
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
2009
dest[0].ft = rx->ft.pol;
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
36
struct mlx5e_ipsec_miss pol;
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
524
pol_dest[0].ft = rx->ft.pol;
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
55
struct mlx5e_ipsec_miss pol;
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
652
mlx5_ipsec_fs_roce_tx_create(ipsec->mdev, ipsec->roce, ipsec->tx->ft.pol,
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
702
mlx5_del_flow_rules(rx->pol.rule);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
703
mlx5_destroy_flow_group(rx->pol.group);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
704
mlx5_destroy_flow_table(rx->ft.pol);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
906
&rx->ft.pol);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
916
rx->ft.pol = ft;
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
918
err = ipsec_miss_create(mdev, rx->ft.pol, &rx->pol,
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
921
mlx5_destroy_flow_table(rx->ft.pol);
drivers/net/ethernet/microchip/lan966x/lan966x_police.c
141
struct lan966x_tc_policer pol;
drivers/net/ethernet/microchip/lan966x/lan966x_police.c
150
memset(&pol, 0, sizeof(pol));
drivers/net/ethernet/microchip/lan966x/lan966x_police.c
152
pol.rate = div_u64(act->police.rate_bytes_ps, 1000) * 8;
drivers/net/ethernet/microchip/lan966x/lan966x_police.c
153
pol.burst = act->police.burst;
drivers/net/ethernet/microchip/lan966x/lan966x_police.c
155
err = lan966x_police_add(port, &pol, POL_IDX_PORT + port->chip_port);
drivers/net/ethernet/microchip/lan966x/lan966x_police.c
19
struct lan966x_tc_policer *pol,
drivers/net/ethernet/microchip/lan966x/lan966x_police.c
25
pol->rate = DIV_ROUND_UP(pol->rate * 3, 100);
drivers/net/ethernet/microchip/lan966x/lan966x_police.c
27
pol->burst = pol->burst ?: 1;
drivers/net/ethernet/microchip/lan966x/lan966x_police.c
29
pol->burst = DIV_ROUND_UP(pol->burst, 4096);
drivers/net/ethernet/microchip/lan966x/lan966x_police.c
31
if (pol->rate > GENMASK(15, 0) ||
drivers/net/ethernet/microchip/lan966x/lan966x_police.c
32
pol->burst > GENMASK(6, 0))
drivers/net/ethernet/microchip/lan966x/lan966x_police.c
45
lan_wr(ANA_POL_PIR_CFG_PIR_RATE_SET(pol->rate) |
drivers/net/ethernet/microchip/lan966x/lan966x_police.c
46
ANA_POL_PIR_CFG_PIR_BURST_SET(pol->burst),
drivers/net/ethernet/microchip/sparx5/sparx5_main.h
644
int sparx5_policer_conf_set(struct sparx5 *sparx5, struct sparx5_policer *pol);
drivers/net/ethernet/microchip/sparx5/sparx5_main.h
657
struct sparx5_policer pol;
drivers/net/ethernet/microchip/sparx5/sparx5_police.c
11
struct sparx5_policer *pol)
drivers/net/ethernet/microchip/sparx5/sparx5_police.c
18
g = ops->get_sdlb_group(pol->group);
drivers/net/ethernet/microchip/sparx5/sparx5_police.c
19
idx = pol->idx;
drivers/net/ethernet/microchip/sparx5/sparx5_police.c
21
rate = pol->rate * 1000;
drivers/net/ethernet/microchip/sparx5/sparx5_police.c
22
burst = pol->burst;
drivers/net/ethernet/microchip/sparx5/sparx5_police.c
43
int sparx5_policer_conf_set(struct sparx5 *sparx5, struct sparx5_policer *pol)
drivers/net/ethernet/microchip/sparx5/sparx5_police.c
46
switch (pol->type) {
drivers/net/ethernet/microchip/sparx5/sparx5_police.c
48
return sparx5_policer_service_conf_set(sparx5, pol);
drivers/net/ethernet/microchip/sparx5/sparx5_psfp.c
197
if (!fm->pol.rate && !fm->pol.burst)
drivers/net/ethernet/microchip/sparx5/sparx5_psfp.c
202
sparx5_policer_conf_set(sparx5, &fm->pol);
drivers/net/ethernet/microchip/sparx5/sparx5_psfp.c
204
return sparx5_sdlb_group_action(sparx5, fm->pol.group, fm->pol.idx);
drivers/net/ethernet/microchip/sparx5/sparx5_psfp.c
273
struct sparx5_policer *pol = &fm->pol;
drivers/net/ethernet/microchip/sparx5/sparx5_psfp.c
277
ret = sparx5_psfp_fm_get(sparx5, uidx, &fm->pol.idx);
drivers/net/ethernet/microchip/sparx5/sparx5_psfp.c
284
ret = sparx5_sdlb_group_get_by_rate(sparx5, pol->rate, pol->burst);
drivers/net/ethernet/microchip/sparx5/sparx5_psfp.c
288
fm->pol.group = ret;
drivers/net/ethernet/microchip/sparx5/sparx5_psfp.c
294
*id = fm->pol.idx;
drivers/net/ethernet/microchip/sparx5/sparx5_psfp.c
301
struct sparx5_psfp_fm fm = { .pol.idx = id,
drivers/net/ethernet/microchip/sparx5/sparx5_psfp.c
302
.pol.type = SPX5_POL_SERVICE };
drivers/net/ethernet/microchip/sparx5/sparx5_psfp.c
306
ret = sparx5_sdlb_group_get_by_index(sparx5, id, &fm.pol.group);
drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c
1221
err = sparx5_tc_flower_parse_act_police(&fm.pol, act,
drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c
1226
tc_pol_idx = fm.pol.idx;
drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c
745
static int sparx5_tc_flower_parse_act_police(struct sparx5_policer *pol,
drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c
749
pol->type = SPX5_POL_SERVICE;
drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c
750
pol->rate = div_u64(act->police.rate_bytes_ps, 1000) * 8;
drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c
751
pol->burst = act->police.burst;
drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c
752
pol->idx = act->hw_index;
drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c
755
if (pol->rate > DIV_ROUND_UP(SPX5_SDLB_GROUP_RATE_MAX, 1000)) {
drivers/net/ethernet/mscc/ocelot_flower.c
380
filter->action.pol.rate = div_u64(rate, 1000) * 8;
drivers/net/ethernet/mscc/ocelot_flower.c
381
filter->action.pol.burst = a->police.burst;
drivers/net/ethernet/mscc/ocelot_net.c
226
struct ocelot_policer pol = { 0 };
drivers/net/ethernet/mscc/ocelot_net.c
245
pol.rate = (u32)div_u64(action->police.rate_bytes_ps, 1000) * 8;
drivers/net/ethernet/mscc/ocelot_net.c
246
pol.burst = action->police.burst;
drivers/net/ethernet/mscc/ocelot_net.c
248
err = ocelot_port_policer_add(ocelot, port, &pol);
drivers/net/ethernet/mscc/ocelot_police.c
203
struct ocelot_policer *pol)
drivers/net/ethernet/mscc/ocelot_police.c
208
if (!pol)
drivers/net/ethernet/mscc/ocelot_police.c
212
pp.pir = pol->rate;
drivers/net/ethernet/mscc/ocelot_police.c
213
pp.pbs = pol->burst;
drivers/net/ethernet/mscc/ocelot_vcap.c
894
struct ocelot_policer *pol)
drivers/net/ethernet/mscc/ocelot_vcap.c
900
if (!pol)
drivers/net/ethernet/mscc/ocelot_vcap.c
904
pp.pir = pol->rate;
drivers/net/ethernet/mscc/ocelot_vcap.c
905
pp.pbs = pol->burst;
drivers/net/ethernet/mscc/ocelot_vcap.c
972
&filter->action.pol);
drivers/net/pcs/pcs-mtk-lynxi.c
128
unsigned int pol, default_pol = PHY_POL_NORMAL;
drivers/net/pcs/pcs-mtk-lynxi.c
139
default_pol, &pol);
drivers/net/pcs/pcs-mtk-lynxi.c
144
if (pol == PHY_POL_INVERT)
drivers/net/pcs/pcs-mtk-lynxi.c
149
default_pol, &pol);
drivers/net/pcs/pcs-mtk-lynxi.c
153
if (pol == PHY_POL_INVERT)
drivers/net/phy/air_en8811h.c
1257
unsigned int pol;
drivers/net/phy/air_en8811h.c
1261
phy_modes(phydev->interface), &pol);
drivers/net/phy/air_en8811h.c
1264
if (pol == PHY_POL_NORMAL)
drivers/net/phy/air_en8811h.c
1273
phy_modes(phydev->interface), &pol);
drivers/net/phy/air_en8811h.c
1277
if (pol == PHY_POL_NORMAL)
drivers/net/phy/air_en8811h.c
1287
unsigned int pol, default_pol;
drivers/net/phy/air_en8811h.c
1297
default_pol, &pol);
drivers/net/phy/air_en8811h.c
1300
if (pol == PHY_POL_INVERT)
drivers/net/phy/air_en8811h.c
1309
default_pol, &pol);
drivers/net/phy/air_en8811h.c
1312
if (pol == PHY_POL_NORMAL)
drivers/net/phy/air_en8811h.c
862
static int air_led_init(struct phy_device *phydev, u8 index, u8 state, u8 pol)
drivers/net/phy/air_en8811h.c
875
if (pol == AIR_ACTIVE_HIGH)
drivers/phy/marvell/phy-mvebu-cp110-comphy.c
154
#define COMPHY_FW_PARAM_FULL(mode, port, speed, pol, width) \
drivers/phy/marvell/phy-mvebu-cp110-comphy.c
155
((((pol) << COMPHY_FW_POL_OFFSET) & COMPHY_FW_POL_MASK) | \
drivers/pinctrl/mediatek/mtk-eint.c
45
.pol = 0x300,
drivers/pinctrl/mediatek/mtk-eint.h
27
unsigned int pol;
drivers/pinctrl/mediatek/pinctrl-mtk-common.h
178
unsigned int pol;
drivers/pinctrl/qcom/pinctrl-msm.c
803
unsigned pol;
drivers/pinctrl/qcom/pinctrl-msm.c
808
pol = msm_readl_intr_cfg(pctrl, g);
drivers/pinctrl/qcom/pinctrl-msm.c
809
pol ^= BIT(g->intr_polarity_bit);
drivers/pinctrl/qcom/pinctrl-msm.c
810
msm_writel_intr_cfg(pol, pctrl, g);
drivers/ssb/driver_gpio.c
129
u32 pol = chipco_read32(chipco, SSB_CHIPCO_GPIOPOL);
drivers/ssb/driver_gpio.c
130
unsigned long irqs = (val ^ pol) & mask;
drivers/ssb/driver_gpio.c
330
u32 pol = ssb_read32(extif->dev, SSB_EXTIF_GPIO_INTPOL);
drivers/ssb/driver_gpio.c
331
unsigned long irqs = (val ^ pol) & mask;
drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c
527
enum typec_cc_polarity pol)
drivers/usb/typec/tcpm/wcove.c
318
static int wcove_set_polarity(struct tcpc_dev *tcpc, enum typec_cc_polarity pol)
drivers/usb/typec/tcpm/wcove.c
322
return wcove_typec_func(wcove, WCOVE_FUNC_ORIENTATION, pol);
drivers/video/fbdev/omap2/omapfb/dss/dsi.c
3775
u8 lane, pol;
drivers/video/fbdev/omap2/omapfb/dss/dsi.c
3790
pol = 1;
drivers/video/fbdev/omap2/omapfb/dss/dsi.c
3794
pol = 0;
drivers/video/fbdev/omap2/omapfb/dss/dsi.c
3800
lanes[lane].polarity = pol;
drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c
46
u8 lane, pol;
drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c
61
pol = 1;
drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c
65
pol = 0;
drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c
71
phy->lane_polarity[lane] = pol;
fs/btrfs/volumes.h
859
static inline void btrfs_warn_unknown_chunk_allocation(enum btrfs_chunk_allocation_policy pol)
fs/btrfs/volumes.h
861
WARN_ONCE(1, "unknown allocation policy %d, fallback to regular", pol);
fs/proc/task_mmu.c
3306
struct mempolicy *pol;
fs/proc/task_mmu.c
3316
pol = __get_vma_policy(vma, vma->vm_start, &ilx);
fs/proc/task_mmu.c
3317
if (pol) {
fs/proc/task_mmu.c
3318
mpol_to_str(buffer, sizeof(buffer), pol);
fs/proc/task_mmu.c
3319
mpol_cond_put(pol);
include/linux/mempolicy.h
167
extern void mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol);
include/linux/mempolicy.h
176
static inline bool mpol_is_preferred_many(struct mempolicy *pol)
include/linux/mempolicy.h
178
return (pol->mode == MPOL_PREFERRED_MANY);
include/linux/mempolicy.h
200
static inline void mpol_put(struct mempolicy *pol)
include/linux/mempolicy.h
204
static inline void mpol_cond_put(struct mempolicy *pol)
include/linux/mempolicy.h
208
static inline void mpol_get(struct mempolicy *pol)
include/linux/mempolicy.h
301
static inline bool mpol_is_preferred_many(struct mempolicy *pol)
include/linux/mempolicy.h
66
extern void __mpol_put(struct mempolicy *pol);
include/linux/mempolicy.h
67
static inline void mpol_put(struct mempolicy *pol)
include/linux/mempolicy.h
69
if (pol)
include/linux/mempolicy.h
70
__mpol_put(pol);
include/linux/mempolicy.h
77
static inline int mpol_needs_cond_ref(struct mempolicy *pol)
include/linux/mempolicy.h
79
return (pol && (pol->flags & MPOL_F_SHARED));
include/linux/mempolicy.h
82
static inline void mpol_cond_put(struct mempolicy *pol)
include/linux/mempolicy.h
84
if (mpol_needs_cond_ref(pol))
include/linux/mempolicy.h
85
__mpol_put(pol);
include/linux/mempolicy.h
88
extern struct mempolicy *__mpol_dup(struct mempolicy *pol);
include/linux/mempolicy.h
89
static inline struct mempolicy *mpol_dup(struct mempolicy *pol)
include/linux/mempolicy.h
91
if (pol)
include/linux/mempolicy.h
92
pol = __mpol_dup(pol);
include/linux/mempolicy.h
93
return pol;
include/linux/mempolicy.h
96
static inline void mpol_get(struct mempolicy *pol)
include/linux/mempolicy.h
98
if (pol)
include/linux/mempolicy.h
99
atomic_inc(&pol->refcnt);
include/linux/mfd/wm8350/gpio.h
345
int pol, int pull, int invert, int debounce);
include/linux/netlink.h
143
#define NL_SET_BAD_ATTR_POLICY(extack, attr, pol) do { \
include/linux/netlink.h
146
(extack)->policy = (pol); \
include/linux/netlink.h
152
#define NL_SET_ERR_MSG_ATTR_POL(extack, attr, pol, msg) do { \
include/linux/netlink.h
161
__extack->policy = (pol); \
include/linux/netlink.h
165
#define NL_SET_ERR_MSG_ATTR_POL_FMT(extack, attr, pol, fmt, args...) do { \
include/linux/netlink.h
181
__extack->policy = (pol); \
include/linux/wm97xx.h
316
enum wm97xx_gpio_pol pol,
include/net/xfrm.h
1384
int xfrm_policy_delete(struct xfrm_policy *pol, int dir);
include/net/xfrm.h
1388
struct xfrm_policy *pol;
include/net/xfrm.h
1390
pol = rcu_dereference_protected(sk->sk_policy[0], 1);
include/net/xfrm.h
1391
if (unlikely(pol != NULL)) {
include/net/xfrm.h
1392
xfrm_policy_delete(pol, XFRM_POLICY_MAX);
include/net/xfrm.h
1395
pol = rcu_dereference_protected(sk->sk_policy[1], 1);
include/net/xfrm.h
1396
if (unlikely(pol != NULL)) {
include/net/xfrm.h
1397
xfrm_policy_delete(pol, XFRM_POLICY_MAX+1);
include/net/xfrm.h
1691
struct xfrm_policy *pol, int *err,
include/net/xfrm.h
1889
int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol);
include/net/xfrm.h
1913
void km_policy_expired(struct xfrm_policy *pol, int dir, int hard, u32 portid);
include/net/xfrm.h
404
struct xfrm_policy *pol);
include/soc/mscc/ocelot.h
1088
struct ocelot_policer *pol);
include/soc/mscc/ocelot.h
1179
struct ocelot_policer *pol);
include/soc/mscc/ocelot_vcap.h
660
struct ocelot_policer pol;
include/uapi/linux/netfilter/xt_policy.h
68
struct xt_policy_elem pol[XT_POLICY_MAX_ELEM];
include/uapi/linux/xfrm.h
475
struct xfrm_userpolicy_info pol;
mm/mempolicy.c
1010
struct mempolicy *pol)
mm/mempolicy.c
1018
new = mpol_dup(pol);
mm/mempolicy.c
1111
static void get_policy_nodemask(struct mempolicy *pol, nodemask_t *nodes)
mm/mempolicy.c
1114
if (pol == &default_policy)
mm/mempolicy.c
1117
switch (pol->mode) {
mm/mempolicy.c
1123
*nodes = pol->nodes;
mm/mempolicy.c
1153
struct mempolicy *pol = current->mempolicy, *pol_refcount = NULL;
mm/mempolicy.c
1182
pol = __get_vma_policy(vma, addr, &ilx);
mm/mempolicy.c
1186
if (!pol)
mm/mempolicy.c
1187
pol = &default_policy; /* indicates default behavior */
mm/mempolicy.c
1196
pol_refcount = pol;
mm/mempolicy.c
1198
mpol_get(pol);
mm/mempolicy.c
1204
} else if (pol == current->mempolicy &&
mm/mempolicy.c
1205
pol->mode == MPOL_INTERLEAVE) {
mm/mempolicy.c
1206
*policy = next_node_in(current->il_prev, pol->nodes);
mm/mempolicy.c
1207
} else if (pol == current->mempolicy &&
mm/mempolicy.c
1208
pol->mode == MPOL_WEIGHTED_INTERLEAVE) {
mm/mempolicy.c
1213
pol->nodes);
mm/mempolicy.c
1219
*policy = pol == &default_policy ? MPOL_DEFAULT :
mm/mempolicy.c
1220
pol->mode;
mm/mempolicy.c
1225
*policy |= (pol->flags & MPOL_MODE_FLAGS);
mm/mempolicy.c
1230
if (mpol_store_user_nodemask(pol)) {
mm/mempolicy.c
1231
*nmask = pol->w.user_nodemask;
mm/mempolicy.c
1234
get_policy_nodemask(pol, nmask);
mm/mempolicy.c
1240
mpol_cond_put(pol);
mm/mempolicy.c
1438
struct mempolicy *pol = mmpol->pol;
mm/mempolicy.c
1453
nodemask = policy_nodemask(gfp, pol, ilx, &nid);
mm/mempolicy.c
1463
return folio_alloc_mpol(gfp, order, pol, ilx, nid);
mm/mempolicy.c
1572
mmpol.pol = new;
mm/mempolicy.c
2044
struct mempolicy *pol;
mm/mempolicy.c
2046
pol = __get_vma_policy(vma, addr, ilx);
mm/mempolicy.c
2047
if (!pol)
mm/mempolicy.c
2048
pol = get_task_policy(current);
mm/mempolicy.c
2049
if (pol->mode == MPOL_INTERLEAVE ||
mm/mempolicy.c
2050
pol->mode == MPOL_WEIGHTED_INTERLEAVE) {
mm/mempolicy.c
2054
return pol;
mm/mempolicy.c
2059
struct mempolicy *pol;
mm/mempolicy.c
2065
pol = vma->vm_ops->get_policy(vma, vma->vm_start, &ilx);
mm/mempolicy.c
2066
if (pol && (pol->flags & MPOL_F_MOF))
mm/mempolicy.c
2068
mpol_cond_put(pol);
mm/mempolicy.c
2073
pol = vma->vm_policy;
mm/mempolicy.c
2074
if (!pol)
mm/mempolicy.c
2075
pol = get_task_policy(current);
mm/mempolicy.c
2077
return pol->flags & MPOL_F_MOF;
mm/mempolicy.c
2189
static unsigned int read_once_policy_nodemask(struct mempolicy *pol,
mm/mempolicy.c
2198
memcpy(mask, &pol->nodes, sizeof(nodemask_t));
mm/mempolicy.c
2203
static unsigned int weighted_interleave_nid(struct mempolicy *pol, pgoff_t ilx)
mm/mempolicy.c
2213
nr_nodes = read_once_policy_nodemask(pol, &nodemask);
mm/mempolicy.c
2248
static unsigned int interleave_nid(struct mempolicy *pol, pgoff_t ilx)
mm/mempolicy.c
2255
nnodes = read_once_policy_nodemask(pol, &nodemask);
mm/mempolicy.c
2269
static nodemask_t *policy_nodemask(gfp_t gfp, struct mempolicy *pol,
mm/mempolicy.c
2274
switch (pol->mode) {
mm/mempolicy.c
2277
*nid = first_node(pol->nodes);
mm/mempolicy.c
2280
nodemask = &pol->nodes;
mm/mempolicy.c
2281
if (pol->home_node != NUMA_NO_NODE)
mm/mempolicy.c
2282
*nid = pol->home_node;
mm/mempolicy.c
2286
if (apply_policy_zone(pol, gfp_zone(gfp)) &&
mm/mempolicy.c
2287
cpuset_nodemask_valid_mems_allowed(&pol->nodes))
mm/mempolicy.c
2288
nodemask = &pol->nodes;
mm/mempolicy.c
2289
if (pol->home_node != NUMA_NO_NODE)
mm/mempolicy.c
2290
*nid = pol->home_node;
mm/mempolicy.c
2301
interleave_nodes(pol) : interleave_nid(pol, ilx);
mm/mempolicy.c
2305
weighted_interleave_nodes(pol) :
mm/mempolicy.c
2306
weighted_interleave_nid(pol, ilx);
mm/mempolicy.c
2446
struct mempolicy *pol, pgoff_t ilx, int nid)
mm/mempolicy.c
2451
nodemask = policy_nodemask(gfp, pol, ilx, &nid);
mm/mempolicy.c
2453
if (pol->mode == MPOL_PREFERRED_MANY)
mm/mempolicy.c
2469
if (pol->mode != MPOL_INTERLEAVE &&
mm/mempolicy.c
2470
pol->mode != MPOL_WEIGHTED_INTERLEAVE &&
mm/mempolicy.c
2492
if (unlikely(pol->mode == MPOL_INTERLEAVE ||
mm/mempolicy.c
2493
pol->mode == MPOL_WEIGHTED_INTERLEAVE) && page) {
mm/mempolicy.c
2507
struct mempolicy *pol, pgoff_t ilx, int nid)
mm/mempolicy.c
2509
struct page *page = alloc_pages_mpol(gfp | __GFP_COMP, order, pol,
mm/mempolicy.c
2536
struct mempolicy *pol;
mm/mempolicy.c
2543
pol = get_vma_policy(vma, addr, order, &ilx);
mm/mempolicy.c
2544
folio = folio_alloc_mpol_noprof(gfp, order, pol, ilx, numa_node_id());
mm/mempolicy.c
2545
mpol_cond_put(pol);
mm/mempolicy.c
2552
struct mempolicy *pol = &default_policy;
mm/mempolicy.c
2559
pol = get_task_policy(current);
mm/mempolicy.c
2561
return alloc_pages_mpol(gfp, order, pol, NO_INTERLEAVE_INDEX,
mm/mempolicy.c
2596
struct mempolicy *pol, unsigned long nr_pages,
mm/mempolicy.c
2606
nodes = nodes_weight(pol->nodes);
mm/mempolicy.c
2613
interleave_nodes(pol), NULL,
mm/mempolicy.c
2619
interleave_nodes(pol), NULL,
mm/mempolicy.c
2631
struct mempolicy *pol, unsigned long nr_pages,
mm/mempolicy.c
2657
nnodes = read_once_policy_nodemask(pol, &nodes);
mm/mempolicy.c
2749
struct mempolicy *pol, unsigned long nr_pages,
mm/mempolicy.c
2758
nr_allocated = alloc_pages_bulk_noprof(preferred_gfp, nid, &pol->nodes,
mm/mempolicy.c
2777
struct mempolicy *pol = &default_policy;
mm/mempolicy.c
2782
pol = get_task_policy(current);
mm/mempolicy.c
2784
if (pol->mode == MPOL_INTERLEAVE)
mm/mempolicy.c
2785
return alloc_pages_bulk_interleave(gfp, pol,
mm/mempolicy.c
2788
if (pol->mode == MPOL_WEIGHTED_INTERLEAVE)
mm/mempolicy.c
2790
gfp, pol, nr_pages, page_array);
mm/mempolicy.c
2792
if (pol->mode == MPOL_PREFERRED_MANY)
mm/mempolicy.c
2794
numa_node_id(), pol, nr_pages, page_array);
mm/mempolicy.c
2797
nodemask = policy_nodemask(gfp, pol, NO_INTERLEAVE_INDEX, &nid);
mm/mempolicy.c
2804
struct mempolicy *pol = mpol_dup(src->vm_policy);
mm/mempolicy.c
2806
if (IS_ERR(pol))
mm/mempolicy.c
2807
return PTR_ERR(pol);
mm/mempolicy.c
2808
dst->vm_policy = pol;
mm/mempolicy.c
2948
struct mempolicy *pol = NULL;
mm/mempolicy.c
2957
pol = sn->policy;
mm/mempolicy.c
2960
return pol;
mm/mempolicy.c
2987
struct mempolicy *pol;
mm/mempolicy.c
3002
pol = get_vma_policy(vma, addr, folio_order(folio), &ilx);
mm/mempolicy.c
3003
if (!(pol->flags & MPOL_F_MOF))
mm/mempolicy.c
3006
switch (pol->mode) {
mm/mempolicy.c
3008
polnid = interleave_nid(pol, ilx);
mm/mempolicy.c
3012
polnid = weighted_interleave_nid(pol, ilx);
mm/mempolicy.c
3016
if (node_isset(curnid, pol->nodes))
mm/mempolicy.c
3018
polnid = first_node(pol->nodes);
mm/mempolicy.c
3036
if (pol->flags & MPOL_F_MORON) {
mm/mempolicy.c
3041
if (node_isset(thisnid, pol->nodes))
mm/mempolicy.c
3051
if (node_isset(curnid, pol->nodes))
mm/mempolicy.c
3056
&pol->nodes);
mm/mempolicy.c
3065
if (pol->flags & MPOL_F_MORON) {
mm/mempolicy.c
3076
mpol_cond_put(pol);
mm/mempolicy.c
3089
struct mempolicy *pol;
mm/mempolicy.c
3092
pol = task->mempolicy;
mm/mempolicy.c
3095
mpol_put(pol);
mm/mempolicy.c
3105
unsigned long end, struct mempolicy *pol)
mm/mempolicy.c
3109
node->policy = pol;
mm/mempolicy.c
3113
struct mempolicy *pol)
mm/mempolicy.c
3122
newpol = mpol_dup(pol);
mm/mempolicy.c
3251
struct vm_area_struct *vma, struct mempolicy *pol)
mm/mempolicy.c
3257
if (pol) {
mm/mempolicy.c
3258
new = sp_alloc(vma->vm_pgoff, vma->vm_pgoff + sz, pol);
mm/mempolicy.c
342
struct mempolicy *pol = p->mempolicy;
mm/mempolicy.c
345
if (pol)
mm/mempolicy.c
346
return pol;
mm/mempolicy.c
350
pol = &preferred_node_policy[node];
mm/mempolicy.c
352
if (pol->mode)
mm/mempolicy.c
353
return pol;
mm/mempolicy.c
3555
void mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol)
mm/mempolicy.c
3562
if (pol &&
mm/mempolicy.c
3563
pol != &default_policy &&
mm/mempolicy.c
3564
!(pol >= &preferred_node_policy[0] &&
mm/mempolicy.c
3565
pol <= &preferred_node_policy[ARRAY_SIZE(preferred_node_policy) - 1])) {
mm/mempolicy.c
3566
mode = pol->mode;
mm/mempolicy.c
3567
flags = pol->flags;
mm/mempolicy.c
3579
nodes = pol->nodes;
mm/mempolicy.c
361
int (*create)(struct mempolicy *pol, const nodemask_t *nodes);
mm/mempolicy.c
362
void (*rebind)(struct mempolicy *pol, const nodemask_t *nodes);
mm/mempolicy.c
365
static inline int mpol_store_user_nodemask(const struct mempolicy *pol)
mm/mempolicy.c
367
return pol->flags & MPOL_USER_NODEMASK_FLAGS;
mm/mempolicy.c
378
static int mpol_new_nodemask(struct mempolicy *pol, const nodemask_t *nodes)
mm/mempolicy.c
382
pol->nodes = *nodes;
mm/mempolicy.c
386
static int mpol_new_preferred(struct mempolicy *pol, const nodemask_t *nodes)
mm/mempolicy.c
391
nodes_clear(pol->nodes);
mm/mempolicy.c
392
node_set(first_node(*nodes), pol->nodes);
mm/mempolicy.c
404
static int mpol_set_nodemask(struct mempolicy *pol,
mm/mempolicy.c
414
if (!pol || pol->mode == MPOL_LOCAL)
mm/mempolicy.c
423
if (pol->flags & MPOL_F_RELATIVE_NODES)
mm/mempolicy.c
428
if (mpol_store_user_nodemask(pol))
mm/mempolicy.c
429
pol->w.user_nodemask = *nodes;
mm/mempolicy.c
431
pol->w.cpuset_mems_allowed = cpuset_current_mems_allowed;
mm/mempolicy.c
433
ret = mpol_ops[pol->mode].create(pol, &nsc->mask2);
mm/mempolicy.c
486
void __mpol_put(struct mempolicy *pol)
mm/mempolicy.c
488
if (!atomic_dec_and_test(&pol->refcnt))
mm/mempolicy.c
496
kfree_rcu(pol, rcu);
mm/mempolicy.c
500
static void mpol_rebind_default(struct mempolicy *pol, const nodemask_t *nodes)
mm/mempolicy.c
504
static void mpol_rebind_nodemask(struct mempolicy *pol, const nodemask_t *nodes)
mm/mempolicy.c
508
if (pol->flags & MPOL_F_STATIC_NODES)
mm/mempolicy.c
509
nodes_and(tmp, pol->w.user_nodemask, *nodes);
mm/mempolicy.c
510
else if (pol->flags & MPOL_F_RELATIVE_NODES)
mm/mempolicy.c
511
mpol_relative_nodemask(&tmp, &pol->w.user_nodemask, nodes);
mm/mempolicy.c
513
nodes_remap(tmp, pol->nodes, pol->w.cpuset_mems_allowed,
mm/mempolicy.c
515
pol->w.cpuset_mems_allowed = *nodes;
mm/mempolicy.c
521
pol->nodes = tmp;
mm/mempolicy.c
524
static void mpol_rebind_preferred(struct mempolicy *pol,
mm/mempolicy.c
527
pol->w.cpuset_mems_allowed = *nodes;
mm/mempolicy.c
537
static void mpol_rebind_policy(struct mempolicy *pol, const nodemask_t *newmask)
mm/mempolicy.c
539
if (!pol || pol->mode == MPOL_LOCAL)
mm/mempolicy.c
541
if (!mpol_store_user_nodemask(pol) &&
mm/mempolicy.c
542
nodes_equal(pol->w.cpuset_mems_allowed, *newmask))
mm/mempolicy.c
545
mpol_ops[pol->mode].rebind(pol, newmask);
mm/mempolicy.c
608
static nodemask_t *policy_nodemask(gfp_t gfp, struct mempolicy *pol,
mm/mempolicy.c
622
struct mempolicy *pol;
net/key/af_key.c
1943
parse_ipsecrequest(struct xfrm_policy *xp, struct sadb_x_policy *pol,
net/key/af_key.c
1964
pol->sadb_x_policy_dir == IPSEC_DIR_OUTBOUND)
net/key/af_key.c
1995
parse_ipsecrequests(struct xfrm_policy *xp, struct sadb_x_policy *pol)
net/key/af_key.c
1998
int len = pol->sadb_x_policy_len*8 - sizeof(struct sadb_x_policy);
net/key/af_key.c
1999
struct sadb_x_ipsecrequest *rq = (void*)(pol+1);
net/key/af_key.c
2001
if (pol->sadb_x_policy_len * 8 < sizeof(struct sadb_x_policy))
net/key/af_key.c
2009
if ((err = parse_ipsecrequest(xp, pol, rq)) < 0)
net/key/af_key.c
2070
struct sadb_x_policy *pol;
net/key/af_key.c
2141
pol = skb_put(skb, sizeof(struct sadb_x_policy));
net/key/af_key.c
2142
pol->sadb_x_policy_len = sizeof(struct sadb_x_policy)/sizeof(uint64_t);
net/key/af_key.c
2143
pol->sadb_x_policy_exttype = SADB_X_EXT_POLICY;
net/key/af_key.c
2144
pol->sadb_x_policy_type = IPSEC_POLICY_DISCARD;
net/key/af_key.c
2147
pol->sadb_x_policy_type = IPSEC_POLICY_IPSEC;
net/key/af_key.c
2149
pol->sadb_x_policy_type = IPSEC_POLICY_NONE;
net/key/af_key.c
2151
pol->sadb_x_policy_dir = dir+1;
net/key/af_key.c
2152
pol->sadb_x_policy_reserved = 0;
net/key/af_key.c
2153
pol->sadb_x_policy_id = xp->index;
net/key/af_key.c
2154
pol->sadb_x_policy_priority = xp->priority;
net/key/af_key.c
2170
pol->sadb_x_policy_len += req_size/8;
net/key/af_key.c
2252
struct sadb_x_policy *pol;
net/key/af_key.c
2262
pol = ext_hdrs[SADB_X_EXT_POLICY-1];
net/key/af_key.c
2263
if (pol->sadb_x_policy_type > IPSEC_POLICY_IPSEC)
net/key/af_key.c
2265
if (!pol->sadb_x_policy_dir || pol->sadb_x_policy_dir >= IPSEC_DIR_MAX)
net/key/af_key.c
2272
xp->action = (pol->sadb_x_policy_type == IPSEC_POLICY_DISCARD ?
net/key/af_key.c
2274
xp->priority = pol->sadb_x_policy_priority;
net/key/af_key.c
2331
if (pol->sadb_x_policy_type == IPSEC_POLICY_IPSEC &&
net/key/af_key.c
2332
(err = parse_ipsecrequests(xp, pol)) < 0)
net/key/af_key.c
2335
err = xfrm_policy_insert(pol->sadb_x_policy_dir-1, xp,
net/key/af_key.c
2351
km_policy_notify(xp, pol->sadb_x_policy_dir-1, &c);
net/key/af_key.c
2366
struct sadb_x_policy *pol;
net/key/af_key.c
2378
pol = ext_hdrs[SADB_X_EXT_POLICY-1];
net/key/af_key.c
2379
if (!pol->sadb_x_policy_dir || pol->sadb_x_policy_dir >= IPSEC_DIR_MAX)
net/key/af_key.c
2414
pol->sadb_x_policy_dir - 1, &sel, pol_ctx,
net/key/af_key.c
2429
km_policy_notify(xp, pol->sadb_x_policy_dir-1, &c);
net/key/af_key.c
2554
struct sadb_x_policy *pol;
net/key/af_key.c
2569
pol = ext_hdrs[SADB_X_EXT_POLICY - 1];
net/key/af_key.c
2571
if (pol->sadb_x_policy_dir >= IPSEC_DIR_MAX) {
net/key/af_key.c
2588
dir = pol->sadb_x_policy_dir - 1;
net/key/af_key.c
2609
rq = (struct sadb_x_ipsecrequest *)(pol + 1);
net/key/af_key.c
2613
len = pol->sadb_x_policy_len * 8 - sizeof(struct sadb_x_policy);
net/key/af_key.c
2652
struct sadb_x_policy *pol;
net/key/af_key.c
2656
if ((pol = ext_hdrs[SADB_X_EXT_POLICY-1]) == NULL)
net/key/af_key.c
2659
dir = xfrm_policy_id2dir(pol->sadb_x_policy_id);
net/key/af_key.c
2665
dir, pol->sadb_x_policy_id, delete, &err);
net/key/af_key.c
3159
struct sadb_x_policy *pol;
net/key/af_key.c
3230
pol = skb_put(skb, sizeof(struct sadb_x_policy));
net/key/af_key.c
3231
pol->sadb_x_policy_len = sizeof(struct sadb_x_policy)/sizeof(uint64_t);
net/key/af_key.c
3232
pol->sadb_x_policy_exttype = SADB_X_EXT_POLICY;
net/key/af_key.c
3233
pol->sadb_x_policy_type = IPSEC_POLICY_IPSEC;
net/key/af_key.c
3234
pol->sadb_x_policy_dir = XFRM_POLICY_OUT + 1;
net/key/af_key.c
3235
pol->sadb_x_policy_reserved = 0;
net/key/af_key.c
3236
pol->sadb_x_policy_id = xp->index;
net/key/af_key.c
3237
pol->sadb_x_policy_priority = xp->priority;
net/key/af_key.c
3271
struct sadb_x_policy *pol = (struct sadb_x_policy*)data;
net/key/af_key.c
3297
pol->sadb_x_policy_len*8 > len ||
net/key/af_key.c
3298
pol->sadb_x_policy_type > IPSEC_POLICY_BYPASS ||
net/key/af_key.c
3299
(!pol->sadb_x_policy_dir || pol->sadb_x_policy_dir > IPSEC_DIR_OUTBOUND))
net/key/af_key.c
3308
xp->action = (pol->sadb_x_policy_type == IPSEC_POLICY_DISCARD ?
net/key/af_key.c
3318
if (pol->sadb_x_policy_type == IPSEC_POLICY_IPSEC &&
net/key/af_key.c
3319
(*dir = parse_ipsecrequests(xp, pol)) < 0)
net/key/af_key.c
3323
if (len >= (pol->sadb_x_policy_len*8 +
net/key/af_key.c
3325
char *p = (char *)pol;
net/key/af_key.c
3328
p += pol->sadb_x_policy_len*8;
net/key/af_key.c
3330
if (len < pol->sadb_x_policy_len*8 +
net/key/af_key.c
3345
*dir = pol->sadb_x_policy_dir-1;
net/key/af_key.c
3560
struct sadb_x_policy *pol;
net/key/af_key.c
3627
pol = skb_put(skb, sizeof(struct sadb_x_policy));
net/key/af_key.c
3628
pol->sadb_x_policy_len = size_pol / 8;
net/key/af_key.c
3629
pol->sadb_x_policy_exttype = SADB_X_EXT_POLICY;
net/key/af_key.c
3630
pol->sadb_x_policy_type = IPSEC_POLICY_IPSEC;
net/key/af_key.c
3631
pol->sadb_x_policy_dir = dir + 1;
net/key/af_key.c
3632
pol->sadb_x_policy_reserved = 0;
net/key/af_key.c
3633
pol->sadb_x_policy_id = 0;
net/key/af_key.c
3634
pol->sadb_x_policy_priority = 0;
net/netfilter/xt_policy.c
69
e = &info->pol[pos];
net/netfilter/xt_policy.c
98
e = &info->pol[pos];
net/xfrm/xfrm_compat.c
204
memcpy(dst_upe, src_upe, sizeof(dst_upe->pol));
net/xfrm/xfrm_compat.c
540
memcpy(dst_upe, src_upe, sizeof(src_upe->pol));
net/xfrm/xfrm_compat.c
67
struct compat_xfrm_userpolicy_info pol;
net/xfrm/xfrm_policy.c
1286
struct xfrm_policy *pol;
net/xfrm/xfrm_policy.c
1385
hlist_for_each_entry(pol, chain, bydst) {
net/xfrm/xfrm_policy.c
1386
if (policy->priority >= pol->priority)
net/xfrm/xfrm_policy.c
1387
newpos = &pol->bydst;
net/xfrm/xfrm_policy.c
1487
struct xfrm_policy *pol)
net/xfrm/xfrm_policy.c
1489
return mark->v == pol->mark.v && mark->m == pol->mark.m;
net/xfrm/xfrm_policy.c
1545
struct xfrm_policy *pol, *newpos = NULL, *delpol = NULL;
net/xfrm/xfrm_policy.c
1547
hlist_for_each_entry(pol, chain, bydst) {
net/xfrm/xfrm_policy.c
1548
if (pol->type == policy->type &&
net/xfrm/xfrm_policy.c
1549
pol->if_id == policy->if_id &&
net/xfrm/xfrm_policy.c
1550
!selector_cmp(&pol->selector, &policy->selector) &&
net/xfrm/xfrm_policy.c
1551
xfrm_policy_mark_match(&policy->mark, pol) &&
net/xfrm/xfrm_policy.c
1552
xfrm_sec_ctx_match(pol->security, policy->security) &&
net/xfrm/xfrm_policy.c
1556
delpol = pol;
net/xfrm/xfrm_policy.c
1557
if (policy->priority > pol->priority)
net/xfrm/xfrm_policy.c
1559
} else if (policy->priority >= pol->priority) {
net/xfrm/xfrm_policy.c
1560
newpos = pol;
net/xfrm/xfrm_policy.c
1633
struct xfrm_policy *pol;
net/xfrm/xfrm_policy.c
1638
hlist_for_each_entry(pol, chain, bydst) {
net/xfrm/xfrm_policy.c
1639
if (pol->type == type &&
net/xfrm/xfrm_policy.c
1640
pol->if_id == if_id &&
net/xfrm/xfrm_policy.c
1641
xfrm_policy_mark_match(mark, pol) &&
net/xfrm/xfrm_policy.c
1642
!selector_cmp(sel, &pol->selector) &&
net/xfrm/xfrm_policy.c
1643
xfrm_sec_ctx_match(ctx, pol->security))
net/xfrm/xfrm_policy.c
1644
return pol;
net/xfrm/xfrm_policy.c
1656
struct xfrm_policy *pol, *ret = NULL;
net/xfrm/xfrm_policy.c
1680
pol = NULL;
net/xfrm/xfrm_policy.c
1690
if (!pol || tmp->pos < pol->pos)
net/xfrm/xfrm_policy.c
1691
pol = tmp;
net/xfrm/xfrm_policy.c
1694
pol = __xfrm_policy_bysel_ctx(chain, mark, if_id, type, dir,
net/xfrm/xfrm_policy.c
1698
if (pol) {
net/xfrm/xfrm_policy.c
1699
xfrm_pol_hold(pol);
net/xfrm/xfrm_policy.c
1701
*err = security_xfrm_policy_delete(pol->security);
net/xfrm/xfrm_policy.c
1704
return pol;
net/xfrm/xfrm_policy.c
1706
__xfrm_policy_unlink(pol, dir);
net/xfrm/xfrm_policy.c
1708
ret = pol;
net/xfrm/xfrm_policy.c
1724
struct xfrm_policy *pol, *ret;
net/xfrm/xfrm_policy.c
1735
hlist_for_each_entry(pol, chain, byidx) {
net/xfrm/xfrm_policy.c
1736
if (pol->type == type && pol->index == id &&
net/xfrm/xfrm_policy.c
1737
pol->if_id == if_id && xfrm_policy_mark_match(mark, pol)) {
net/xfrm/xfrm_policy.c
1738
xfrm_pol_hold(pol);
net/xfrm/xfrm_policy.c
1741
pol->security);
net/xfrm/xfrm_policy.c
1744
return pol;
net/xfrm/xfrm_policy.c
1746
__xfrm_policy_unlink(pol, dir);
net/xfrm/xfrm_policy.c
1748
ret = pol;
net/xfrm/xfrm_policy.c
1764
struct xfrm_policy *pol;
net/xfrm/xfrm_policy.c
1767
list_for_each_entry(pol, &net->xfrm.policy_all, walk.all) {
net/xfrm/xfrm_policy.c
1768
if (pol->walk.dead ||
net/xfrm/xfrm_policy.c
1769
xfrm_policy_id2dir(pol->index) >= XFRM_POLICY_MAX ||
net/xfrm/xfrm_policy.c
1770
pol->type != type)
net/xfrm/xfrm_policy.c
1773
err = security_xfrm_policy_delete(pol->security);
net/xfrm/xfrm_policy.c
1775
xfrm_audit_policy_delete(pol, 0, task_valid);
net/xfrm/xfrm_policy.c
1786
struct xfrm_policy *pol;
net/xfrm/xfrm_policy.c
1789
list_for_each_entry(pol, &net->xfrm.policy_all, walk.all) {
net/xfrm/xfrm_policy.c
1790
if (pol->walk.dead ||
net/xfrm/xfrm_policy.c
1791
xfrm_policy_id2dir(pol->index) >= XFRM_POLICY_MAX ||
net/xfrm/xfrm_policy.c
1792
pol->xdo.dev != dev)
net/xfrm/xfrm_policy.c
1795
err = security_xfrm_policy_delete(pol->security);
net/xfrm/xfrm_policy.c
1797
xfrm_audit_policy_delete(pol, 0, task_valid);
net/xfrm/xfrm_policy.c
1821
struct xfrm_policy *pol;
net/xfrm/xfrm_policy.c
1830
list_for_each_entry(pol, &net->xfrm.policy_all, walk.all) {
net/xfrm/xfrm_policy.c
1831
if (pol->walk.dead)
net/xfrm/xfrm_policy.c
1834
dir = xfrm_policy_id2dir(pol->index);
net/xfrm/xfrm_policy.c
1836
pol->type != type)
net/xfrm/xfrm_policy.c
1839
__xfrm_policy_unlink(pol, dir);
net/xfrm/xfrm_policy.c
1842
xfrm_audit_policy_delete(pol, 1, task_valid);
net/xfrm/xfrm_policy.c
1843
xfrm_policy_kill(pol);
net/xfrm/xfrm_policy.c
1861
struct xfrm_policy *pol;
net/xfrm/xfrm_policy.c
1870
list_for_each_entry(pol, &net->xfrm.policy_all, walk.all) {
net/xfrm/xfrm_policy.c
1871
if (pol->walk.dead)
net/xfrm/xfrm_policy.c
1874
dir = xfrm_policy_id2dir(pol->index);
net/xfrm/xfrm_policy.c
1876
pol->xdo.dev != dev)
net/xfrm/xfrm_policy.c
1879
__xfrm_policy_unlink(pol, dir);
net/xfrm/xfrm_policy.c
1882
xfrm_audit_policy_delete(pol, 1, task_valid);
net/xfrm/xfrm_policy.c
1883
xfrm_policy_kill(pol);
net/xfrm/xfrm_policy.c
190
static void __xfrm_policy_link(struct xfrm_policy *pol, int dir);
net/xfrm/xfrm_policy.c
1901
struct xfrm_policy *pol;
net/xfrm/xfrm_policy.c
191
static struct xfrm_policy *__xfrm_policy_unlink(struct xfrm_policy *pol,
net/xfrm/xfrm_policy.c
1922
pol = container_of(x, struct xfrm_policy, walk);
net/xfrm/xfrm_policy.c
1924
walk->type != pol->type)
net/xfrm/xfrm_policy.c
1926
error = func(pol, xfrm_policy_id2dir(pol->index),
net/xfrm/xfrm_policy.c
1970
static int xfrm_policy_match(const struct xfrm_policy *pol,
net/xfrm/xfrm_policy.c
1974
const struct xfrm_selector *sel = &pol->selector;
net/xfrm/xfrm_policy.c
1978
if (pol->family != family ||
net/xfrm/xfrm_policy.c
1979
pol->if_id != if_id ||
net/xfrm/xfrm_policy.c
1980
(fl->flowi_mark & pol->mark.m) != pol->mark.v ||
net/xfrm/xfrm_policy.c
1981
pol->type != type)
net/xfrm/xfrm_policy.c
1986
ret = security_xfrm_policy_lookup(pol->security, fl->flowi_secid);
net/xfrm/xfrm_policy.c
2100
struct xfrm_policy *pol;
net/xfrm/xfrm_policy.c
2105
hlist_for_each_entry_rcu(pol, chain, bydst) {
net/xfrm/xfrm_policy.c
2108
if (pol->priority > priority)
net/xfrm/xfrm_policy.c
2111
err = xfrm_policy_match(pol, fl, type, family, if_id);
net/xfrm/xfrm_policy.c
2121
if (pol->priority == priority &&
net/xfrm/xfrm_policy.c
2122
prefer->pos < pol->pos)
net/xfrm/xfrm_policy.c
2126
return pol;
net/xfrm/xfrm_policy.c
2164
struct xfrm_policy *pol, *ret;
net/xfrm/xfrm_policy.c
2182
hlist_for_each_entry_rcu(pol, chain, bydst) {
net/xfrm/xfrm_policy.c
2183
err = xfrm_policy_match(pol, fl, type, family, if_id);
net/xfrm/xfrm_policy.c
2192
ret = pol;
net/xfrm/xfrm_policy.c
2204
pol = xfrm_policy_eval_candidates(&cand, ret, fl, type,
net/xfrm/xfrm_policy.c
2206
if (pol) {
net/xfrm/xfrm_policy.c
2207
ret = pol;
net/xfrm/xfrm_policy.c
2208
if (IS_ERR(pol))
net/xfrm/xfrm_policy.c
2229
struct xfrm_policy *pol;
net/xfrm/xfrm_policy.c
2231
pol = xfrm_policy_lookup_bytype(net, XFRM_POLICY_TYPE_SUB, fl, family,
net/xfrm/xfrm_policy.c
2233
if (pol != NULL)
net/xfrm/xfrm_policy.c
2234
return pol;
net/xfrm/xfrm_policy.c
2244
struct xfrm_policy *pol;
net/xfrm/xfrm_policy.c
2248
pol = rcu_dereference(sk->sk_policy[dir]);
net/xfrm/xfrm_policy.c
2249
if (pol != NULL) {
net/xfrm/xfrm_policy.c
2253
if (pol->family != family) {
net/xfrm/xfrm_policy.c
2254
pol = NULL;
net/xfrm/xfrm_policy.c
2258
match = xfrm_selector_match(&pol->selector, fl, family);
net/xfrm/xfrm_policy.c
2260
if ((READ_ONCE(sk->sk_mark) & pol->mark.m) != pol->mark.v ||
net/xfrm/xfrm_policy.c
2261
pol->if_id != if_id) {
net/xfrm/xfrm_policy.c
2262
pol = NULL;
net/xfrm/xfrm_policy.c
2265
err = security_xfrm_policy_lookup(pol->security,
net/xfrm/xfrm_policy.c
2268
if (!xfrm_pol_hold_rcu(pol))
net/xfrm/xfrm_policy.c
2271
pol = NULL;
net/xfrm/xfrm_policy.c
2273
pol = ERR_PTR(err);
net/xfrm/xfrm_policy.c
2276
pol = NULL;
net/xfrm/xfrm_policy.c
2280
return pol;
net/xfrm/xfrm_policy.c
2317
static void __xfrm_policy_link(struct xfrm_policy *pol, int dir)
net/xfrm/xfrm_policy.c
2319
struct net *net = xp_net(pol);
net/xfrm/xfrm_policy.c
2325
pol->pos = xfrm_gen_pos(net);
net/xfrm/xfrm_policy.c
2329
list_add(&pol->walk.all, &net->xfrm.policy_all);
net/xfrm/xfrm_policy.c
2331
xfrm_pol_hold(pol);
net/xfrm/xfrm_policy.c
2334
static struct xfrm_policy *__xfrm_policy_unlink(struct xfrm_policy *pol,
net/xfrm/xfrm_policy.c
2337
struct net *net = xp_net(pol);
net/xfrm/xfrm_policy.c
2339
if (list_empty(&pol->walk.all))
net/xfrm/xfrm_policy.c
2343
if (!hlist_unhashed(&pol->bydst)) {
net/xfrm/xfrm_policy.c
2344
hlist_del_rcu(&pol->bydst);
net/xfrm/xfrm_policy.c
2345
hlist_del(&pol->byidx);
net/xfrm/xfrm_policy.c
2348
list_del_init(&pol->walk.all);
net/xfrm/xfrm_policy.c
2351
return pol;
net/xfrm/xfrm_policy.c
2354
static void xfrm_sk_policy_link(struct xfrm_policy *pol, int dir)
net/xfrm/xfrm_policy.c
2356
__xfrm_policy_link(pol, XFRM_POLICY_MAX + dir);
net/xfrm/xfrm_policy.c
2359
static void xfrm_sk_policy_unlink(struct xfrm_policy *pol, int dir)
net/xfrm/xfrm_policy.c
2361
__xfrm_policy_unlink(pol, XFRM_POLICY_MAX + dir);
net/xfrm/xfrm_policy.c
2364
int xfrm_policy_delete(struct xfrm_policy *pol, int dir)
net/xfrm/xfrm_policy.c
2366
struct net *net = xp_net(pol);
net/xfrm/xfrm_policy.c
2369
pol = __xfrm_policy_unlink(pol, dir);
net/xfrm/xfrm_policy.c
2371
if (pol) {
net/xfrm/xfrm_policy.c
2372
xfrm_policy_kill(pol);
net/xfrm/xfrm_policy.c
2379
int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol)
net/xfrm/xfrm_policy.c
2385
if (pol && pol->type != XFRM_POLICY_TYPE_MAIN)
net/xfrm/xfrm_policy.c
2392
if (pol) {
net/xfrm/xfrm_policy.c
2393
pol->curlft.add_time = ktime_get_real_seconds();
net/xfrm/xfrm_policy.c
2394
pol->index = xfrm_gen_index(net, XFRM_POLICY_MAX+dir, 0);
net/xfrm/xfrm_policy.c
2395
xfrm_sk_policy_link(pol, dir);
net/xfrm/xfrm_policy.c
2397
rcu_assign_pointer(sk->sk_policy[dir], pol);
net/xfrm/xfrm_policy.c
2399
if (pol)
net/xfrm/xfrm_policy.c
2400
xfrm_policy_requeue(old_pol, pol);
net/xfrm/xfrm_policy.c
2901
struct xfrm_policy *pol = timer_container_of(pol, t, polq.hold_timer);
net/xfrm/xfrm_policy.c
2902
struct net *net = xp_net(pol);
net/xfrm/xfrm_policy.c
2903
struct xfrm_policy_queue *pq = &pol->polq;
net/xfrm/xfrm_policy.c
2919
skb->mark = pol->mark.v;
net/xfrm/xfrm_policy.c
2937
xfrm_pol_hold(pol);
net/xfrm/xfrm_policy.c
2955
skb->mark = pol->mark.v;
net/xfrm/xfrm_policy.c
2974
xfrm_pol_put(pol);
net/xfrm/xfrm_policy.c
2980
xfrm_pol_put(pol);
net/xfrm/xfrm_policy.c
2988
struct xfrm_policy *pol = xdst->pols[0];
net/xfrm/xfrm_policy.c
2989
struct xfrm_policy_queue *pq = &pol->polq;
net/xfrm/xfrm_policy.c
3013
xfrm_pol_put(pol);
net/xfrm/xfrm_policy.c
3018
xfrm_pol_hold(pol);
net/xfrm/xfrm_policy.c
3629
struct xfrm_policy *pol = NULL;
net/xfrm/xfrm_policy.c
3636
return pol;
net/xfrm/xfrm_policy.c
3638
pol = xfrm_policy_lookup(net, &fl1, family, XFRM_POLICY_FWD, if_id);
net/xfrm/xfrm_policy.c
3639
if (IS_ERR(pol))
net/xfrm/xfrm_policy.c
3640
pol = NULL;
net/xfrm/xfrm_policy.c
3643
return pol;
net/xfrm/xfrm_policy.c
3680
struct xfrm_policy *pol;
net/xfrm/xfrm_policy.c
3737
pol = NULL;
net/xfrm/xfrm_policy.c
3740
pol = xfrm_sk_policy_lookup(sk, dir, &fl, family, if_id);
net/xfrm/xfrm_policy.c
3741
if (IS_ERR(pol)) {
net/xfrm/xfrm_policy.c
3747
if (!pol)
net/xfrm/xfrm_policy.c
3748
pol = xfrm_policy_lookup(net, &fl, family, dir, if_id);
net/xfrm/xfrm_policy.c
3750
if (IS_ERR(pol)) {
net/xfrm/xfrm_policy.c
3755
if (!pol && dir == XFRM_POLICY_FWD)
net/xfrm/xfrm_policy.c
3756
pol = xfrm_in_fwd_icmp(skb, &fl, family, if_id);
net/xfrm/xfrm_policy.c
3758
if (!pol) {
net/xfrm/xfrm_policy.c
3776
WRITE_ONCE(pol->curlft.use_time, ktime_get_real_seconds());
net/xfrm/xfrm_policy.c
3778
pols[0] = pol;
net/xfrm/xfrm_policy.c
3799
if (pol->action == XFRM_POLICY_ALLOW) {
net/xfrm/xfrm_policy.c
3812
if (pols[pi] != pol &&
net/xfrm/xfrm_policy.c
3831
if (pol->xdo.type == XFRM_DEV_OFFLOAD_PACKET && sp == &dummy)
net/xfrm/xfrm_policy.c
4494
struct xfrm_policy *pol;
net/xfrm/xfrm_policy.c
4526
pol = xfrm_policy_lookup_bytype(net, type, &fl, sel->family, dir, if_id);
net/xfrm/xfrm_policy.c
4527
if (IS_ERR_OR_NULL(pol))
net/xfrm/xfrm_policy.c
4530
if (!xfrm_pol_hold_rcu(pol))
net/xfrm/xfrm_policy.c
4531
pol = NULL;
net/xfrm/xfrm_policy.c
4534
return pol;
net/xfrm/xfrm_policy.c
4568
static int xfrm_policy_migrate(struct xfrm_policy *pol,
net/xfrm/xfrm_policy.c
4575
write_lock_bh(&pol->lock);
net/xfrm/xfrm_policy.c
4576
if (unlikely(pol->walk.dead)) {
net/xfrm/xfrm_policy.c
4579
write_unlock_bh(&pol->lock);
net/xfrm/xfrm_policy.c
4583
for (i = 0; i < pol->xfrm_nr; i++) {
net/xfrm/xfrm_policy.c
4585
if (!migrate_tmpl_match(mp, &pol->xfrm_vec[i]))
net/xfrm/xfrm_policy.c
4588
if (pol->xfrm_vec[i].mode != XFRM_MODE_TUNNEL &&
net/xfrm/xfrm_policy.c
4589
pol->xfrm_vec[i].mode != XFRM_MODE_BEET &&
net/xfrm/xfrm_policy.c
4590
pol->xfrm_vec[i].mode != XFRM_MODE_IPTFS)
net/xfrm/xfrm_policy.c
4593
memcpy(&pol->xfrm_vec[i].id.daddr, &mp->new_daddr,
net/xfrm/xfrm_policy.c
4594
sizeof(pol->xfrm_vec[i].id.daddr));
net/xfrm/xfrm_policy.c
4595
memcpy(&pol->xfrm_vec[i].saddr, &mp->new_saddr,
net/xfrm/xfrm_policy.c
4596
sizeof(pol->xfrm_vec[i].saddr));
net/xfrm/xfrm_policy.c
4597
pol->xfrm_vec[i].encap_family = mp->new_family;
net/xfrm/xfrm_policy.c
4599
atomic_inc(&pol->genid);
net/xfrm/xfrm_policy.c
4603
write_unlock_bh(&pol->lock);
net/xfrm/xfrm_policy.c
4654
struct xfrm_policy *pol = NULL;
net/xfrm/xfrm_policy.c
4672
pol = xfrm_migrate_policy_find(sel, dir, type, net, if_id);
net/xfrm/xfrm_policy.c
4673
if (IS_ERR_OR_NULL(pol)) {
net/xfrm/xfrm_policy.c
4675
err = IS_ERR(pol) ? PTR_ERR(pol) : -ENOENT;
net/xfrm/xfrm_policy.c
4696
err = xfrm_policy_migrate(pol, m, num_migrate, extack);
net/xfrm/xfrm_policy.c
4709
xfrm_pol_put(pol);
net/xfrm/xfrm_policy.c
4716
if (pol)
net/xfrm/xfrm_policy.c
4717
xfrm_pol_put(pol);
net/xfrm/xfrm_policy.c
579
struct xfrm_policy *pol;
net/xfrm/xfrm_policy.c
585
hlist_for_each_entry_safe(pol, tmp, list, bydst) {
net/xfrm/xfrm_policy.c
588
__get_hash_thresh(net, pol->family, dir, &dbits, &sbits);
net/xfrm/xfrm_policy.c
589
h = __addr_hash(&pol->selector.daddr, &pol->selector.saddr,
net/xfrm/xfrm_policy.c
590
pol->family, nhashmask, dbits, sbits);
net/xfrm/xfrm_policy.c
591
if (!entry0 || pol->xdo.type == XFRM_DEV_OFFLOAD_PACKET) {
net/xfrm/xfrm_policy.c
592
hlist_del_rcu(&pol->bydst);
net/xfrm/xfrm_policy.c
593
hlist_add_head_rcu(&pol->bydst, ndsttable + h);
net/xfrm/xfrm_policy.c
598
hlist_del_rcu(&pol->bydst);
net/xfrm/xfrm_policy.c
599
hlist_add_behind_rcu(&pol->bydst, entry0);
net/xfrm/xfrm_policy.c
601
entry0 = &pol->bydst;
net/xfrm/xfrm_policy.c
614
struct xfrm_policy *pol;
net/xfrm/xfrm_policy.c
616
hlist_for_each_entry_safe(pol, tmp, list, byidx) {
net/xfrm/xfrm_policy.c
619
h = __idx_hash(pol->index, nhashmask);
net/xfrm/xfrm_policy.c
620
hlist_add_head(&pol->byidx, nidxtable+h);
net/xfrm/xfrm_policy.c
749
xfrm_policy_inexact_alloc_bin(const struct xfrm_policy *pol, u8 dir)
net/xfrm/xfrm_policy.c
753
.family = pol->family,
net/xfrm/xfrm_policy.c
754
.type = pol->type,
net/xfrm/xfrm_policy.c
756
.if_id = pol->if_id,
net/xfrm/xfrm_policy.c
758
struct net *net = xp_net(pol);
net/xfrm/xfrm_state.c
1301
static void xfrm_state_look_at(struct xfrm_policy *pol, struct xfrm_state *x,
net/xfrm/xfrm_state.c
1321
!security_xfrm_state_pol_flow_match(x, pol,
net/xfrm/xfrm_state.c
1342
security_xfrm_state_pol_flow_match(x, pol,
net/xfrm/xfrm_state.c
1351
struct xfrm_policy *pol, int *err,
net/xfrm/xfrm_state.c
1356
struct net *net = xp_net(pol);
net/xfrm/xfrm_state.c
1362
u32 mark = pol->mark.v & pol->mark.m;
net/xfrm/xfrm_state.c
1381
hlist_for_each_entry_rcu(x, &pol->state_cache_list, state_cache) {
net/xfrm/xfrm_state.c
1391
xfrm_state_look_at(pol, x, fl, encap_family,
net/xfrm/xfrm_state.c
1398
hlist_for_each_entry_rcu(x, &pol->state_cache_list, state_cache) {
net/xfrm/xfrm_state.c
1408
xfrm_state_look_at(pol, x, fl, family,
net/xfrm/xfrm_state.c
1424
if (pol->xdo.type == XFRM_DEV_OFFLOAD_PACKET) {
net/xfrm/xfrm_state.c
1434
if (pol->xdo.dev != x->xso.dev)
net/xfrm/xfrm_state.c
1449
xfrm_state_look_at(pol, x, fl, family,
net/xfrm/xfrm_state.c
1459
if (pol->xdo.type == XFRM_DEV_OFFLOAD_PACKET) {
net/xfrm/xfrm_state.c
1469
if (pol->xdo.dev != x->xso.dev)
net/xfrm/xfrm_state.c
1484
xfrm_state_look_at(pol, x, fl, family,
net/xfrm/xfrm_state.c
1489
if (!(pol->flags & XFRM_POLICY_CPU_ACQUIRE) ||
net/xfrm/xfrm_state.c
1498
&pol->xdo)) != NULL) {
net/xfrm/xfrm_state.c
1522
memcpy(&x->mark, &pol->mark, sizeof(x->mark));
net/xfrm/xfrm_state.c
1524
if ((pol->flags & XFRM_POLICY_CPU_ACQUIRE) && best)
net/xfrm/xfrm_state.c
1527
error = security_xfrm_state_alloc_acquire(x, pol->security, fl->flowi_secid);
net/xfrm/xfrm_state.c
1535
if (pol->xdo.type == XFRM_DEV_OFFLOAD_PACKET) {
net/xfrm/xfrm_state.c
1536
struct xfrm_dev_offload *xdo = &pol->xdo;
net/xfrm/xfrm_state.c
1559
if (km_query(x, tmpl, pol) == 0) {
net/xfrm/xfrm_state.c
1623
(!(pol->flags & XFRM_POLICY_CPU_ACQUIRE) || x->pcpu_num == pcpu_id)) {
net/xfrm/xfrm_state.c
1626
hlist_add_head_rcu(&x->state_cache, &pol->state_cache_list);
net/xfrm/xfrm_state.c
232
int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol);
net/xfrm/xfrm_state.c
2775
int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol)
net/xfrm/xfrm_state.c
2782
acqret = km->acquire(x, t, pol);
net/xfrm/xfrm_state.c
2826
void km_policy_expired(struct xfrm_policy *pol, int dir, int hard, u32 portid)
net/xfrm/xfrm_state.c
2833
km_policy_notify(pol, dir, &c);
net/xfrm/xfrm_state.c
2963
struct xfrm_policy *pol = NULL;
net/xfrm/xfrm_state.c
2998
pol = km->compile_policy(sk, optname, data,
net/xfrm/xfrm_state.c
3006
xfrm_sk_policy_insert(sk, err, pol);
net/xfrm/xfrm_state.c
3007
xfrm_pol_put(pol);
net/xfrm/xfrm_user.c
2016
static int copy_from_user_sec_ctx(struct xfrm_policy *pol, struct nlattr **attrs)
net/xfrm/xfrm_user.c
2025
return security_xfrm_policy_alloc(&pol->security, uctx, GFP_KERNEL);
net/xfrm/xfrm_user.c
2122
static int copy_from_user_tmpl(struct xfrm_policy *pol, struct nlattr **attrs,
net/xfrm/xfrm_user.c
2128
pol->xfrm_nr = 0;
net/xfrm/xfrm_user.c
2134
err = validate_tmpl(nr, utmpl, pol->family, dir, extack);
net/xfrm/xfrm_user.c
2138
copy_templates(pol, utmpl, nr);
net/xfrm/xfrm_user.c
2893
struct xfrm_userpolicy_info *p = &up->pol;
net/xfrm/xfrm_user.c
3946
copy_to_user_policy(xp, &upe->pol, dir);
security/ipe/eval.c
319
struct ipe_policy *pol = NULL;
security/ipe/eval.c
328
pol = rcu_dereference(ipe_active_policy);
security/ipe/eval.c
329
if (!pol) {
security/ipe/eval.c
335
if (pol->parsed->global_default_action == IPE_ACTION_INVALID) {
security/ipe/eval.c
339
action = pol->parsed->global_default_action;
security/ipe/eval.c
345
rules = &pol->parsed->rules[ctx->op];
security/ipe/eval.c
367
action = pol->parsed->global_default_action;
security/ipe/policy.h
92
void ipe_free_policy(struct ipe_policy *pol);
security/ipe/policy_tests.c
250
struct ipe_policy *pol;
security/ipe/policy_tests.c
252
pol = ipe_new_policy(p->policy, strlen(p->policy), NULL, 0);
security/ipe/policy_tests.c
255
KUNIT_EXPECT_EQ(test, PTR_ERR(pol), p->errno);
security/ipe/policy_tests.c
259
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, pol);
security/ipe/policy_tests.c
260
KUNIT_EXPECT_NOT_ERR_OR_NULL(test, pol->parsed);
security/ipe/policy_tests.c
261
KUNIT_EXPECT_STREQ(test, pol->text, p->policy);
security/ipe/policy_tests.c
262
KUNIT_EXPECT_PTR_EQ(test, NULL, pol->pkcs7);
security/ipe/policy_tests.c
263
KUNIT_EXPECT_EQ(test, 0, pol->pkcs7len);
security/ipe/policy_tests.c
265
ipe_free_policy(pol);
security/ipe/policy_tests.c
278
struct ipe_policy *pol = NULL;
security/ipe/policy_tests.c
280
pol = ipe_new_policy((const char *)policy, (ARRAY_SIZE(policy) - 1) * 2, NULL, 0);
security/ipe/policy_tests.c
281
KUNIT_EXPECT_TRUE(test, IS_ERR_OR_NULL(pol));
security/ipe/policy_tests.c
283
ipe_free_policy(pol);
security/safesetid/lsm.c
70
struct setid_ruleset *pol;
security/safesetid/lsm.c
74
pol = rcu_dereference(safesetid_setuid_rules);
security/safesetid/lsm.c
76
pol = rcu_dereference(safesetid_setgid_rules);
security/safesetid/lsm.c
83
if (pol) {
security/safesetid/lsm.c
84
pol->type = new_type;
security/safesetid/lsm.c
85
result = _setid_policy_lookup(pol, src, dst);
security/safesetid/securityfs.c
104
hash_for_each(pol->rules, bucket, rule, next) {
security/safesetid/securityfs.c
105
if (_setid_policy_lookup(pol, rule->dst_id, INVALID_ID) == SIDPOL_DEFAULT) {
security/safesetid/securityfs.c
106
if (pol->type == UID) {
security/safesetid/securityfs.c
110
} else if (pol->type == GID) {
security/safesetid/securityfs.c
124
if (pol->type == UID){
security/safesetid/securityfs.c
133
insert_rule(pol, nrule);
security/safesetid/securityfs.c
142
struct setid_ruleset *pol;
security/safesetid/securityfs.c
149
pol = kmalloc_obj(struct setid_ruleset);
security/safesetid/securityfs.c
150
if (!pol)
security/safesetid/securityfs.c
152
pol->policy_str = NULL;
security/safesetid/securityfs.c
153
pol->type = policy_type;
security/safesetid/securityfs.c
154
hash_init(pol->rules);
security/safesetid/securityfs.c
161
pol->policy_str = kstrdup(buf, GFP_KERNEL);
security/safesetid/securityfs.c
162
if (pol->policy_str == NULL) {
security/safesetid/securityfs.c
189
if (_setid_policy_lookup(pol, rule->src_id, rule->dst_id) == SIDPOL_ALLOWED) {
security/safesetid/securityfs.c
195
insert_rule(pol, rule);
security/safesetid/securityfs.c
204
err = verify_ruleset(pol);
security/safesetid/securityfs.c
216
pol = rcu_replace_pointer(safesetid_setuid_rules, pol,
security/safesetid/securityfs.c
221
pol = rcu_replace_pointer(safesetid_setgid_rules, pol,
security/safesetid/securityfs.c
233
if (pol)
security/safesetid/securityfs.c
234
release_ruleset(pol);
security/safesetid/securityfs.c
270
struct setid_ruleset *pol;
security/safesetid/securityfs.c
274
pol = rcu_dereference_protected(ruleset, lockdep_is_held(policy_update_lock));
security/safesetid/securityfs.c
275
if (pol) {
security/safesetid/securityfs.c
276
kbuf = pol->policy_str;
security/safesetid/securityfs.c
72
struct setid_ruleset *pol =
security/safesetid/securityfs.c
78
hash_for_each_safe(pol->rules, bucket, tmp, rule, next)
security/safesetid/securityfs.c
80
kfree(pol->policy_str);
security/safesetid/securityfs.c
81
kfree(pol);
security/safesetid/securityfs.c
84
static void release_ruleset(struct setid_ruleset *pol){
security/safesetid/securityfs.c
85
call_rcu(&pol->rcu, __release_ruleset);
security/safesetid/securityfs.c
88
static void insert_rule(struct setid_ruleset *pol, struct setid_rule *rule)
security/safesetid/securityfs.c
90
if (pol->type == UID)
security/safesetid/securityfs.c
91
hash_add(pol->rules, &rule->next, __kuid_val(rule->src_id.uid));
security/safesetid/securityfs.c
92
else if (pol->type == GID)
security/safesetid/securityfs.c
93
hash_add(pol->rules, &rule->next, __kgid_val(rule->src_id.gid));
security/safesetid/securityfs.c
98
static int verify_ruleset(struct setid_ruleset *pol)
security/selinux/ss/avtab.c
306
int avtab_read_item(struct avtab *a, struct policy_file *fp, struct policydb *pol,
security/selinux/ss/avtab.c
319
unsigned int set, vers = pol->policyvers;
security/selinux/ss/avtab.c
407
if (!policydb_type_isvalid(pol, key.source_type) ||
security/selinux/ss/avtab.c
408
!policydb_type_isvalid(pol, key.target_type) ||
security/selinux/ss/avtab.c
409
!policydb_class_isvalid(pol, key.target_class)) {
security/selinux/ss/avtab.c
464
!policydb_type_isvalid(pol, datum.u.data)) {
security/selinux/ss/avtab.c
477
int avtab_read(struct avtab *a, struct policy_file *fp, struct policydb *pol)
security/selinux/ss/avtab.c
500
rc = avtab_read_item(a, fp, pol, avtab_insertf, NULL, false);
security/selinux/ss/avtab.h
109
int avtab_read_item(struct avtab *a, struct policy_file *fp, struct policydb *pol,
security/selinux/ss/avtab.h
114
int avtab_read(struct avtab *a, struct policy_file *fp, struct policydb *pol);
security/selinux/ss/mls.c
230
int mls_context_to_sid(struct policydb *pol, char oldc, char *scontext,
security/selinux/ss/mls.c
240
if (!pol->mls_enabled) {
security/selinux/ss/mls.c
289
levdatum = symtab_search(&pol->p_levels, sensitivity);
security/selinux/ss/mls.c
308
catdatum = symtab_search(&pol->p_cats, cur_cat);
security/selinux/ss/mls.c
321
rngdatum = symtab_search(&pol->p_cats, rngptr);
security/selinux/ss/services.c
128
p_out->value = string_to_security_class(pol, p_in->name);
security/selinux/ss/services.c
132
if (pol->reject_unknown)
security/selinux/ss/services.c
146
p_out->perms[k] = string_to_av_perm(pol, p_out->value,
security/selinux/ss/services.c
1474
static int string_to_context_struct(struct policydb *pol,
security/selinux/ss/services.c
1503
usrdatum = symtab_search(&pol->p_users, scontextp);
security/selinux/ss/services.c
151
if (pol->reject_unknown)
security/selinux/ss/services.c
1519
role = symtab_search(&pol->p_roles, scontextp);
security/selinux/ss/services.c
1531
typdatum = symtab_search(&pol->p_types, scontextp);
security/selinux/ss/services.c
1537
rc = mls_context_to_sid(pol, oldc, p, ctx, sidtabp, def_sid);
security/selinux/ss/services.c
1543
if (!policydb_context_isvalid(pol, ctx))
security/selinux/ss/services.c
163
pol->allow_unknown ? "allowed" : "denied");
security/selinux/ss/services.c
96
static int selinux_set_mapping(struct policydb *pol,
sound/hda/codecs/realtek/alc269.c
1314
int pol, pin;
sound/hda/codecs/realtek/alc269.c
1315
if (sscanf(dev->name, "HP_Mute_LED_%d_%x", &pol, &pin) != 2)
sound/hda/codecs/realtek/alc269.c
1319
spec->mute_led_polarity = pol;
tools/power/cpupower/lib/cpufreq.c
701
struct cpufreq_policy *pol = cpufreq_get_policy(cpu);
tools/power/cpupower/lib/cpufreq.c
706
if (!pol)
tools/power/cpupower/lib/cpufreq.c
709
if (strncmp(pol->governor, userspace_gov, 9) != 0) {
tools/power/cpupower/lib/cpufreq.c
712
cpufreq_put_policy(pol);
tools/power/cpupower/lib/cpufreq.c
717
cpufreq_put_policy(pol);
tools/testing/selftests/net/ipsec.c
1549
memcpy(&req.expire.pol.sel.daddr, &dst, sizeof(tundst));
tools/testing/selftests/net/ipsec.c
1550
memcpy(&req.expire.pol.sel.saddr, &src, sizeof(tunsrc));
tools/testing/selftests/net/ipsec.c
1551
req.expire.pol.sel.family = AF_INET;
tools/testing/selftests/net/ipsec.c
1552
req.expire.pol.sel.prefixlen_d = PREFIX_LEN;
tools/testing/selftests/net/ipsec.c
1553
req.expire.pol.sel.prefixlen_s = PREFIX_LEN;
tools/testing/selftests/net/ipsec.c
1554
req.expire.pol.dir = XFRM_POLICY_OUT;
tools/testing/vma/include/stubs.h
371
static inline void mpol_put(struct mempolicy *pol)