Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
arch/x86/events/intel/uncore_nhmex.c
static void nhmex_uncore_msr_disable_event(struct intel_uncore_box *box, struct perf_event *event) { wrmsrl(event->hw.config_base, 0); }
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snb.c
static void snb_uncore_msr_init_box(struct intel_uncore_box *box) { if (box->pmu->pmu_idx == 0) { wrmsrl(SNB_UNC_PERF_GLOBAL_CTL, SNB_UNC_GLOBAL_CTL_EN | SNB_UNC_GLOBAL_CTL_CORE_ALL); } }
[ 1, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snb.c
void icl_uncore_cpu_init(void) { uncore_msr_uncores = icl_msr_uncores; icl_uncore_cbox.num_boxes = icl_get_cbox_num(); }
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snb.c
int skl_uncore_pci_init(void) { return imc_uncore_pci_init(); }
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snb.c
static void nhm_uncore_msr_enable_event(struct intel_uncore_box *box, struct perf_event *event) { struct hw_perf_event *hwc = &event->hw; if (hwc->idx < UNCORE_PMC_IDX_FIXED) wrmsrl(hwc->config_base, hwc->config | SNB_UNC_CTL_EN); else wrmsrl(hwc->config_base, NHM...
[ 1, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snb.c
static void __uncore_imc_init_box(struct intel_uncore_box *box, unsigned int base_offset) { struct pci_dev *pdev = tgl_uncore_get_mc_dev(); struct intel_uncore_pmu *pmu = box->pmu; struct intel_uncore_type *type = pmu->type; resource_size_t addr; u32 mch_bar; if (!pdev) { ...
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snb.c
void tgl_l_uncore_mmio_init(void) { tgl_uncore_imc_free_running.freerunning = tgl_l_uncore_imc_freerunning; uncore_mmio_uncores = tgl_mmio_uncores; }
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snb.c
static void adl_uncore_imc_init_box(struct intel_uncore_box *box) { __uncore_imc_init_box(box, ADL_UNCORE_IMC_BASE); if (box->io_addr && (box->pmu->pmu_idx == 1)) writel(ADL_UNCORE_IMC_CTL_INT, box->io_addr + ADL_UNCORE_IMC_GLOBAL_CTL); }
[ 1, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snb.c
static void adl_uncore_mmio_disable_box(struct intel_uncore_box *box) { if (!box->io_addr) return; writel(ADL_UNCORE_IMC_CTL_FRZ, box->io_addr + uncore_mmio_box_ctl(box)); }
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snb.c
void adl_uncore_mmio_init(void) { uncore_mmio_uncores = adl_mmio_uncores; }
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static void snbep_uncore_pci_disable_event(struct intel_uncore_box *box, struct perf_event *event) { struct pci_dev *pdev = box->pci_dev; struct hw_perf_event *hwc = &event->hw; pci_write_config_dword(pdev, hwc->config_base, hwc->config); }
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static u64 snbep_uncore_pci_read_counter(struct intel_uncore_box *box, struct perf_event *event) { struct pci_dev *pdev = box->pci_dev; struct hw_perf_event *hwc = &event->hw; u64 count = 0; pci_read_config_dword(pdev, hwc->event_base, (u32 *)&count); pci_read_config...
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static void snbep_uncore_msr_disable_box(struct intel_uncore_box *box) { u64 config; unsigned msr; msr = uncore_msr_box_ctl(box); if (msr) { rdmsrl(msr, config); config |= SNBEP_PMON_BOX_CTL_FRZ; wrmsrl(msr, config); } }
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static void snbep_uncore_msr_enable_box(struct intel_uncore_box *box) { u64 config; unsigned msr; msr = uncore_msr_box_ctl(box); if (msr) { rdmsrl(msr, config); config &= ~SNBEP_PMON_BOX_CTL_FRZ; wrmsrl(msr, config); } }
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static void snbep_uncore_msr_disable_event(struct intel_uncore_box *box, struct perf_event *event) { struct hw_perf_event *hwc = &event->hw; wrmsrl(hwc->config_base, hwc->config); }
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static struct event_constraint * __snbep_cbox_get_constraint(struct intel_uncore_box *box, struct perf_event *event, u64 (*cbox_filter_mask)(int fields)) { struct hw_perf_event_extra *reg1 = &event->hw.extra_reg; struct intel_uncore_extra_reg *er = &box->shar...
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static void snbep_qpi_enable_event(struct intel_uncore_box *box, struct perf_event *event) { struct pci_dev *pdev = box->pci_dev; struct hw_perf_event *hwc = &event->hw; struct hw_perf_event_extra *reg1 = &hwc->extra_reg; struct hw_perf_event_extra *reg2 = &hwc->branch_reg; ...
[ 1, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static int upi_nodeid_groupid(struct pci_dev *ubox_dev, int nodeid_loc, int idmap_loc, int *nodeid, int *groupid) { int ret; ret = pci_read_config_dword(ubox_dev, nodeid_loc, nodeid); if (ret) goto err; *nodeid = *nodeid & NODE_ID_MASK; /* get the Node ID mapping */ ret =...
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
int snbep_uncore_pci_init(void) { int ret = snbep_pci2phy_map_init(0x3ce0, SNBEP_CPUNODEID, SNBEP_GIDNIDMAP, true); if (ret) return ret; uncore_pci_uncores = snbep_pci_uncores; uncore_pci_driver = &snbep_uncore_pci_driver; return 0; }
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static void ivbep_uncore_pci_init_box(struct intel_uncore_box *box) { struct pci_dev *pdev = box->pci_dev; pci_write_config_dword(pdev, SNBEP_PCI_PMON_BOX_CTL, IVBEP_PMON_BOX_CTL_INT); } #define IVBEP_UNCORE_MSR_OPS_COMMON_INIT() \ .init_box = ivbep_uncore_msr_init_box, ...
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static u64 ivbep_uncore_irp_read_counter(struct intel_uncore_box *box, struct perf_event *event) { struct pci_dev *pdev = box->pci_dev; struct hw_perf_event *hwc = &event->hw; u64 count = 0; pci_read_config_dword(pdev, ivbep_uncore_irp_ctrs[hwc->idx], (u32 *)&count); ...
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static void knl_uncore_imc_enable_event(struct intel_uncore_box *box, struct perf_event *event) { struct pci_dev *pdev = box->pci_dev; struct hw_perf_event *hwc = &event->hw; if ((event->attr.config & SNBEP_PMON_CTL_EV_SEL_MASK) == UNCORE_FIXED_EVENT) pci_write_config...
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static void hswep_cbox_enable_event(struct intel_uncore_box *box, struct perf_event *event) { struct hw_perf_event *hwc = &event->hw; struct hw_perf_event_extra *reg1 = &hwc->extra_reg; if (reg1->idx != EXTRA_REG_NONE) { u64 filter = uncore_shared_reg_config(box, 0); ...
[ 1, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
int hswep_uncore_pci_init(void) { int ret = snbep_pci2phy_map_init(0x2f1e, SNBEP_CPUNODEID, SNBEP_GIDNIDMAP, true); if (ret) return ret; uncore_pci_uncores = hswep_pci_uncores; uncore_pci_driver = &hswep_uncore_pci_driver; return 0; }
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
void bdx_uncore_cpu_init(void) { if (bdx_uncore_cbox.num_boxes > boot_cpu_data.x86_max_cores) bdx_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores; uncore_msr_uncores = bdx_msr_uncores; if ((boot_cpu_data.x86_model == 86) || hswep_has_limit_sbox(BDX_PCU_DID)) uncore_msr_uncores[BDX_MSR_UNCORE_SBOX] = ...
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static u64 skx_cha_filter_mask(int fields) { u64 mask = 0; if (fields & 0x1) mask |= SKX_CHA_MSR_PMON_BOX_FILTER_TID; if (fields & 0x2) mask |= SKX_CHA_MSR_PMON_BOX_FILTER_LINK; if (fields & 0x4) mask |= SKX_CHA_MSR_PMON_BOX_FILTER_STATE; if (fields & 0x8) { mask |= SKX_CHA_MSR_PMON_BOX_FILT...
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static struct event_constraint * skx_cha_get_constraint(struct intel_uncore_box *box, struct perf_event *event) { return __snbep_cbox_get_constraint(box, event, skx_cha_filter_mask); }
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static void skx_iio_enable_event(struct intel_uncore_box *box, struct perf_event *event) { struct hw_perf_event *hwc = &event->hw; wrmsrl(hwc->config_base, hwc->config | SNBEP_PMON_CTL_EN); }
[ 1, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static struct intel_uncore_topology *pmu_topology(struct intel_uncore_pmu *pmu, int die) { int idx; for (idx = 0; idx < pmu->type->num_boxes; idx++) { if (pmu->type->topology[die][idx].pmu_idx == pmu->pmu_idx) return &pmu->type->topology[die][idx]; } ...
[ 1, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static int skx_msr_cpu_bus_read(int cpu, u64 *topology) { u64 msr_value; if (rdmsrl_on_cpu(cpu, SKX_MSR_CPU_BUS_NUMBER, &msr_value) || !(msr_value & SKX_MSR_CPU_BUS_VALID_BIT)) return -ENXIO; *topology = msr_value; return 0; }
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static int pmu_alloc_topology(struct intel_uncore_type *type, int topology_type) { int die, idx; struct intel_uncore_topology **topology; if (!type->num_boxes) return -EPERM; topology = kcalloc(uncore_max_dies(), sizeof(*topology), GFP_KERNEL); if (!topology) goto err;...
[ 1, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static void skx_upi_uncore_pci_init_box(struct intel_uncore_box *box) { struct pci_dev *pdev = box->pci_dev; __set_bit(UNCORE_BOX_FLAG_CTL_OFFS8, &box->flags); pci_write_config_dword(pdev, SKX_UPI_PCI_PMON_BOX_CTL, IVBEP_PMON_BOX_CTL_INT); }
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static umode_t skx_upi_mapping_visible(struct kobject *kobj, struct attribute *attr, int die) { struct intel_uncore_pmu *pmu = dev_to_uncore_pmu(kobj_to_dev(kobj)); return pmu->type->topology[die][pmu->pmu_idx].upi->enabled ? attr->mode : 0; }
[ 1, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static void snr_iio_cleanup_mapping(struct intel_uncore_type *type) { pmu_cleanup_mapping(type, &snr_iio_mapping_group); }
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static void snr_uncore_mmio_enable_event(struct intel_uncore_box *box, struct perf_event *event) { struct hw_perf_event *hwc = &event->hw; if (!box->io_addr) return; if (!uncore_mmio_is_valid_offset(box, hwc->config_base)) return; writel(hwc->config | SNBEP_P...
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static void icx_iio_cleanup_mapping(struct intel_uncore_type *type) { pmu_cleanup_mapping(type, &icx_iio_mapping_group); }
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static u64 icx_count_chabox(void) { struct pci_dev *dev = NULL; u64 caps = 0; dev = pci_get_device(PCI_VENDOR_ID_INTEL, 0x345b, dev); if (!dev) goto out; pci_read_config_dword(dev, ICX_CAPID6, (u32 *)&caps); pci_read_config_dword(dev, ICX_CAPID7, (u32 *)&caps + 1); out: pci_dev_put(dev); return h...
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
void icx_uncore_cpu_init(void) { u64 num_boxes = icx_count_chabox(); if (WARN_ON(num_boxes > ARRAY_SIZE(icx_cha_msr_offsets))) return; icx_uncore_chabox.num_boxes = num_boxes; uncore_msr_uncores = icx_msr_uncores; }
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static int icx_upi_get_topology(struct intel_uncore_type *type) { return discover_upi_topology(type, ICX_UBOX_DID, ICX_UPI_REGS_ADDR_DEVICE_LINK0); }
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static void icx_upi_set_mapping(struct intel_uncore_type *type) { pmu_upi_set_mapping(type, &icx_upi_mapping_group); }
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static void spr_uncore_msr_enable_event(struct intel_uncore_box *box, struct perf_event *event) { struct hw_perf_event *hwc = &event->hw; struct hw_perf_event_extra *reg1 = &hwc->extra_reg; if (reg1->idx != EXTRA_REG_NONE) wrmsrl(reg1->reg, reg1->config); wrmsrl(hwc...
[ 0, 0 ]
Linux Kernel
arch/x86/events/intel/uncore_snbep.c
static ssize_t alias_show(struct device *dev, struct device_attribute *attr, char *buf) { struct intel_uncore_pmu *pmu = dev_to_uncore_pmu(dev); char pmu_name[UNCORE_PMU_NAME_LEN]; uncore_get_alias_name(pmu_name, pmu); return sysfs_emit(buf, "%s\n", pmu_name); }
[ 0, 0 ]
Linux Kernel
arch/x86/events/msr.c
static int msr_event_init(struct perf_event *event) { u64 cfg = event->attr.config; if (event->attr.type != event->pmu->type) return -ENOENT; if (event->attr.sample_period) /* no sampling */ return -EINVAL; if (cfg >= PERF_MSR_EVENT_MAX) return -EINVAL; cfg = array_index_nospec((unsigned long)...
[ 1, 0 ]
Linux Kernel
arch/x86/events/msr.c
static void msr_event_start(struct perf_event *event, int flags) { u64 now = msr_read_counter(event); local64_set(&event->hw.prev_count, now); }
[ 0, 0 ]
Linux Kernel
arch/x86/events/msr.c
static void msr_event_stop(struct perf_event *event, int flags) { msr_event_update(event); }
[ 0, 0 ]
Linux Kernel
arch/x86/events/perf_event.h
static inline unsigned int x86_pmu_config_addr(int index) { return x86_pmu.eventsel + (x86_pmu.addr_offset ? x86_pmu.addr_offset(index, true) : index); }
[ 0, 0 ]
Linux Kernel
arch/x86/events/perf_event.h
static inline unsigned int x86_pmu_event_addr(int index) { return x86_pmu.perfctr + (x86_pmu.addr_offset ? x86_pmu.addr_offset(index, false) : index); }
[ 0, 0 ]
Linux Kernel
arch/x86/events/perf_event.h
static inline int x86_pmu_rdpmc_index(int index) { return x86_pmu.rdpmc_index ? x86_pmu.rdpmc_index(index) : index; }
[ 0, 0 ]
Linux Kernel
arch/x86/events/perf_event.h
static inline void x86_pmu_disable_event(struct perf_event *event) { u64 disable_mask = __this_cpu_read(cpu_hw_events.perf_ctr_virt_mask); struct hw_perf_event *hwc = &event->hw; wrmsrl(hwc->config_base, hwc->config & ~disable_mask); if (is_counter_pair(hwc)) wrmsrl(x86_pmu_config_addr(hwc->idx + 1), 0);...
[ 0, 0 ]
Linux Kernel
arch/x86/events/perf_event.h
static inline void amd_pmu_brs_add(struct perf_event *event) { struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); perf_sched_cb_inc(event->pmu); cpuc->lbr_users++; }
[ 0, 0 ]
Linux Kernel
arch/x86/events/perf_event.h
static inline int amd_brs_init(void) { return 0; }
[ 0, 0 ]
Linux Kernel
arch/x86/events/perf_event.h
static inline void amd_brs_enable(void) {}
[ 0, 0 ]
Linux Kernel
arch/x86/events/perf_event.h
static inline void amd_brs_lopwr_init(void) {}
[ 0, 0 ]
Linux Kernel
arch/x86/events/perf_event.h
static inline void amd_pmu_brs_del(struct perf_event *event) {}
[ 0, 0 ]
Linux Kernel
arch/x86/events/perf_event.h
static inline int amd_brs_init(void) { return -EOPNOTSUPP; }
[ 0, 0 ]
Linux Kernel
arch/x86/events/perf_event.h
static inline void amd_brs_enable_all(void) {}
[ 0, 0 ]
Linux Kernel
arch/x86/events/perf_event.h
static __always_inline void __intel_pmu_pebs_disable_all(void) { wrmsrl(MSR_IA32_PEBS_ENABLE, 0); }
[ 0, 0 ]
Linux Kernel
arch/x86/events/perf_event.h
static inline int is_ht_workaround_enabled(void) { return !!(x86_pmu.flags & PMU_FL_EXCL_ENABLED); } #else
[ 0, 0 ]
Linux Kernel
arch/x86/events/perf_event.h
static inline void release_ds_buffers(void) {}
[ 0, 0 ]
Linux Kernel
arch/x86/events/probe.c
static umode_t not_visible(struct kobject *kobj, struct attribute *attr, int i) { return 0; }
[ 0, 0 ]
Linux Kernel
arch/x86/events/probe.c
unsigned long perf_msr_probe(struct perf_msr *msr, int cnt, bool zero, void *data) { unsigned long avail = 0; unsigned int bit; u64 val; if (cnt >= BITS_PER_LONG) return 0; for (bit = 0; bit < cnt; bit++) { if (!msr[bit].no_check) { struct attribute_group *grp = ms...
[ 1, 0 ]
Linux Kernel
arch/x86/events/rapl.c
static void rapl_pmu_event_start(struct perf_event *event, int mode) { struct rapl_pmu *pmu = event->pmu_private; unsigned long flags; raw_spin_lock_irqsave(&pmu->lock, flags); __rapl_pmu_event_start(pmu, event); raw_spin_unlock_irqrestore(&pmu->lock, flags); }
[ 0, 0 ]
Linux Kernel
arch/x86/events/rapl.c
static void rapl_pmu_event_stop(struct perf_event *event, int mode) { struct rapl_pmu *pmu = event->pmu_private; struct hw_perf_event *hwc = &event->hw; unsigned long flags; raw_spin_lock_irqsave(&pmu->lock, flags); if (!(hwc->state & PERF_HES_STOPPED)) { WARN_ON_ONCE(pmu->n_active <= 0); pmu->n_act...
[ 0, 0 ]
Linux Kernel
arch/x86/events/rapl.c
static void rapl_pmu_event_del(struct perf_event *event, int flags) { rapl_pmu_event_stop(event, PERF_EF_UPDATE); }
[ 0, 0 ]
Linux Kernel
arch/x86/events/rapl.c
static int rapl_pmu_event_init(struct perf_event *event) { u64 cfg = event->attr.config & RAPL_EVENT_MASK; int bit, ret = 0; struct rapl_pmu *pmu; if (event->attr.type != rapl_pmus->pmu.type) return -ENOENT; /* check only supported bits are set */ if (event->attr.config & ~RAPL_EVENT_MASK) return ...
[ 1, 0 ]
Linux Kernel
arch/x86/events/rapl.c
static int rapl_cpu_online(unsigned int cpu) { struct rapl_pmu *pmu = cpu_to_rapl_pmu(cpu); int target; if (!pmu) { pmu = kzalloc_node(sizeof(*pmu), GFP_KERNEL, cpu_to_node(cpu)); if (!pmu) return -ENOMEM; raw_spin_lock_init(&pmu->lock); INIT_LIST_HEAD(&pmu->active_list); pmu->pmu = &r...
[ 0, 0 ]
Linux Kernel
arch/x86/events/rapl.c
static int __init rapl_pmu_init(void) { const struct x86_cpu_id *id; struct rapl_model *rm; int ret; id = x86_match_cpu(rapl_model_match); if (!id) return -ENODEV; rm = (struct rapl_model *)id->driver_data; rapl_msrs = rm->rapl_msrs; rapl_cntr_mask = perf_msr_probe(rapl_msrs, PERF_RAPL_MAX...
[ 0, 0 ]
Linux Kernel
arch/x86/events/zhaoxin/core.c
static void zhaoxin_pmu_disable_fixed(struct hw_perf_event *hwc) { int idx = hwc->idx - INTEL_PMC_IDX_FIXED; u64 ctrl_val, mask; mask = 0xfULL << (idx * 4); rdmsrl(hwc->config_base, ctrl_val); ctrl_val &= ~mask; wrmsrl(hwc->config_base, ctrl_val); }
[ 0, 0 ]
Linux Kernel
arch/x86/events/zhaoxin/core.c
static void zhaoxin_pmu_disable_event(struct perf_event *event) { struct hw_perf_event *hwc = &event->hw; if (unlikely(hwc->config_base == MSR_ARCH_PERFMON_FIXED_CTR_CTRL)) { zhaoxin_pmu_disable_fixed(hwc); return; } x86_pmu_disable_event(event); }
[ 0, 0 ]
Linux Kernel
arch/x86/events/zhaoxin/core.c
static int zhaoxin_pmu_handle_irq(struct pt_regs *regs) { struct perf_sample_data data; struct cpu_hw_events *cpuc; int handled = 0; u64 status; int bit; cpuc = this_cpu_ptr(&cpu_hw_events); apic_write(APIC_LVTPC, APIC_DM_NMI); zhaoxin_pmu_disable_all(); status = zhaoxin_pmu_get_status(); if (!stat...
[ 0, 0 ]
Linux Kernel
arch/x86/hyperv/hv_apic.c
static u64 hv_apic_icr_read(void) { u64 reg_val; rdmsrl(HV_X64_MSR_ICR, reg_val); return reg_val; }
[ 0, 0 ]
Linux Kernel
arch/x86/hyperv/hv_apic.c
static void hv_apic_icr_write(u32 low, u32 id) { u64 reg_val; reg_val = SET_XAPIC_DEST_FIELD(id); reg_val = reg_val << 32; reg_val |= low; wrmsrl(HV_X64_MSR_ICR, reg_val); }
[ 0, 0 ]
Linux Kernel
arch/x86/hyperv/hv_apic.c
static u32 hv_apic_read(u32 reg) { u32 reg_val, hi; switch (reg) { case APIC_EOI: rdmsr(HV_X64_MSR_EOI, reg_val, hi); (void)hi; return reg_val; case APIC_TASKPRI: rdmsr(HV_X64_MSR_TPR, reg_val, hi); (void)hi; return reg_val; default: return native_apic_mem_read(reg); } }
[ 0, 0 ]
Linux Kernel
arch/x86/hyperv/hv_apic.c
static void hv_send_ipi_mask_allbutself(const struct cpumask *mask, int vector) { if (!__send_ipi_mask(mask, vector, true)) orig_apic.send_IPI_mask_allbutself(mask, vector); }
[ 0, 0 ]
Linux Kernel
arch/x86/hyperv/hv_apic.c
static void hv_send_ipi_self(int vector) { if (!__send_ipi_one(smp_processor_id(), vector)) orig_apic.send_IPI_self(vector); }
[ 0, 0 ]
Linux Kernel
arch/x86/hyperv/hv_apic.c
void __init hv_apic_init(void) { if (ms_hyperv.hints & HV_X64_CLUSTER_IPI_RECOMMENDED) { pr_info("Hyper-V: Using IPI hypercalls\n"); orig_apic = *apic; apic->send_IPI = hv_send_ipi; apic->send_IPI_mask = hv_send_ipi_mask; apic->send_IPI_mask_allbutself = hv_send_ipi_mask_allbutself; apic->se...
[ 0, 0 ]
Linux Kernel
arch/x86/hyperv/hv_init.c
static int hv_cpu_init(unsigned int cpu) { union hv_vp_assist_msr_contents msr = {0}; struct hv_vp_assist_page **hvp = &hv_vp_assist_page[cpu]; int ret; ret = hv_common_cpu_init(cpu); if (ret) return ret; if (!hv_vp_assist_page) return 0; if (hv_root_partition) { rdmsrl(HV_X64_MSR_VP_ASSIS...
[ 0, 0 ]
Linux Kernel
arch/x86/hyperv/hv_init.c
void set_hv_tscchange_cb(void (*cb)(void)) { struct hv_reenlightenment_control re_ctrl = { .vector = HYPERV_REENLIGHTENMENT_VECTOR, .enabled = 1, }; struct hv_tsc_emulation_control emu_ctrl = {.enabled = 1}; if (!hv_reenlightenment_available()) { pr_warn("Hyper-V: reenlightenment support is una...
[ 0, 0 ]
Linux Kernel
arch/x86/hyperv/hv_init.c
void clear_hv_tscchange_cb(void) { struct hv_reenlightenment_control re_ctrl; if (!hv_reenlightenment_available()) return; rdmsrl(HV_X64_MSR_REENLIGHTENMENT_CONTROL, *(u64 *)&re_ctrl); re_ctrl.enabled = 0; wrmsrl(HV_X64_MSR_REENLIGHTENMENT_CONTROL, *(u64 *)&re_ctrl); hv_reenlightenment_cb = NULL; }
[ 0, 0 ]
Linux Kernel
arch/x86/hyperv/hv_init.c
static int hv_cpu_die(unsigned int cpu) { struct hv_reenlightenment_control re_ctrl; unsigned int new_cpu; void **ghcb_va; if (hv_ghcb_pg) { ghcb_va = (void **)this_cpu_ptr(hv_ghcb_pg); if (*ghcb_va) memunmap(*ghcb_va); *ghcb_va = NULL; } hv_common_cpu_die(cpu); if (hv_vp_assist_page ...
[ 0, 0 ]
Linux Kernel
arch/x86/hyperv/hv_init.c
static void __init hv_get_partition_id(void) { struct hv_get_partition_id *output_page; u64 status; unsigned long flags; local_irq_save(flags); output_page = *this_cpu_ptr(hyperv_pcpu_output_arg); status = hv_do_hypercall(HVCALL_GET_PARTITION_ID, NULL, output_page); if (!hv_result_success(status)) { ...
[ 0, 0 ]
Linux Kernel
arch/x86/hyperv/hv_init.c
bool hv_is_hyperv_initialized(void) { union hv_x64_msr_hypercall_contents hypercall_msr; if (x86_hyper_type != X86_HYPER_MS_HYPERV) return false; /* * Verify that earlier initialization succeeded by checking * that the hypercall page is setup */ hypercall_msr.as_uint64 = 0; rdmsrl(HV_X64_MSR_HY...
[ 0, 0 ]
Linux Kernel
arch/x86/hyperv/hv_spinlock.c
__visible bool hv_vcpu_is_preempted(int vcpu) { return false; }
[ 0, 0 ]
Linux Kernel
arch/x86/hyperv/irqdomain.c
static int hv_map_interrupt(union hv_device_id device_id, bool level, int cpu, int vector, struct hv_interrupt_entry *entry) { struct hv_input_map_device_interrupt *input; struct hv_output_map_device_interrupt *output; struct hv_device_interrupt_descriptor *intr_desc; unsigned long f...
[ 1, 0 ]
Linux Kernel
arch/x86/hyperv/irqdomain.c
static union hv_device_id hv_build_pci_dev_id(struct pci_dev *dev) { union hv_device_id dev_id; struct rid_data data = {.bridge = NULL, .rid = PCI_DEVID(dev->bus->number, dev->devfn)}; pci_for_each_dma_alias(dev, get_rid_cb, &data); dev_id.as_uint64 = 0; dev_id.device_type = HV_DEV...
[ 0, 0 ]
Linux Kernel
arch/x86/hyperv/irqdomain.c
static int hv_map_msi_interrupt(struct pci_dev *dev, int cpu, int vector, struct hv_interrupt_entry *entry) { union hv_device_id device_id = hv_build_pci_dev_id(dev); return hv_map_interrupt(device_id, false, cpu, vector, entry); }
[ 0, 0 ]
Linux Kernel
arch/x86/hyperv/irqdomain.c
int hv_unmap_ioapic_interrupt(int ioapic_id, struct hv_interrupt_entry *entry) { union hv_device_id device_id; device_id.as_uint64 = 0; device_id.device_type = HV_DEVICE_TYPE_IOAPIC; device_id.ioapic.ioapic_id = (u8)ioapic_id; return hv_unmap_interrupt(device_id.as_uint64, entry); }
[ 0, 0 ]
Linux Kernel
arch/x86/hyperv/ivm.c
void hv_ghcb_msr_read(u64 msr, u64 *value) { union hv_ghcb *hv_ghcb; void **ghcb_base; unsigned long flags; BUILD_BUG_ON(sizeof(union hv_ghcb) != HV_HYP_PAGE_SIZE); if (!hv_ghcb_pg) return; WARN_ON(in_nmi()); local_irq_save(flags); ghcb_base = (void **)this_cpu_ptr(hv_ghcb_pg); hv_ghcb = (unio...
[ 0, 0 ]
Linux Kernel
arch/x86/hyperv/ivm.c
static int hv_mark_gpa_visibility(u16 count, const u64 pfn[], enum hv_mem_host_visibility visibility) { struct hv_gpa_range_for_visibility **input_pcpu, *input; u16 pages_processed; u64 hv_status; unsigned long flags; if (!hv_is_isolation_supported()) return 0; if (co...
[ 1, 0 ]
Linux Kernel
arch/x86/hyperv/nested.c
int hyperv_flush_guest_mapping_range( u64 as, hyperv_fill_flush_list_func fill_flush_list_func, void *data) { struct hv_guest_mapping_flush_list **flush_pcpu; struct hv_guest_mapping_flush_list *flush; u64 status; unsigned long flags; int ret = -ENOTSUPP; int gpa_n = 0; if (!hv_hypercall_pg || !fill...
[ 0, 0 ]
Linux Kernel
arch/x86/ia32/audit.c
int ia32_classify_syscall(unsigned syscall) { switch (syscall) { case __NR_open: return AUDITSC_OPEN; case __NR_openat: return AUDITSC_OPENAT; case __NR_socketcall: return AUDITSC_SOCKETCALL; case __NR_execve: case __NR_execveat: return AUDITSC_EXECVE; case __NR_openat2: return AUDITS...
[ 0, 0 ]
Linux Kernel
arch/x86/include/asm/acpi.h
static inline void disable_acpi(void) { acpi_disabled = 1; acpi_pci_disabled = 1; acpi_noirq = 1; }
[ 0, 0 ]
Linux Kernel
arch/x86/include/asm/acpi.h
static inline void acpi_disable_pci(void) { acpi_pci_disabled = 1; acpi_noirq_set(); }
[ 0, 0 ]
Linux Kernel
arch/x86/include/asm/acpi.h
static inline int arch_apei_report_x86_error(struct cper_ia_proc_ctx *ctx_info, u64 lapic_id) { return -EINVAL; } #endif #define ACPI_TABLE_UPGRADE_MAX_PHYS (max_low_pfn_mapped << PAGE_SHIFT)
[ 0, 0 ]
Linux Kernel
arch/x86/include/asm/acrn.h
static inline unsigned long acrn_get_tsc_khz(void) { return cpuid_eax(ACRN_CPUID_TIMING_INFO); }
[ 0, 0 ]
Linux Kernel
arch/x86/include/asm/alternative.h
static inline void alternatives_smp_module_add(struct module *mod, char *name, void *locks, void *locks_end, void *text, void *text_end) {}
[ 0, 0 ]
Linux Kernel
arch/x86/include/asm/amd_nb.h
static inline u16 amd_pci_dev_to_node_id(struct pci_dev *pdev) { struct pci_dev *misc; int i; for (i = 0; i != amd_nb_num(); i++) { misc = node_to_amd_nb(i)->misc; if (pci_domain_nr(misc->bus) == pci_domain_nr(pdev->bus) && PCI_SLOT(misc->devfn) == PCI_SLOT(pdev->devfn)) return i; } ...
[ 0, 0 ]
Linux Kernel
arch/x86/include/asm/apic.h
static inline bool apic_from_smp_config(void) { return smp_found_config && !disable_apic; } #ifdef CONFIG_PARAVIRT #include <asm/paravirt.h> #endif
[ 0, 0 ]
Linux Kernel
arch/x86/include/asm/apic.h
static inline u32 native_apic_mem_read(u32 reg) { return *((volatile u32 *)(APIC_BASE + reg)); }
[ 0, 0 ]
Linux Kernel
arch/x86/include/asm/apic.h
static inline int apic_is_clustered_box(void) { return 0; }
[ 0, 0 ]