Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | arch/x86/include/asm/virtext.h | static inline void __cpu_emergency_vmxoff(void) {
if (cpu_vmx_enabled())
cpu_vmxoff();
} | [
0,
0
] |
Linux Kernel | arch/x86/include/asm/virtext.h | static inline void cpu_emergency_vmxoff(void) {
if (cpu_has_vmx())
__cpu_emergency_vmxoff();
} | [
0,
0
] |
Linux Kernel | arch/x86/include/asm/vm86.h | static inline void save_v86_state(struct kernel_vm86_regs *a, int b) {}
#define free_vm86(t) \
do { \
} while (0)
#endif
#endif /* _ASM_X86_VM86_H */ | [
0,
0
] |
Linux Kernel | arch/x86/include/asm/vmalloc.h | static inline bool arch_vmap_pmd_supported(pgprot_t prot) {
return boot_cpu_has(X86_FEATURE_PSE);
} | [
0,
0
] |
Linux Kernel | arch/x86/include/asm/vmx.h |
static inline int vmx_misc_mseg_revid(u64 vmx_misc) {
return (vmx_misc & GENMASK_ULL(63, 32)) >> 32;
} | [
0,
0
] |
Linux Kernel | arch/x86/include/asm/word-at-a-time.h | static inline unsigned long create_zero_mask(unsigned long bits) {
bits = (bits - 1) & ~bits;
return bits >> 7;
}
#define zero_bytemask(mask) (mask) | [
0,
0
] |
Linux Kernel | arch/x86/include/asm/word-at-a-time.h | static inline unsigned long load_unaligned_zeropad(const void *addr) {
unsigned long ret;
asm volatile("1: mov %[mem], %[ret]\n"
"2:\n" _ASM_EXTABLE_TYPE(1b, 2b, EX_TYPE_ZEROPAD)
: [ret] "=r"(ret)
: [mem] "m"(*(unsigned long *)addr));
return ret;
}
#endif | [
0,
0
] |
Linux Kernel | arch/x86/include/asm/xen/hypercall.h |
static inline int HYPERVISOR_mmuext_op(struct mmuext_op *op, int count,
int *success_count, domid_t domid) {
return _hypercall4(int, mmuext_op, op, count, success_count, domid);
} | [
0,
0
] |
Linux Kernel | arch/x86/include/asm/xen/hypercall.h |
static inline int HYPERVISOR_update_descriptor(u64 ma, u64 desc) {
return _hypercall2(int, update_descriptor, ma, desc);
} | [
0,
0
] |
Linux Kernel | arch/x86/include/asm/xen/hypercall.h |
static inline void MULTI_fpu_taskswitch(struct multicall_entry *mcl, int set) {
mcl->op = __HYPERVISOR_fpu_taskswitch;
mcl->args[0] = set;
trace_xen_mc_entry(mcl, 1);
} | [
0,
0
] |
Linux Kernel | arch/x86/include/asm/xen/hypercall.h |
static inline void MULTI_mmuext_op(struct multicall_entry *mcl,
struct mmuext_op *op, int count,
int *success_count, domid_t domid) {
mcl->op = __HYPERVISOR_mmuext_op;
mcl->args[0] = (unsigned long)op;
mcl->args[1] = count;
mcl->args[2] = (u... | [
0,
0
] |
Linux Kernel | arch/x86/include/asm/xen/hypercall.h |
static inline int HYPERVISOR_sched_op(int cmd, void *arg) {
return _hypercall2(int, sched_op, cmd, arg);
} | [
0,
0
] |
Linux Kernel | arch/x86/include/asm/xen/hypercall.h |
static inline long HYPERVISOR_set_timer_op(u64 timeout) {
unsigned long timeout_hi = (unsigned long)(timeout >> 32);
unsigned long timeout_lo = (unsigned long)timeout;
return _hypercall2(long, set_timer_op, timeout_lo, timeout_hi);
} | [
0,
0
] |
Linux Kernel | arch/x86/include/asm/xen/hypercall.h |
static inline int HYPERVISOR_mca(struct xen_mc *mc_op) {
mc_op->interface_version = XEN_MCA_INTERFACE_VERSION;
return _hypercall1(int, mca, mc_op);
} | [
0,
0
] |
Linux Kernel | arch/x86/include/asm/xen/hypercall.h |
static inline int HYPERVISOR_event_channel_op(int cmd, void *arg) {
return _hypercall2(int, event_channel_op, cmd, arg);
} | [
0,
0
] |
Linux Kernel | arch/x86/include/asm/xen/hypercall.h |
static inline int HYPERVISOR_physdev_op(int cmd, void *arg) {
return _hypercall2(int, physdev_op, cmd, arg);
} | [
0,
0
] |
Linux Kernel | arch/x86/include/asm/xen/hypercall.h | static inline int HYPERVISOR_suspend(unsigned long start_info_mfn) {
struct sched_shutdown r = {.reason = SHUTDOWN_suspend};
return _hypercall3(int, sched_op, SCHEDOP_shutdown, &r, start_info_mfn);
} | [
0,
0
] |
Linux Kernel | arch/x86/include/asm/xen/hypercall.h |
static inline unsigned long __must_check HYPERVISOR_hvm_op(int op, void *arg) {
return _hypercall2(unsigned long, hvm_op, op, arg);
} | [
0,
0
] |
Linux Kernel | arch/x86/include/asm/xen/hypervisor.h |
static inline uint32_t xen_cpuid_base(void) {
return hypervisor_cpuid_base("XenVMMXenVMM", 2);
} | [
0,
0
] |
Linux Kernel | arch/x86/include/asm/xen/page.h | static inline unsigned long __pfn_to_mfn(unsigned long pfn) { return pfn; } | [
0,
0
] |
Linux Kernel | arch/x86/include/asm/xen/page.h |
static inline unsigned long pte_mfn(pte_t pte) {
return (pte.pte & XEN_PTE_MFN_MASK) >> PAGE_SHIFT;
} | [
0,
0
] |
Linux Kernel | arch/x86/include/asm/xen/page.h |
static inline bool xen_arch_need_swiotlb(struct device *dev, phys_addr_t phys,
dma_addr_t dev_addr) {
return false;
} | [
0,
0
] |
Linux Kernel | arch/x86/include/asm/xen/pci.h | static inline int pci_xen_hvm_init(void) { return -1; } | [
0,
0
] |
Linux Kernel | arch/x86/include/asm/xen/pci.h | static inline void xen_pci_frontend_disable_msix(struct pci_dev *dev) {
if (xen_pci_frontend && xen_pci_frontend->disable_msix)
xen_pci_frontend->disable_msix(dev);
} | [
1,
0
] |
Linux Kernel | arch/x86/include/asm/xor.h |
static void xor_sse_2(unsigned long bytes, unsigned long *__restrict p1,
const unsigned long *__restrict p2) {
unsigned long lines = bytes >> 8;
kernel_fpu_begin();
asm volatile(
#undef BLOCK
#define BLOCK(i) \
LD(i, 0) ... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/acpi/apei.c | int arch_apei_enable_cmcff(struct acpi_hest_header *hest_hdr, void *data) {
#ifdef CONFIG_X86_MCE
int i;
struct acpi_hest_ia_corrected *cmc;
struct acpi_hest_ia_error_bank *mc_bank;
cmc = (struct acpi_hest_ia_corrected *)hest_hdr;
if (!cmc->enabled)
return 0;
if (!(cmc->flags & ACPI_HEST_FIRMWARE_FIRS... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/acpi/boot.c | static int __init acpi_parse_madt(struct acpi_table_header *table) {
struct acpi_table_madt *madt = NULL;
if (!boot_cpu_has(X86_FEATURE_APIC))
return -EINVAL;
madt = (struct acpi_table_madt *)table;
if (!madt) {
pr_warn("Unable to map MADT\n");
return -ENODEV;
}
if (madt->address) {
acpi_... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/acpi/boot.c |
static int __init acpi_parse_lapic_nmi(union acpi_subtable_headers *header,
const unsigned long end) {
struct acpi_madt_local_apic_nmi *lapic_nmi = NULL;
lapic_nmi = (struct acpi_madt_local_apic_nmi *)header;
if (BAD_MADT_ENTRY(lapic_nmi, end))
return -EINVAL;
acpi... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/acpi/boot.c | static int __init acpi_parse_ioapic(union acpi_subtable_headers *header,
const unsigned long end) {
struct acpi_madt_io_apic *ioapic = NULL;
struct ioapic_domain_cfg cfg = {
.type = IOAPIC_DOMAIN_DYNAMIC,
.ops = &mp_ioapic_irqdomain_ops,
};
ioapic = (struct acpi_... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/acpi/boot.c |
static int __init acpi_parse_int_src_ovr(union acpi_subtable_headers *header,
const unsigned long end) {
struct acpi_madt_interrupt_override *intsrc = NULL;
intsrc = (struct acpi_madt_interrupt_override *)header;
if (BAD_MADT_ENTRY(intsrc, end))
return -EINVAL;
a... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/acpi/boot.c |
int acpi_gsi_to_irq(u32 gsi, unsigned int *irqp) {
int rc, irq, trigger, polarity;
if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) {
*irqp = gsi;
return 0;
}
rc = acpi_get_override_irq(gsi, &trigger, &polarity);
if (rc)
return rc;
trigger = trigger ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE;
p... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/acpi/boot.c |
int acpi_isa_irq_to_gsi(unsigned isa_irq, u32 *gsi) {
if (isa_irq < nr_legacy_irqs() &&
isa_irq_to_gsi[isa_irq] != INVALID_ACPI_IRQ) {
*gsi = isa_irq_to_gsi[isa_irq];
return 0;
}
return -1;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/acpi/boot.c | int acpi_register_gsi(struct device *dev, u32 gsi, int trigger, int polarity) {
return __acpi_register_gsi(dev, gsi, trigger, polarity);
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/acpi/boot.c |
int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base) {
int ret = -ENOSYS;
#ifdef CONFIG_ACPI_HOTPLUG_IOAPIC
int ioapic_id;
u64 addr;
struct ioapic_domain_cfg cfg = {
.type = IOAPIC_DOMAIN_DYNAMIC,
.ops = &mp_ioapic_irqdomain_ops,
};
ioapic_id = acpi_get_ioapic_id(handle, g... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/acpi/boot.c | static int __init acpi_parse_fadt(struct acpi_table_header *table) {
if (!(acpi_gbl_FADT.boot_flags & ACPI_FADT_LEGACY_DEVICES)) {
pr_debug("no legacy devices present\n");
x86_platform.legacy.devices.pnpbios = 0;
}
if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID &&
!(acpi_gbl_FADT.boot_flags... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/acpi/boot.c | static int __init early_acpi_parse_madt_lapic_addr_ovr(void) {
int count;
if (!boot_cpu_has(X86_FEATURE_APIC))
return -ENODEV;
count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE,
acpi_parse_lapic_addr_ovr, 0);
if (count < 0) {
pr_err("Error parsing LAPIC a... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/acpi/boot.c |
static int __init disable_acpi_pci(const struct dmi_system_id *d) {
if (!acpi_force) {
pr_notice("%s detected: force use of pci=noacpi\n", d->ident);
acpi_disable_pci();
}
return 0;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/acpi/boot.c | static int __init
dmi_ignore_irq0_timer_override(const struct dmi_system_id *d) {
if (!acpi_skip_timer_override) {
pr_notice("%s detected: Ignoring BIOS IRQ0 override\n", d->ident);
acpi_skip_timer_override = 1;
}
return 0;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/acpi/boot.c | void __init acpi_boot_table_init(void) {
dmi_check_system(acpi_dmi_table);
/*
* If acpi_disabled, bail out
*/
if (acpi_disabled)
return;
/*
* Initialize the ACPI boot-time table parser.
*/
if (acpi_locate_initial_tables())
disable_acpi();
else
acpi_reserve_initial_tables();
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/acpi/boot.c | static int __init parse_acpi_skip_timer_override(char *arg) {
acpi_skip_timer_override = 1;
return 0;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/acpi/boot.c |
static int __init parse_acpi_use_timer_override(char *arg) {
acpi_use_timer_override = 1;
return 0;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/acpi/boot.c |
void x86_default_set_root_pointer(u64 addr) {
boot_params.acpi_rsdp_addr = addr;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/acpi/cppc.c |
int cpc_write_ffh(int cpunum, struct cpc_reg *reg, u64 val) {
u64 rd_val;
int err;
err = rdmsrl_safe_on_cpu(cpunum, reg->address, &rd_val);
if (!err) {
u64 mask =
GENMASK_ULL(reg->bit_offset + reg->bit_width - 1, reg->bit_offset);
val <<= reg->bit_offset;
val &= mask;
rd_val &= ~mask;... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/acpi/cppc.c |
void init_freq_invariance_cppc(void) {
static bool init_done;
if (!cpu_feature_enabled(X86_FEATURE_APERFMPERF))
return;
if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
return;
mutex_lock(&freq_invariance_lock);
if (!init_done)
amd_set_max_freq_ratio();
init_done = true;
mutex_unlock(&freq_... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/acpi/cstate.c | static long acpi_processor_ffh_cstate_probe_cpu(void *_cx) {
struct acpi_processor_cx *cx = _cx;
long retval;
unsigned int eax, ebx, ecx, edx;
unsigned int edx_part;
unsigned int cstate_type;
unsigned int num_cstate_subtype;
cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &edx);
/* Check whether this partic... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/acpi/cstate.c |
static int __init ffh_cstate_init(void) {
struct cpuinfo_x86 *c = &boot_cpu_data;
if (c->x86_vendor != X86_VENDOR_INTEL && c->x86_vendor != X86_VENDOR_AMD &&
c->x86_vendor != X86_VENDOR_HYGON)
return -1;
cpu_cstate_entry = alloc_percpu(struct cstate_entry);
return 0;
} | [
1,
0
] |
Linux Kernel | arch/x86/kernel/alternative.c | void __init_or_module noinline apply_retpolines(s32 *start, s32 *end) {
s32 *s;
for (s = start; s < end; s++) {
void *addr = (void *)s + *s;
struct insn insn;
int len, ret;
u8 bytes[16];
u8 op1, op2;
ret = insn_decode_kernel(&insn, addr);
if (WARN_ON_ONCE(ret < 0))
continue;
... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/alternative.c | void __init_or_module noinline apply_returns(s32 *start, s32 *end) {} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/alternative.c |
void __init_or_module noinline apply_retpolines(s32 *start, s32 *end) {} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/alternative.c | void __init_or_module noinline apply_ibt_endbr(s32 *start, s32 *end) {
s32 *s;
for (s = start; s < end; s++) {
u32 endbr, poison = gen_endbr_poison();
void *addr = (void *)s + *s;
if (WARN_ON_ONCE(get_kernel_nofault(endbr, addr)))
continue;
if (WARN_ON_ONCE(!is_endbr(endbr)))
continue... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/alternative.c | static void alternatives_smp_lock(const s32 *start, const s32 *end, u8 *text,
u8 *text_end) {
const s32 *poff;
for (poff = start; poff < end; poff++) {
u8 *ptr = (u8 *)poff + *poff;
if (!*poff || ptr < text || ptr >= text_end)
continue;
if (*ptr == 0x3e)
... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/alternative.c | static void alternatives_smp_unlock(const s32 *start, const s32 *end, u8 *text,
u8 *text_end) {
const s32 *poff;
for (poff = start; poff < end; poff++) {
u8 *ptr = (u8 *)poff + *poff;
if (!*poff || ptr < text || ptr >= text_end)
continue;
if (*ptr == 0xf0)
... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/alternative.c |
void __init_or_module alternatives_smp_module_del(struct module *mod) {
struct smp_alt_module *item;
mutex_lock(&text_mutex);
list_for_each_entry(item, &smp_alt_modules, next) {
if (mod != item->mod)
continue;
list_del(&item->next);
kfree(item);
break;
}
mutex_unlock(&text_mutex);
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/alternative.c | void __init_or_module apply_paravirt(struct paravirt_patch_site *start,
struct paravirt_patch_site *end) {
struct paravirt_patch_site *p;
char insn_buff[MAX_PATCH_LEN];
for (p = start; p < end; p++) {
unsigned int used;
BUG_ON(p->len > MAX_PATCH_LEN);
memcpy(ins... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/alternative.c |
static int __init int3_exception_notify(struct notifier_block *self,
unsigned long val, void *data) {
unsigned long selftest = (unsigned long)&int3_selftest_ip;
struct die_args *args = data;
struct pt_regs *regs = args->regs;
OPTIMIZER_HIDE_VAR(selftest);
if (!regs |... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/alternative.c | void __init_or_module text_poke_early(void *addr, const void *opcode,
size_t len) {
unsigned long flags;
if (boot_cpu_has(X86_FEATURE_NX) &&
is_module_text_address((unsigned long)addr)) {
memcpy(addr, opcode, len);
} else {
local_irq_save(flags);
memcpy(ad... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/alternative.c | void *text_poke_copy(void *addr, const void *opcode, size_t len) {
unsigned long start = (unsigned long)addr;
size_t patched = 0;
if (WARN_ON_ONCE(core_kernel_text(start)))
return NULL;
mutex_lock(&text_mutex);
while (patched < len) {
unsigned long ptr = start + patched;
size_t s;
s = min_t... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/amd_gart_64.c |
static unsigned long alloc_iommu(struct device *dev, int size,
unsigned long align_mask) {
unsigned long offset, flags;
unsigned long boundary_size;
unsigned long base_index;
base_index = ALIGN(iommu_bus_base & dma_get_seg_boundary(dev), PAGE_SIZE) >>
PAGE_SHIFT... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/amd_gart_64.c | static void iommu_full(struct device *dev, size_t size, int dir) {
dev_err(dev, "PCI-DMA: Out of IOMMU space for %lu bytes\n", size);
#ifdef CONFIG_IOMMU_LEAK
dump_leak();
#endif
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/amd_gart_64.c | static void gart_unmap_page(struct device *dev, dma_addr_t dma_addr,
size_t size, enum dma_data_direction dir,
unsigned long attrs) {
unsigned long iommu_page;
int npages;
int i;
if (WARN_ON_ONCE(dma_addr == DMA_MAPPING_ERROR))
return;
if (dma_addr... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/amd_gart_64.c | static int __dma_map_cont(struct device *dev, struct scatterlist *start,
int nelems, struct scatterlist *sout,
unsigned long pages) {
unsigned long iommu_start = alloc_iommu(dev, pages, 0);
unsigned long iommu_page = iommu_start;
struct scatterlist *s;
int i;
... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/amd_gart_64.c | static void *gart_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_addr, gfp_t flag,
unsigned long attrs) {
void *vaddr;
vaddr = dma_direct_alloc(dev, size, dma_addr, flag, attrs);
if (!vaddr || !force_iommu || dev->coherent_dma_mas... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/amd_gart_64.c |
static __init unsigned long check_iommu_size(unsigned long aper,
u64 aper_size) {
unsigned long a;
if (!iommu_size) {
iommu_size = aper_size;
if (!no_agp)
iommu_size /= 2;
}
a = aper + iommu_size;
iommu_size -= round_up(a, PMD_PAGE_SIZE) - a;
if... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/amd_gart_64.c |
static __init unsigned read_aperture(struct pci_dev *dev, u32 *size) {
unsigned aper_size = 0, aper_base_32, aper_order;
u64 aper_base;
pci_read_config_dword(dev, AMD64_GARTAPERTUREBASE, &aper_base_32);
pci_read_config_dword(dev, AMD64_GARTAPERTURECTL, &aper_order);
aper_order = (aper_order >> 1) & 7;
ap... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/amd_gart_64.c | static void enable_gart_translations(void) {
int i;
if (!amd_nb_has_feature(AMD_NB_GART))
return;
for (i = 0; i < amd_nb_num(); i++) {
struct pci_dev *dev = node_to_amd_nb(i)->misc;
enable_gart_translation(dev, __pa(agp_gatt_table));
}
amd_flush_garts();
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/amd_nb.c |
struct amd_northbridge *node_to_amd_nb(int node) {
return (node < amd_northbridges.num) ? &amd_northbridges.nb[node] : NULL;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/amd_nb.c |
static struct pci_dev *next_northbridge(struct pci_dev *dev,
const struct pci_device_id *ids) {
do {
dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev);
if (!dev)
break;
} while (!pci_match_id(ids, dev));
return dev;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/amd_nb.c |
static int __amd_smn_rw(u16 node, u32 address, u32 *value, bool write) {
struct pci_dev *root;
int err = -ENODEV;
if (node >= amd_northbridges.num)
goto out;
root = node_to_amd_nb(node)->root;
if (!root)
goto out;
mutex_lock(&smn_mutex);
err = pci_write_config_dword(root, 0x60, address);
if... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/amd_nb.c | int amd_set_subcaches(int cpu, unsigned long mask) {
static unsigned int reset, ban;
struct amd_northbridge *nb = node_to_amd_nb(topology_die_id(cpu));
unsigned int reg;
int cuid;
if (!amd_nb_has_feature(AMD_NB_L3_PARTITIONING) || mask > 0xf)
return -EINVAL;
if (reset == 0) {
pci_read_config_dword... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/amd_nb.c |
static void __fix_erratum_688(void *info) {
#define MSR_AMD64_IC_CFG 0xC0011021
msr_set_bit(MSR_AMD64_IC_CFG, 3);
msr_set_bit(MSR_AMD64_IC_CFG, 14);
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/aperture_64.c |
static int gart_mem_pfn_is_ram(unsigned long pfn) {
return likely((pfn < aperture_pfn_start) ||
(pfn >= aperture_pfn_start + aperture_page_count));
}
#ifdef CONFIG_PROC_VMCORE | [
0,
0
] |
Linux Kernel | arch/x86/kernel/aperture_64.c | static bool gart_oldmem_pfn_is_ram(struct vmcore_cb *cb, unsigned long pfn) {
return !!gart_mem_pfn_is_ram(pfn);
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/aperture_64.c |
static int __init parse_gart_mem(char *p) {
return kstrtobool(p, &gart_fix_e820);
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic.c | static int __init parse_lapic(char *arg) {
if (IS_ENABLED(CONFIG_X86_32) && !arg)
force_enable_local_apic = 1;
else if (arg && !strncmp(arg, "notscdeadline", 13))
setup_clear_cpu_cap(X86_FEATURE_TSC_DEADLINE_TIMER);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic.c | static __init int setup_apicpmtimer(char *s) {
apic_calibrate_pmtmr = 1;
notsc_setup(NULL);
return 1;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic.c | int lapic_get_maxlvt(void) {
return lapic_is_integrated() ? GET_APIC_MAXLVT(apic_read(APIC_LVR)) : 2;
}
/*
* Local APIC timer
*/
/* Clock divisor */
#define APIC_DIVISOR 16
#define TSC_DIVISOR 8
/* i82489DX specific */ | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic.c | static int lapic_next_event(unsigned long delta,
struct clock_event_device *evt) {
apic_write(APIC_TMICT, delta);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic.c | static int lapic_next_deadline(unsigned long delta,
struct clock_event_device *evt) {
u64 tsc;
weak_wrmsr_fence();
tsc = rdtsc();
wrmsrl(MSR_IA32_TSC_DEADLINE, tsc + (((u64)delta) * TSC_DIVISOR));
return 0;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic.c | static int lapic_timer_shutdown(struct clock_event_device *evt) {
unsigned int v;
if (evt->features & CLOCK_EVT_FEAT_DUMMY)
return 0;
v = apic_read(APIC_LVTT);
v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR);
apic_write(APIC_LVTT, v);
apic_write(APIC_TMICT, 0);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic.c | static inline int
lapic_timer_set_periodic_oneshot(struct clock_event_device *evt, bool oneshot) {
if (evt->features & CLOCK_EVT_FEAT_DUMMY)
return 0;
__setup_APIC_LVTT(lapic_timer_period, oneshot, 1);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic.c | void __init setup_boot_APIC_clock(void) {
if (disable_apic_timer) {
pr_info("Disabling APIC timer\n");
/* No broadcast on UP ! */
if (num_possible_cpus() > 1) {
lapic_clockevent.mult = 1;
setup_APIC_timer();
}
return;
}
if (calibrate_APIC_clock()) {
/* No broadcast on UP ! */... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic.c |
void setup_secondary_APIC_clock(void) {
setup_APIC_timer();
amd_e400_c1e_apic_setup();
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic.c |
static void __x2apic_enable(void) {
u64 msr;
rdmsrl(MSR_IA32_APICBASE, msr);
if (msr & X2APIC_ENABLE)
return;
wrmsrl(MSR_IA32_APICBASE, msr | X2APIC_ENABLE);
printk_once(KERN_INFO "x2apic enabled\n");
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic.c |
static int __init setup_nox2apic(char *str) {
if (x2apic_enabled()) {
int apicid = native_apic_msr_read(APIC_ID);
if (apicid >= 255) {
pr_warn("Apicid: %08x, cannot enforce nox2apic\n", apicid);
return 0;
}
if (x2apic_hw_locked()) {
pr_warn("APIC locked in x2apic mode, can't disabl... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic.c |
static __init void x2apic_disable(void) {
u32 x2apic_id, state = x2apic_state;
x2apic_mode = 0;
x2apic_state = X2APIC_DISABLED;
if (state != X2APIC_ON)
return;
x2apic_id = read_apic_id();
if (x2apic_id >= 255)
panic("Cannot disable x2apic, id: %08x\n", x2apic_id);
if (x2apic_hw_locked()) {
... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic.c | static int __init detect_init_APIC(void) {
if (!boot_cpu_has(X86_FEATURE_APIC)) {
pr_info("No local APIC present\n");
return -1;
}
mp_lapic_addr = APIC_DEFAULT_PHYS_BASE;
return 0;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic.c | int __init apic_force_enable(unsigned long addr) {
u32 h, l;
if (disable_apic)
return -1;
if (boot_cpu_data.x86 >= 6) {
rdmsr(MSR_IA32_APICBASE, l, h);
if (!(l & MSR_IA32_APICBASE_ENABLE)) {
pr_info("Local APIC disabled by BIOS -- reenabling.\n");
l &= ~MSR_IA32_APICBASE_BASE;
l |=... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic.c |
int hard_smp_processor_id(void) { return read_apic_id(); } | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic.c |
u32 x86_msi_msg_get_destid(struct msi_msg *msg, bool extid) {
u32 dest = msg->arch_addr_lo.destid_0_7;
if (extid)
dest |= msg->arch_addr_hi.destid_8_31 << 8;
return dest;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic.c | void __init acpi_wake_cpu_handler_update(wakeup_cpu_handler handler) {
struct apic **drv;
for (drv = __apicdrivers; drv < __apicdrivers_end; drv++)
(*drv)->wakeup_secondary_cpu_64 = handler;
}
#endif | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic.c | static void __init apic_bsp_setup(bool upmode) {
connect_bsp_APIC();
if (upmode)
apic_bsp_up_setup();
setup_local_APIC();
enable_IO_APIC();
end_local_APIC_setup();
irq_remap_enable_fault_handling();
setup_IO_APIC();
lapic_update_legacy_vectors();
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic.c | void __init up_late_init(void) {
if (apic_intr_mode == APIC_PIC)
return;
x86_init.timers.setup_percpu_clockev();
}
#endif
/*
* Power management
*/
#ifdef CONFIG_PM | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic.c | static int __init init_lapic_sysfs(void) {
/* XXX: remove suspend/resume procs if !apic_pm_state.active? */
if (boot_cpu_has(X86_FEATURE_APIC))
register_syscore_ops(&lapic_syscore_ops);
return 0;
} | [
0,
1
] |
Linux Kernel | arch/x86/kernel/apic/apic.c | static void apic_pm_activate(void) {}
#endif
#ifdef CONFIG_X86_64 | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic.c |
static int set_multi(const struct dmi_system_id *d) {
if (multi)
return 0;
pr_info("APIC: %s detected, Multi Chassis\n", d->ident);
multi = 1;
return 0;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic.c |
static int __init parse_lapic_timer_c2_ok(char *arg) {
local_apic_timer_c2_ok = 1;
return 0;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic_common.c |
u32 apic_flat_calc_apicid(unsigned int cpu) { return 1U << cpu; } | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic_common.c |
void default_ioapic_phys_id_map(physid_mask_t *phys_map,
physid_mask_t *retmap) {
*retmap = *phys_map;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic_flat_64.c |
static unsigned int flat_get_apic_id(unsigned long x) {
return (x >> 24) & 0xFF;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic_flat_64.c |
static int flat_apic_id_registered(void) {
return physid_isset(read_xapic_id(), phys_cpu_present_map);
} | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.