Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | arch/x86/pci/irq.c |
static int pirq_ite_set(struct pci_dev *router, struct pci_dev *dev, int pirq,
int irq) {
static const unsigned char pirqmap[4] = {1, 0, 2, 3};
WARN_ON_ONCE(pirq > 4);
write_config_nybble(router, 0x43, pirqmap[pirq - 1], irq);
return 1;
} | [
1,
0
] |
Linux Kernel | arch/x86/pci/irq.c | static int pirq_opti_get(struct pci_dev *router, struct pci_dev *dev,
int pirq) {
return read_config_nybble(router, 0xb8, pirq >> 4);
} | [
0,
0
] |
Linux Kernel | arch/x86/pci/irq.c | static int pirq_sis497_set(struct pci_dev *router, struct pci_dev *dev,
int pirq, int irq) {
int reg;
u8 x;
reg = pirq;
if (reg >= 1 && reg <= 4)
reg += PCI_SIS497_INTA_TO_IRQ_LINK - 1;
pci_read_config_byte(router, reg, &x);
x &= ~(PIRQ_SIS497_IRQ_MASK | PIRQ_SIS497_IRQ_ENAB... | [
1,
0
] |
Linux Kernel | arch/x86/pci/irq.c |
static int pirq_sis503_get(struct pci_dev *router, struct pci_dev *dev,
int pirq) {
u8 x;
int reg;
reg = pirq;
if (reg >= 0x01 && reg <= 0x04)
reg += 0x40;
pci_read_config_byte(router, reg, &x);
return (x & PIRQ_SIS503_IRQ_DISABLE) ? 0 : (x & PIRQ_SIS503_IRQ_MASK);
} | [
1,
0
] |
Linux Kernel | arch/x86/pci/irq.c |
static int pirq_vlsi_set(struct pci_dev *router, struct pci_dev *dev, int pirq,
int irq) {
WARN_ON_ONCE(pirq >= 9);
if (pirq > 8) {
dev_info(&dev->dev, "VLSI router PIRQ escape (%d)\n", pirq);
return 0;
}
write_config_nybble(router, 0x74, pirq - 1, irq);
return 1;
} | [
0,
0
] |
Linux Kernel | arch/x86/pci/irq.c | static __init int via_router_probe(struct irq_router *r, struct pci_dev *router,
u16 device) {
/*
* workarounds for some buggy BIOSes
*/
if (device == PCI_DEVICE_ID_VIA_82C586_0) {
switch (router->device) {
case PCI_DEVICE_ID_VIA_82C686:
/*
* Asus k7m b... | [
1,
1
] |
Linux Kernel | arch/x86/pci/irq.c |
static __init int ite_router_probe(struct irq_router *r, struct pci_dev *router,
u16 device) {
switch (device) {
case PCI_DEVICE_ID_ITE_IT8330G_0:
r->name = "ITE";
r->get = pirq_ite_get;
r->set = pirq_ite_set;
return 1;
}
return 0;
} | [
1,
0
] |
Linux Kernel | arch/x86/pci/irq.c |
static __init int amd_router_probe(struct irq_router *r, struct pci_dev *router,
u16 device) {
switch (device) {
case PCI_DEVICE_ID_AMD_VIPER_740B:
r->name = "AMD756";
break;
case PCI_DEVICE_ID_AMD_VIPER_7413:
r->name = "AMD766";
break;
case PCI_DEVICE_ID_AMD_... | [
0,
0
] |
Linux Kernel | arch/x86/pci/irq.c |
static __init int pico_router_probe(struct irq_router *r,
struct pci_dev *router, u16 device) {
switch (device) {
case PCI_DEVICE_ID_PICOPOWER_PT86C523:
r->name = "PicoPower PT86C523";
r->get = pirq_pico_get;
r->set = pirq_pico_set;
return 1;
case PCI_DEVICE_I... | [
1,
0
] |
Linux Kernel | arch/x86/pci/irq.c | static void __init pirq_find_router(struct irq_router *r) {
struct irq_routing_table *rt = pirq_table;
struct pci_dev *dev;
#ifdef CONFIG_PCI_BIOS
if (!rt->signature) {
printk(KERN_INFO "PCI: Using BIOS for IRQ routing\n");
r->set = pirq_bios_set;
r->name = "BIOS";
return;
}
#endif
r->name =... | [
1,
0
] |
Linux Kernel | arch/x86/pci/irq.c | void __init pcibios_irq_init(void) {
struct irq_routing_table *rtable = NULL;
DBG(KERN_DEBUG "PCI: IRQ init\n");
if (raw_pci_ops == NULL)
return;
dmi_check_system(pciirq_dmi_table);
pirq_table = pirq_find_routing_table();
#ifdef CONFIG_PCI_BIOS
if (!pirq_table && (pci_probe & PCI_BIOS_IRQ_SCAN)) {
... | [
0,
0
] |
Linux Kernel | arch/x86/pci/mmconfig-shared.c |
struct pci_mmcfg_region *__init pci_mmconfig_add(int segment, int start,
int end, u64 addr) {
struct pci_mmcfg_region *new;
new = pci_mmconfig_alloc(segment, start, end, addr);
if (new) {
mutex_lock(&pci_mmcfg_lock);
list_add_sorted(new);
mutex_unlock... | [
1,
0
] |
Linux Kernel | arch/x86/pci/mmconfig-shared.c |
struct pci_mmcfg_region *pci_mmconfig_lookup(int segment, int bus) {
struct pci_mmcfg_region *cfg;
list_for_each_entry_rcu(
cfg, &pci_mmcfg_list, list,
pci_mmcfg_lock_held()) if (cfg->segment == segment &&
cfg->start_bus <= bus &&
bus <... | [
0,
0
] |
Linux Kernel | arch/x86/pci/mmconfig-shared.c | static void __init pci_mmcfg_check_end_bus_number(void) {
struct pci_mmcfg_region *cfg, *cfgx;
list_for_each_entry(cfg, &pci_mmcfg_list, list) {
if (cfg->end_bus < cfg->start_bus)
cfg->end_bus = 255;
/* Don't access the list head ! */
if (cfg->list.next == &pci_mmcfg_list)
break;
cfgx... | [
1,
0
] |
Linux Kernel | arch/x86/pci/mmconfig-shared.c | static bool __ref pci_mmcfg_check_reserved(struct device *dev,
struct pci_mmcfg_region *cfg,
int early) {
if (!early && !acpi_disabled) {
if (is_mmconf_reserved(is_acpi_reserved, cfg, dev, 0))
return true;
if (dev)
... | [
0,
0
] |
Linux Kernel | arch/x86/pci/mmconfig-shared.c |
static void __init __pci_mmcfg_init(int early) {
pci_mmcfg_reject_broken(early);
if (list_empty(&pci_mmcfg_list))
return;
if (pcibios_last_bus < 0) {
const struct pci_mmcfg_region *cfg;
list_for_each_entry(cfg, &pci_mmcfg_list, list) {
if (cfg->segment)
break;
pcibios_last_bus =... | [
0,
0
] |
Linux Kernel | arch/x86/pci/mmconfig-shared.c | void __init pci_mmcfg_late_init(void) {
if ((pci_probe & PCI_PROBE_MMCONF) == 0)
return;
if (known_bridge)
return;
/* MMCONFIG hasn't been enabled yet, try again */
if (pci_probe & PCI_PROBE_MASK & ~PCI_PROBE_MMCONF) {
acpi_table_parse(ACPI_SIG_MCFG, pci_parse_mcfg);
__pci_mmcfg_init(0);
}
... | [
0,
0
] |
Linux Kernel | arch/x86/pci/mmconfig_32.c |
void __init pci_mmcfg_arch_free(void) {} | [
0,
0
] |
Linux Kernel | arch/x86/pci/mmconfig_64.c | static int pci_mmcfg_write(unsigned int seg, unsigned int bus,
unsigned int devfn, int reg, int len, u32 value) {
char __iomem *addr;
if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095)))
return -EINVAL;
rcu_read_lock();
addr = pci_dev_base(seg, bus, devfn);
if (!addr) {... | [
1,
0
] |
Linux Kernel | arch/x86/pci/mmconfig_64.c |
static void __iomem *mcfg_ioremap(struct pci_mmcfg_region *cfg) {
void __iomem *addr;
u64 start, size;
int num_buses;
start = cfg->address + PCI_MMCFG_BUS_OFFSET(cfg->start_bus);
num_buses = cfg->end_bus - cfg->start_bus + 1;
size = PCI_MMCFG_BUS_OFFSET(num_buses);
addr = ioremap(start, size);
if (add... | [
0,
0
] |
Linux Kernel | arch/x86/pci/mmconfig_64.c |
void pci_mmcfg_arch_unmap(struct pci_mmcfg_region *cfg) {
if (cfg && cfg->virt) {
iounmap(cfg->virt + PCI_MMCFG_BUS_OFFSET(cfg->start_bus));
cfg->virt = NULL;
}
} | [
1,
0
] |
Linux Kernel | arch/x86/pci/numachip.c |
static inline char __iomem *pci_dev_base(unsigned int seg, unsigned int bus,
unsigned int devfn) {
struct pci_mmcfg_region *cfg = pci_mmconfig_lookup(seg, bus);
if (cfg && cfg->virt)
return cfg->virt + (PCI_MMCFG_BUS_OFFSET(bus) | (devfn << 12));
return NULL;
} | [
1,
0
] |
Linux Kernel | arch/x86/pci/olpc.c | static int pci_olpc_read(unsigned int seg, unsigned int bus, unsigned int devfn,
int reg, int len, uint32_t *value) {
uint32_t *addr;
WARN_ON(seg);
if (!is_simulated(bus, devfn))
return pci_direct_conf1.read(seg, bus, devfn, reg, len, value);
/*
* No device has config register... | [
0,
0
] |
Linux Kernel | arch/x86/pci/pcbios.c | static inline void set_bios_x(void) {
pcibios_enabled = 1;
set_memory_x(PAGE_OFFSET + BIOS_BEGIN, (BIOS_END - BIOS_BEGIN) >> PAGE_SHIFT);
if (__supported_pte_mask & _PAGE_NX)
printk(
KERN_INFO
"PCI: PCI BIOS area is rw and x. Use pci=nobios if you want it NX.\n");
} | [
0,
0
] |
Linux Kernel | arch/x86/pci/pcbios.c | static int pci_bios_read(unsigned int seg, unsigned int bus, unsigned int devfn,
int reg, int len, u32 *value) {
unsigned long result = 0;
unsigned long flags;
unsigned long bx = (bus << 8) | devfn;
u16 number = 0, mask = 0;
WARN_ON(seg);
if (!value || (bus > 255) || (devfn > 255) ... | [
1,
0
] |
Linux Kernel | arch/x86/pci/pcbios.c |
static int pci_bios_write(unsigned int seg, unsigned int bus,
unsigned int devfn, int reg, int len, u32 value) {
unsigned long result = 0;
unsigned long flags;
unsigned long bx = (bus << 8) | devfn;
u16 number = 0;
WARN_ON(seg);
if ((bus > 255) || (devfn > 255) || (reg > 255))
... | [
1,
0
] |
Linux Kernel | arch/x86/pci/pcbios.c |
struct irq_routing_table *pcibios_get_irq_routing_table(void) {
struct irq_routing_options opt;
struct irq_routing_table *rt = NULL;
int ret, map;
unsigned long page;
if (!pci_bios_present)
return NULL;
page = __get_free_page(GFP_KERNEL);
if (!page)
return NULL;
opt.table = (struct irq_info *)... | [
1,
0
] |
Linux Kernel | arch/x86/pci/pcbios.c |
int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq) {
int ret;
__asm__("lcall *(%%esi); cld\n\t"
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
: "=a"(ret)
: "0"(PCIBIOS_SET_PCI_HW_INT),
"b"((dev->bus->number << 8) | dev->devfn),
"c"((i... | [
1,
0
] |
Linux Kernel | arch/x86/pci/sta2x11-fixup.c | struct sta2x11_instance *sta2x11_get_instance(struct pci_dev *pdev) {
return sta2x11_pdev_to_instance(pdev);
} | [
0,
0
] |
Linux Kernel | arch/x86/pci/sta2x11-fixup.c |
static struct sta2x11_mapping *sta2x11_pdev_to_mapping(struct pci_dev *pdev) {
struct sta2x11_instance *instance;
int ep;
instance = sta2x11_pdev_to_instance(pdev);
if (!instance)
return NULL;
ep = sta2x11_pdev_to_ep(pdev);
return instance->map + ep;
} | [
0,
0
] |
Linux Kernel | arch/x86/pci/xen.c |
static int acpi_register_gsi_xen(struct device *dev, u32 gsi, int trigger,
int polarity) {
return xen_register_gsi(gsi, trigger, polarity);
}
#endif
#endif
#if defined(CONFIG_PCI_MSI)
#include <linux/msi.h> | [
0,
0
] |
Linux Kernel | arch/x86/pci/xen.c |
static void xen_teardown_msi_irqs(struct pci_dev *dev) {
struct msi_desc *msidesc;
int i;
msi_for_each_desc(msidesc, &dev->dev, MSI_DESC_ASSOCIATED) {
for (i = 0; i < msidesc->nvec_used; i++)
xen_destroy_irq(msidesc->irq + i);
}
} | [
0,
0
] |
Linux Kernel | arch/x86/pci/xen.c | int __init pci_xen_init(void) {
if (!xen_pv_domain() || xen_initial_domain())
return -ENODEV;
printk(KERN_INFO "PCI: setting up Xen PCI frontend stub\n");
pcibios_set_cache_line_size();
pcibios_enable_irq = xen_pcifront_enable_irq;
pcibios_disable_irq = NULL;
acpi_noirq_set();
xen_setup_pci_msi()... | [
0,
0
] |
Linux Kernel | arch/x86/platform/ce4100/ce4100.c | static void ce4100_serial_fixup(int port, struct uart_port *up,
u32 *capabilities) {
#ifdef CONFIG_EARLY_PRINTK
if (up->iotype != UPIO_MEM32) {
up->uartclk = 14745600;
up->mapbase = 0xdffe0200;
set_fixmap_nocache(FIX_EARLYCON_MEM_BASE, up->mapbase & PAGE_MASK);
up->mem... | [
1,
0
] |
Linux Kernel | arch/x86/platform/efi/efi.c | static void __init do_add_efi_memmap(void) {
efi_memory_desc_t *md;
if (!efi_enabled(EFI_MEMMAP))
return;
for_each_efi_memory_desc(md) {
unsigned long long start = md->phys_addr;
unsigned long long size = md->num_pages << EFI_PAGE_SHIFT;
int e820_type;
switch (md->type) {
case EFI_LOADE... | [
1,
0
] |
Linux Kernel | arch/x86/platform/efi/efi.c |
static bool __init efi_memmap_entry_valid(const efi_memory_desc_t *md, int i) {
u64 end = (md->num_pages << EFI_PAGE_SHIFT) + md->phys_addr - 1;
u64 end_hi = 0;
char buf[64];
if (md->num_pages == 0) {
end = 0;
} else if (md->num_pages > EFI_PAGES_MAX ||
EFI_PAGES_MAX - md->num_pages <
... | [
1,
0
] |
Linux Kernel | arch/x86/platform/efi/efi.c |
static void __init efi_clean_memmap(void) {
efi_memory_desc_t *out = efi.memmap.map;
const efi_memory_desc_t *in = out;
const efi_memory_desc_t *end = efi.memmap.map_end;
int i, n_removal;
for (i = n_removal = 0; in < end; i++) {
if (efi_memmap_entry_valid(in, i)) {
if (out != in)
memcpy(o... | [
1,
0
] |
Linux Kernel | arch/x86/platform/efi/efi.c | static inline void *efi_map_next_entry_reverse(void *entry) {
if (!entry)
return efi.memmap.map_end - efi.memmap.desc_size;
entry -= efi.memmap.desc_size;
if (entry < efi.memmap.map)
return NULL;
return entry;
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/efi/efi.c | static void *__init efi_map_regions(int *count, int *pg_shift) {
void *p, *new_memmap = NULL;
unsigned long left = 0;
unsigned long desc_size;
efi_memory_desc_t *md;
desc_size = efi.memmap.desc_size;
p = NULL;
while ((p = efi_map_next_entry(p))) {
md = p;
if (!should_map_region(md))
conti... | [
1,
0
] |
Linux Kernel | arch/x86/platform/efi/efi.c |
umode_t efi_attr_is_visible(struct kobject *kobj, struct attribute *attr,
int n) {
if (attr == &efi_attr_fw_vendor.attr) {
if (efi_enabled(EFI_PARAVIRT) || efi_fw_vendor == EFI_INVALID_TABLE_ADDR)
return 0;
} else if (attr == &efi_attr_runtime.attr) {
if (efi_runtime == EF... | [
0,
0
] |
Linux Kernel | arch/x86/platform/efi/efi_32.c |
void efi_sync_low_kernel_mappings(void) {} | [
0,
0
] |
Linux Kernel | arch/x86/platform/efi/efi_32.c |
void __init efi_map_region_fixed(efi_memory_desc_t *md) {} | [
0,
0
] |
Linux Kernel | arch/x86/platform/efi/efi_32.c | void __init parse_efi_setup(u64 phys_addr, u32 data_len) {} | [
0,
0
] |
Linux Kernel | arch/x86/platform/efi/efi_32.c | void __init efi_runtime_update_mappings(void) {
if (__supported_pte_mask & _PAGE_NX) {
efi_memory_desc_t *md;
for_each_efi_memory_desc(md) {
if (md->type != EFI_RUNTIME_SERVICES_CODE)
continue;
set_memory_x(md->virt_addr, md->num_pages);
}
}
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/efi/efi_64.c | static inline phys_addr_t virt_to_phys_or_null_size(void *va,
unsigned long size) {
phys_addr_t pa;
if (!va)
return 0;
if (virt_addr_valid(va))
return virt_to_phys(va);
pa = slow_virt_to_phys(va);
if (WARN_ON((pa ^ (pa + size - 1)) & PAGE_MASK))
... | [
1,
0
] |
Linux Kernel | arch/x86/platform/efi/efi_64.c | void __init efi_map_region_fixed(efi_memory_desc_t *md) {
__map_region(md, md->phys_addr);
__map_region(md, md->virt_addr);
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/efi/efi_64.c |
void __init parse_efi_setup(u64 phys_addr, u32 data_len) {
efi_setup = phys_addr + sizeof(struct setup_data);
} | [
1,
0
] |
Linux Kernel | arch/x86/platform/efi/efi_64.c |
static efi_status_t __init __no_sanitize_address
efi_thunk_set_virtual_address_map(unsigned long memory_map_size,
unsigned long descriptor_size,
u32 descriptor_version,
efi_memory_desc_t *virtual_map) {
efi_status_t... | [
0,
0
] |
Linux Kernel | arch/x86/platform/efi/efi_64.c |
static efi_status_t efi_thunk_get_wakeup_time(efi_bool_t *enabled,
efi_bool_t *pending,
efi_time_t *tm) {
return EFI_UNSUPPORTED;
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/efi/efi_64.c |
static efi_status_t efi_thunk_get_next_high_mono_count(u32 *count) {
return EFI_UNSUPPORTED;
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/efi/efi_64.c |
static void efi_thunk_reset_system(int reset_type, efi_status_t status,
unsigned long data_size,
efi_char16_t *data) {
u32 phys_data;
unsigned long flags;
spin_lock_irqsave(&efi_runtime_lock, flags);
phys_data = virt_to_phys_or_null_size(d... | [
0,
0
] |
Linux Kernel | arch/x86/platform/efi/efi_64.c |
static efi_status_t efi_thunk_query_variable_info(u32 attr, u64 *storage_space,
u64 *remaining_space,
u64 *max_variable_size) {
efi_status_t status;
u32 phys_storage, phys_remaining, phys_max;
unsigned long flags;... | [
0,
0
] |
Linux Kernel | arch/x86/platform/efi/efi_64.c |
static efi_status_t
efi_thunk_query_variable_info_nonblocking(u32 attr, u64 *storage_space,
u64 *remaining_space,
u64 *max_variable_size) {
efi_status_t status;
u32 phys_storage, phys_remaining, phys_max;
unsigned long flags;
... | [
0,
0
] |
Linux Kernel | arch/x86/platform/efi/efi_64.c | static efi_status_t
efi_thunk_query_capsule_caps(efi_capsule_header_t **capsules,
unsigned long count, u64 *max_size,
int *reset_type) {
return EFI_UNSUPPORTED;
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/efi/efi_64.c |
void __init efi_thunk_runtime_setup(void) {
if (!IS_ENABLED(CONFIG_EFI_MIXED))
return;
efi.get_time = efi_thunk_get_time;
efi.set_time = efi_thunk_set_time;
efi.get_wakeup_time = efi_thunk_get_wakeup_time;
efi.set_wakeup_time = efi_thunk_set_wakeup_time;
efi.get_variable = efi_thunk_get_variable;
ef... | [
0,
0
] |
Linux Kernel | arch/x86/platform/efi/fake_mem.c | static void __init efi_fake_range(struct efi_mem_range *efi_range) {
struct efi_memory_map_data data = {0};
int new_nr_map = efi.memmap.nr_map;
efi_memory_desc_t *md;
void *new_memmap;
for_each_efi_memory_desc(md) new_nr_map +=
efi_memmap_split_count(md, &efi_range->range);
/* allocate memory for ne... | [
0,
0
] |
Linux Kernel | arch/x86/platform/efi/memmap.c |
static phys_addr_t __init __efi_memmap_alloc_late(unsigned long size) {
unsigned int order = get_order(size);
struct page *p = alloc_pages(GFP_KERNEL, order);
if (!p)
return 0;
return PFN_PHYS(page_to_pfn(p));
} | [
1,
0
] |
Linux Kernel | arch/x86/platform/efi/memmap.c | int __init efi_memmap_alloc(unsigned int num_entries,
struct efi_memory_map_data *data) {
WARN_ON(data->phys_map || data->size);
data->size = num_entries * efi.memmap.desc_size;
data->desc_version = efi.memmap.desc_version;
data->desc_size = efi.memmap.desc_size;
data->flags &= ~... | [
1,
0
] |
Linux Kernel | arch/x86/platform/efi/quirks.c | static efi_status_t query_variable_store_nonblocking(u32 attributes,
unsigned long size) {
efi_status_t status;
u64 storage_size, remaining_size, max_size;
status = efi.query_variable_info_nonblocking(attributes, &storage_size,
... | [
0,
0
] |
Linux Kernel | arch/x86/platform/efi/runtime-map.c |
static void map_release(struct kobject *kobj) {
struct efi_runtime_map_entry *entry;
entry = to_map_entry(kobj);
kfree(entry);
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/efi/runtime-map.c |
static struct efi_runtime_map_entry *
add_sysfs_runtime_map_entry(struct kobject *kobj, int nr,
efi_memory_desc_t *md) {
int ret;
struct efi_runtime_map_entry *entry;
if (!map_kset) {
map_kset = kset_create_and_add("runtime-map", NULL, kobj);
if (!map_kset)
return ERR_P... | [
1,
0
] |
Linux Kernel | arch/x86/platform/geode/alix.c | static void __init register_alix(void) {
gpiod_add_lookup_table(&alix_leds_gpio_table);
platform_add_devices(alix_devs, ARRAY_SIZE(alix_devs));
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/intel/iosf_mbi.c | static inline u32 iosf_mbi_form_mcr(u8 op, u8 port, u8 offset) {
return (op << 24) | (port << 16) | (offset << 8) | MBI_ENABLE;
} | [
1,
0
] |
Linux Kernel | arch/x86/platform/intel/iosf_mbi.c | int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr) {
u32 mcr, mcrx;
unsigned long flags;
int ret;
if (port == BT_MBI_UNIT_GFX) {
WARN_ON(1);
return -EPERM;
}
mcr = iosf_mbi_form_mcr(opcode, port, offset & MBI_MASK_LO);
mcrx = offset & MBI_MASK_HI;
spin_lock_irqsave(&iosf_mbi_lock, fl... | [
0,
0
] |
Linux Kernel | arch/x86/platform/intel/iosf_mbi.c |
int iosf_mbi_unregister_pmic_bus_access_notifier_unlocked(
struct notifier_block *nb) {
iosf_mbi_assert_punit_acquired();
return blocking_notifier_chain_unregister(&iosf_mbi_pmic_bus_access_notifier,
nb);
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/intel/iosf_mbi.c |
void iosf_mbi_assert_punit_acquired(void) {
WARN_ON(iosf_mbi_pmic_punit_access_count == 0);
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/intel/iosf_mbi.c | static void iosf_sideband_debug_init(void) {
iosf_dbg = debugfs_create_dir("iosf_sb", NULL);
debugfs_create_x32("mdr", 0660, iosf_dbg, &dbg_mdr);
/* mcrx */
debugfs_create_x32("mcrx", 0660, iosf_dbg, &dbg_mcrx);
/* mcr - initiates mailbox transaction */
debugfs_create_file("mcr", 0660, iosf_dbg, &dbg_mcr... | [
0,
0
] |
Linux Kernel | arch/x86/platform/intel/iosf_mbi.c |
static int iosf_mbi_probe(struct pci_dev *pdev,
const struct pci_device_id *dev_id) {
int ret;
ret = pci_enable_device(pdev);
if (ret < 0) {
dev_err(&pdev->dev, "error: could not enable device\n");
return ret;
}
mbi_pdev = pci_dev_get(pdev);
iosf_mbi_sem_address = dev_id... | [
0,
0
] |
Linux Kernel | arch/x86/platform/intel-mid/intel-mid.c | static void __init intel_mid_time_init(void) {
x86_init.timers.setup_percpu_clockev = setup_boot_APIC_clock;
x86_cpuinit.setup_percpu_clockev = setup_secondary_APIC_clock;
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/intel-mid/intel-mid.c | static void intel_mid_arch_setup(void) {
switch (boot_cpu_data.x86_model) {
case 0x3C:
case 0x4A:
x86_platform.legacy.rtc = 1;
break;
default:
break;
}
regulator_has_full_constraints();
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/intel-mid/intel-mid.c | void __init x86_intel_mid_early_setup(void) {
x86_init.resources.probe_roms = x86_init_noop;
x86_init.resources.reserve_resources = x86_init_noop;
x86_init.timers.timer_init = intel_mid_time_init;
x86_init.timers.setup_percpu_clockev = x86_init_noop;
x86_init.irqs.pre_vector_init = x86_init_noop;
x86_ini... | [
0,
0
] |
Linux Kernel | arch/x86/platform/intel-mid/pwr.c |
static u32 mid_pwr_get_state(struct mid_pwr *pwr, int reg) {
return readl(pwr->regs + PM_SSS(reg));
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/intel-mid/pwr.c | static int pnw_set_initial_state(struct mid_pwr *pwr) {
static const u32 states[] = {
0xf00fffff, /* PM_SSC(0) */
0xffffffff, /* PM_SSC(1) */
0xffffffff, /* PM_SSC(2) */
0xffffffff, /* PM_SSC(3) */
};
return mid_set_initial_state(pwr, states);
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/intel-quark/imr.c | static inline int imr_clear(int reg) { return __imr_remove_range(reg, 0, 0); } | [
0,
0
] |
Linux Kernel | arch/x86/platform/intel-quark/imr.c | static void __init imr_fixup_memmap(struct imr_device *idev) {
phys_addr_t base = virt_to_phys(&_text);
size_t size = virt_to_phys(&__end_rodata) - base;
unsigned long start, end;
int i;
int ret;
for (i = 0; i < idev->max_imr; i++)
imr_clear(i);
start = (unsigned long)_text;
end = (unsigned long)_... | [
1,
0
] |
Linux Kernel | arch/x86/platform/iris/iris.c |
static int iris_remove(struct platform_device *pdev) {
pm_power_off = old_pm_power_off;
printk(KERN_INFO "Iris power_off handler uninstalled.\n");
return 0;
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/iris/iris.c |
static int iris_init(void) {
int ret;
if (force != 1) {
printk(KERN_ERR "The force parameter has not been set to 1."
" The Iris poweroff handler will not be installed.\n");
return -ENODEV;
}
ret = platform_driver_register(&iris_driver);
if (ret < 0) {
printk(KERN_ERR "Failed t... | [
0,
0
] |
Linux Kernel | arch/x86/platform/olpc/olpc-xo1-pm.c | void olpc_xo1_pm_wakeup_clear(u16 value) { wakeup_mask &= ~value; } | [
0,
0
] |
Linux Kernel | arch/x86/platform/olpc/olpc-xo1-pm.c | asmlinkage __visible int xo1_do_sleep(u8 sleep_state) {
void *pgd_addr = __va(read_cr3_pa());
outl(wakeup_mask << 16, acpi_base + CS5536_PM1_STS);
__asm__("movl %0,%%eax" : : "r"(pgd_addr));
__asm__("call *(%%edi); cld" : : "D"(&ofw_bios_entry));
__asm__("movb $0x34, %al\n\t"
"outb %al, $0x70\n\t"... | [
0,
0
] |
Linux Kernel | arch/x86/platform/olpc/olpc-xo1-pm.c |
static int __init xo1_pm_init(void) {
int r;
r = platform_driver_register(&cs5535_pms_driver);
if (r)
return r;
r = platform_driver_register(&cs5535_acpi_driver);
if (r)
platform_driver_unregister(&cs5535_pms_driver);
return r;
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/olpc/olpc-xo1-sci.c |
static void battery_status_changed(void) {
struct power_supply *psy = power_supply_get_by_name("olpc_battery");
if (psy) {
power_supply_changed(psy);
power_supply_put(psy);
}
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/olpc/olpc-xo1-sci.c |
static void ac_status_changed(void) {
struct power_supply *psy = power_supply_get_by_name("olpc_ac");
if (psy) {
power_supply_changed(psy);
power_supply_put(psy);
}
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/olpc/olpc-xo1-sci.c | static void send_ebook_state(void) {
unsigned char state;
if (olpc_ec_cmd(EC_READ_EB_MODE, NULL, 0, &state, 1)) {
pr_err(PFX "failed to get ebook state\n");
return;
}
if (test_bit(SW_TABLET_MODE, ebook_switch_idev->sw) == !!state)
return;
input_report_switch(ebook_switch_idev, SW_TABLET_MODE, s... | [
0,
0
] |
Linux Kernel | arch/x86/platform/olpc/olpc-xo1-sci.c | static void flip_lid_inverter(void) {
if (lid_inverted)
cs5535_gpio_clear(OLPC_GPIO_LID, GPIO_INPUT_INVERT);
else
cs5535_gpio_set(OLPC_GPIO_LID, GPIO_INPUT_INVERT);
lid_inverted = !lid_inverted;
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/olpc/olpc-xo1-sci.c | static ssize_t lid_wake_mode_set(struct device *dev,
struct device_attribute *attr, const char *buf,
size_t count) {
int i;
for (i = 0; i < ARRAY_SIZE(lid_wake_mode_names); i++) {
const char *mode = lid_wake_mode_names[i];
if (strlen(mode) !=... | [
1,
0
] |
Linux Kernel | arch/x86/platform/olpc/olpc-xo1-sci.c | static irqreturn_t xo1_sci_intr(int irq, void *dev_id) {
struct platform_device *pdev = dev_id;
u32 sts;
u32 gpe;
sts = inl(acpi_base + CS5536_PM1_STS);
outl(sts | 0xffff, acpi_base + CS5536_PM1_STS);
gpe = inl(acpi_base + CS5536_PM_GPE0_STS);
outl(0xffffffff, acpi_base + CS5536_PM_GPE0_STS);
dev_dbg... | [
0,
0
] |
Linux Kernel | arch/x86/platform/olpc/olpc-xo1-sci.c | static int setup_sci_interrupt(struct platform_device *pdev) {
u32 lo, hi;
u32 sts;
int r;
rdmsr(0x51400020, lo, hi);
sci_irq = (lo >> 20) & 15;
if (sci_irq) {
dev_info(&pdev->dev, "SCI is mapped to IRQ %d\n", sci_irq);
} else {
dev_info(&pdev->dev, "SCI unmapped. Mapping to IRQ 3\n");
sci_... | [
1,
0
] |
Linux Kernel | arch/x86/platform/olpc/olpc-xo1-sci.c |
static int setup_power_button(struct platform_device *pdev) {
int r;
power_button_idev = input_allocate_device();
if (!power_button_idev)
return -ENOMEM;
power_button_idev->name = "Power Button";
power_button_idev->phys = DRV_NAME "/input0";
set_bit(EV_KEY, power_button_idev->evbit);
set_bit(KEY_PO... | [
0,
0
] |
Linux Kernel | arch/x86/platform/olpc/olpc-xo1-sci.c |
static int __init xo1_sci_init(void) {
return platform_driver_register(&xo1_sci_driver);
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/olpc/olpc-xo15-sci.c |
static ssize_t lid_wake_on_close_store(struct kobject *s,
struct kobj_attribute *attr,
const char *buf, size_t n) {
unsigned int val;
if (sscanf(buf, "%u", &val) != 1)
return -EINVAL;
set_lid_wake_behavior(!!val);
return n;
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/olpc/olpc-xo15-sci.c |
static void battery_status_changed(void) {
struct power_supply *psy = power_supply_get_by_name("olpc_battery");
if (psy) {
power_supply_changed(psy);
power_supply_put(psy);
}
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/olpc/olpc-xo15-sci.c |
static void process_sci_queue(void) {
u16 data;
int r;
do {
r = olpc_ec_sci_query(&data);
if (r || !data)
break;
pr_debug(PFX "SCI 0x%x received\n", data);
switch (data) {
case EC_SCI_SRC_BATERR:
case EC_SCI_SRC_BATSOC:
case EC_SCI_SRC_BATTERY:
case EC_SCI_SRC_BATCRIT:
... | [
1,
0
] |
Linux Kernel | arch/x86/platform/olpc/olpc-xo15-sci.c |
static u32 xo15_sci_gpe_handler(acpi_handle gpe_device, u32 gpe,
void *context) {
schedule_work(&sci_work);
return ACPI_INTERRUPT_HANDLED | ACPI_REENABLE_GPE;
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/olpc/olpc-xo15-sci.c | static int xo15_sci_resume(struct device *dev) {
olpc_ec_mask_write(EC_SCI_SRC_ALL);
/* Power/battery status might have changed */
battery_status_changed();
ac_status_changed();
return 0;
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/olpc/olpc.c |
static int __init olpc_ec_timeout_set(char *str) {
if (get_option(&str, &ec_timeout) != 1) {
ec_timeout = EC_BASE_TIMEOUT;
printk(KERN_ERR "olpc-ec: invalid argument to "
"'olpc_ec_timeout=', ignoring!\n");
}
printk(KERN_DEBUG "olpc-ec: using %d ms delay for EC commands.\n",
... | [
0,
0
] |
Linux Kernel | arch/x86/platform/olpc/olpc.c |
static inline unsigned int obf_status(unsigned int port) {
return inb(port) & 0x01;
}
#define wait_on_ibf(p, d) __wait_on_ibf(__LINE__, (p), (d)) | [
0,
0
] |
Linux Kernel | arch/x86/platform/olpc/olpc.c | static int __wait_on_ibf(unsigned int line, unsigned int port, int desired) {
unsigned int timeo;
int state = ibf_status(port);
for (timeo = ec_timeout; state != desired && timeo; timeo--) {
mdelay(1);
state = ibf_status(port);
}
if ((state == desired) && (ec_timeout > EC_BASE_TIMEOUT) &&
time... | [
1,
0
] |
Linux Kernel | arch/x86/platform/olpc/olpc_dt.c |
static phandle __init olpc_dt_getsibling(phandle node) {
const void *args[] = {(void *)node};
void *res[] = {&node};
if ((s32)node == -1)
return 0;
if (olpc_ofw("peer", args, res) || (s32)node == -1)
return 0;
return node;
} | [
0,
0
] |
Linux Kernel | arch/x86/platform/olpc/olpc_dt.c |
static int __init olpc_dt_pkg2path(phandle node, char *buf, const int buflen,
int *len) {
const void *args[] = {(void *)node, buf, (void *)buflen};
void *res[] = {len};
if ((s32)node == -1)
return -1;
if (olpc_ofw("package-to-path", args, res) || *len < 1)
return -1... | [
0,
0
] |
Linux Kernel | arch/x86/platform/olpc/olpc_dt.c |
static phandle __init olpc_dt_finddevice(const char *path) {
phandle node;
const void *args[] = {path};
void *res[] = {&node};
if (olpc_ofw("finddevice", args, res)) {
pr_err("olpc_dt: finddevice failed!\n");
return 0;
}
if ((s32)node == -1)
return 0;
return node;
} | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.