arch/s390/pci/pci_bus.h

Source file repositories/reference/linux-study-clean/arch/s390/pci/pci_bus.h

File Facts

System
Linux kernel
Corpus path
arch/s390/pci/pci_bus.h
Extension
.h
Size
1541 bytes
Lines
58
Domain
Architecture Layer
Bucket
arch/s390
Inferred role
Architecture Layer: implementation source
Status
source implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef __S390_PCI_BUS_H
#define __S390_PCI_BUS_H

#include <linux/pci.h>

int zpci_bus_device_register(struct zpci_dev *zdev, struct pci_ops *ops);
void zpci_bus_device_unregister(struct zpci_dev *zdev);

int zpci_bus_scan_bus(struct zpci_bus *zbus);
void zpci_bus_get_next(struct zpci_bus **pos);

/**
 * zpci_bus_for_each - iterate over all the registered zbus objects
 * @pos:	a struct zpci_bus * as cursor
 *
 * Acquires and releases references as the cursor iterates over the registered
 * objects. Is tolerant against concurrent removals of objects.
 *
 * Context: Process context. May sleep.
 */
#define zpci_bus_for_each(pos)					     \
	for ((pos) = NULL, zpci_bus_get_next(&(pos)); (pos) != NULL; \
	     zpci_bus_get_next(&(pos)))

int zpci_bus_scan_device(struct zpci_dev *zdev);
void zpci_bus_remove_device(struct zpci_dev *zdev, bool set_error);

void zpci_release_device(struct kref *kref);

void zpci_zdev_put(struct zpci_dev *zdev);

static inline void zpci_zdev_get(struct zpci_dev *zdev)
{
	kref_get(&zdev->kref);
}

int zpci_alloc_domain(int domain);
void zpci_free_domain(int domain);
int zpci_setup_bus_resources(struct zpci_dev *zdev);

static inline struct zpci_dev *zdev_from_bus(struct pci_bus *bus,
					     unsigned int devfn)
{
	struct zpci_bus *zbus = bus->sysdata;

	return (devfn >= ZPCI_FUNCTIONS_PER_BUS) ? NULL : zbus->function[devfn];
}

#endif /* __S390_PCI_BUS_H */

Annotation

Implementation Notes