mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 16:45:02 +07:00
80213c03c4
Enumeration - Check Vendor ID only for Config Request Retry Status (Rajat Jain) - Enable Config Request Retry Status when supported (Rajat Jain) - Add generic domain handling (Catalin Marinas) - Generate uppercase hex for modalias interface class (Ricardo Ribalda Delgado) Resource management - Add missing MEM_64 mask in pci_assign_unassigned_bridge_resources() (Yinghai Lu) - Increase IBM ipr SAS Crocodile BARs to at least system page size (Douglas Lehr) PCI device hotplug - Prevent NULL dereference during pciehp probe (Andreas Noever) - Move _HPP & _HPX handling into core (Bjorn Helgaas) - Apply _HPP to PCIe devices as well as PCI (Bjorn Helgaas) - Apply _HPP/_HPX to display devices (Bjorn Helgaas) - Preserve SERR & PARITY settings when applying _HPP/_HPX (Bjorn Helgaas) - Preserve MPS and MRRS settings when applying _HPP/_HPX (Bjorn Helgaas) - Apply _HPP/_HPX to all devices, not just hot-added ones (Bjorn Helgaas) - Fix wait time in pciehp timeout message (Yinghai Lu) - Add more pciehp Slot Control debug output (Yinghai Lu) - Stop disabling pciehp notifications during init (Yinghai Lu) MSI - Remove arch_msi_check_device() (Alexander Gordeev) - Rename pci_msi_check_device() to pci_msi_supported() (Alexander Gordeev) - Move D0 check into pci_msi_check_device() (Alexander Gordeev) - Remove unused kobject from struct msi_desc (Yijing Wang) - Remove "pos" from the struct msi_desc msi_attrib (Yijing Wang) - Add "msi_bus" sysfs MSI/MSI-X control for endpoints (Yijing Wang) - Use __get_cached_msi_msg() instead of get_cached_msi_msg() (Yijing Wang) - Use __read_msi_msg() instead of read_msi_msg() (Yijing Wang) - Use __write_msi_msg() instead of write_msi_msg() (Yijing Wang) Power management - Drop unused runtime PM support code for PCIe ports (Rafael J. Wysocki) - Allow PCI devices to be put into D3cold during system suspend (Rafael J. Wysocki) AER - Add additional AER error strings (Gong Chen) - Make <linux/aer.h> standalone includable (Thierry Reding) Virtualization - Add ACS quirk for Solarflare SFC9120 & SFC9140 (Alex Williamson) - Add ACS quirk for Intel 10G NICs (Alex Williamson) - Add ACS quirk for AMD A88X southbridge (Marti Raudsepp) - Remove unused pci_find_upstream_pcie_bridge(), pci_get_dma_source() (Alex Williamson) - Add device flag helpers (Ethan Zhao) - Assume all Mellanox devices have broken INTx masking (Gavin Shan) Generic host bridge driver - Fix ioport_map() for !CONFIG_GENERIC_IOMAP (Liviu Dudau) - Add pci_register_io_range() and pci_pio_to_address() (Liviu Dudau) - Define PCI_IOBASE as the base of virtual PCI IO space (Liviu Dudau) - Fix the conversion of IO ranges into IO resources (Liviu Dudau) - Add pci_get_new_domain_nr() and of_get_pci_domain_nr() (Liviu Dudau) - Add support for parsing PCI host bridge resources from DT (Liviu Dudau) - Add pci_remap_iospace() to map bus I/O resources (Liviu Dudau) - Add arm64 architectural support for PCI (Liviu Dudau) APM X-Gene - Add APM X-Gene PCIe driver (Tanmay Inamdar) - Add arm64 DT APM X-Gene PCIe device tree nodes (Tanmay Inamdar) Freescale i.MX6 - Probe in module_init(), not fs_initcall() (Lucas Stach) - Delay enabling reference clock for SS until it stabilizes (Tim Harvey) Marvell MVEBU - Fix uninitialized variable in mvebu_get_tgt_attr() (Thomas Petazzoni) NVIDIA Tegra - Make sure the PCIe PLL is really reset (Eric Yuen) - Add error path tegra_msi_teardown_irq() cleanup (Jisheng Zhang) - Fix extended configuration space mapping (Peter Daifuku) - Implement resource hierarchy (Thierry Reding) - Clear CLKREQ# enable on port disable (Thierry Reding) - Add Tegra124 support (Thierry Reding) ST Microelectronics SPEAr13xx - Pass config resource through reg property (Pratyush Anand) Synopsys DesignWare - Use NULL instead of false (Fabio Estevam) - Parse bus-range property from devicetree (Lucas Stach) - Use pci_create_root_bus() instead of pci_scan_root_bus() (Lucas Stach) - Remove pci_assign_unassigned_resources() (Lucas Stach) - Check private_data validity in single place (Lucas Stach) - Setup and clear exactly one MSI at a time (Lucas Stach) - Remove open-coded bitmap operations (Lucas Stach) - Fix configuration base address when using 'reg' (Minghuan Lian) - Fix IO resource end address calculation (Minghuan Lian) - Rename get_msi_data() to get_msi_addr() (Minghuan Lian) - Add get_msi_data() to pcie_host_ops (Minghuan Lian) - Add support for v3.65 hardware (Murali Karicheri) - Fold struct pcie_port_info into struct pcie_port (Pratyush Anand) TI Keystone - Add TI Keystone PCIe driver (Murali Karicheri) - Limit MRSS for all downstream devices (Murali Karicheri) - Assume controller is already in RC mode (Murali Karicheri) - Set device ID based on SoC to support multiple ports (Murali Karicheri) Xilinx AXI - Add Xilinx AXI PCIe driver (Srikanth Thokala) - Fix xilinx_pcie_assign_msi() return value test (Dan Carpenter) Miscellaneous - Clean up whitespace (Quentin Lambert) - Remove assignments from "if" conditions (Quentin Lambert) - Move PCI_VENDOR_ID_VMWARE to pci_ids.h (Francesco Ruggeri) - x86: Mark DMI tables as initialization data (Mathias Krause) - x86: Move __init annotation to the correct place (Mathias Krause) - x86: Mark constants of pci_mmcfg_nvidia_mcp55() as __initconst (Mathias Krause) - x86: Constify pci_mmcfg_probes[] array (Mathias Krause) - x86: Mark PCI BIOS initialization code as such (Mathias Krause) - Parenthesize PCI_DEVID and PCI_VPD_LRDT_ID parameters (Megan Kamiya) - Remove unnecessary variable in pci_add_dynid() (Tobias Klauser) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJUNWmJAAoJEFmIoMA60/r8GncP/3uHRoBrnaF6pv+S1l1p3Fs/ l1kKH91/IuAAU7VJX8pkNybFqx02topWmiVVXAzqvD01PcRLGCLjPbWl5h+y5/Ja CHZH33AwHAmm0kt4BrOSOeHTLJhAigly2zV3P4F8jRIgyaeMoGZ6Ko4tkQUpm21k +ohrOd4cxYkmzzCjKwsZZhKnyRNpae8FmTk3VQBPuN8DbhvFPrqo5/+GeAdSZTdS HZHpfl2HL4095aY7uBVsZqNkjQyl6SnWwjkjLnuI8q3qA3BLgDZE/Jr8F/MNuW1V y01JIjerFWMDFyBIkpg7moYnODy6oP3KvczwYdKGmqsJja+0MQvYhLTwD+R/yTQS SewJA0mL3T3EJEfnFYkCiaIX27xIwk/FxHfaKPN91xgx/QM7xCVZNrU2/dXjhoX1 GqLKxOEaFHhWWTyT5Dj27I0ZcElzFZ3tIwvrHfs8y22oAuAlsAypaUgvUwRfL4CO hOj4ITZa0t041sYWqxCoGAA9Fdp8HMzNKKS5F4mhADz4Ad9v6uPCNv/s/RoxVsbm jhZOtPYJ0/iCA+kNVX563S8Z3VpfPI+7bBjcj2WKdzW+IlICvOKT+kvwL2Tv/rE7 w0hrNsbkgGsYbPldMx7LwCavsUtYFuNj0zoU6vkhP2jk6O2Tn5VXDmjrXH0v3iHI v03vlUtre0bQ26fzDyLQ =4Zv1 -----END PGP SIGNATURE----- Merge tag 'pci-v3.18-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: "The interesting things here are: - Turn on Config Request Retry Status Software Visibility. This caused hangs last time, but we included a fix this time. - Rework PCI device configuration to use _HPP/_HPX more aggressively - Allow PCI devices to be put into D3cold during system suspend - Add arm64 PCI support - Add APM X-Gene host bridge driver - Add TI Keystone host bridge driver - Add Xilinx AXI host bridge driver More detailed summary: Enumeration - Check Vendor ID only for Config Request Retry Status (Rajat Jain) - Enable Config Request Retry Status when supported (Rajat Jain) - Add generic domain handling (Catalin Marinas) - Generate uppercase hex for modalias interface class (Ricardo Ribalda Delgado) Resource management - Add missing MEM_64 mask in pci_assign_unassigned_bridge_resources() (Yinghai Lu) - Increase IBM ipr SAS Crocodile BARs to at least system page size (Douglas Lehr) PCI device hotplug - Prevent NULL dereference during pciehp probe (Andreas Noever) - Move _HPP & _HPX handling into core (Bjorn Helgaas) - Apply _HPP to PCIe devices as well as PCI (Bjorn Helgaas) - Apply _HPP/_HPX to display devices (Bjorn Helgaas) - Preserve SERR & PARITY settings when applying _HPP/_HPX (Bjorn Helgaas) - Preserve MPS and MRRS settings when applying _HPP/_HPX (Bjorn Helgaas) - Apply _HPP/_HPX to all devices, not just hot-added ones (Bjorn Helgaas) - Fix wait time in pciehp timeout message (Yinghai Lu) - Add more pciehp Slot Control debug output (Yinghai Lu) - Stop disabling pciehp notifications during init (Yinghai Lu) MSI - Remove arch_msi_check_device() (Alexander Gordeev) - Rename pci_msi_check_device() to pci_msi_supported() (Alexander Gordeev) - Move D0 check into pci_msi_check_device() (Alexander Gordeev) - Remove unused kobject from struct msi_desc (Yijing Wang) - Remove "pos" from the struct msi_desc msi_attrib (Yijing Wang) - Add "msi_bus" sysfs MSI/MSI-X control for endpoints (Yijing Wang) - Use __get_cached_msi_msg() instead of get_cached_msi_msg() (Yijing Wang) - Use __read_msi_msg() instead of read_msi_msg() (Yijing Wang) - Use __write_msi_msg() instead of write_msi_msg() (Yijing Wang) Power management - Drop unused runtime PM support code for PCIe ports (Rafael J. Wysocki) - Allow PCI devices to be put into D3cold during system suspend (Rafael J. Wysocki) AER - Add additional AER error strings (Gong Chen) - Make <linux/aer.h> standalone includable (Thierry Reding) Virtualization - Add ACS quirk for Solarflare SFC9120 & SFC9140 (Alex Williamson) - Add ACS quirk for Intel 10G NICs (Alex Williamson) - Add ACS quirk for AMD A88X southbridge (Marti Raudsepp) - Remove unused pci_find_upstream_pcie_bridge(), pci_get_dma_source() (Alex Williamson) - Add device flag helpers (Ethan Zhao) - Assume all Mellanox devices have broken INTx masking (Gavin Shan) Generic host bridge driver - Fix ioport_map() for !CONFIG_GENERIC_IOMAP (Liviu Dudau) - Add pci_register_io_range() and pci_pio_to_address() (Liviu Dudau) - Define PCI_IOBASE as the base of virtual PCI IO space (Liviu Dudau) - Fix the conversion of IO ranges into IO resources (Liviu Dudau) - Add pci_get_new_domain_nr() and of_get_pci_domain_nr() (Liviu Dudau) - Add support for parsing PCI host bridge resources from DT (Liviu Dudau) - Add pci_remap_iospace() to map bus I/O resources (Liviu Dudau) - Add arm64 architectural support for PCI (Liviu Dudau) APM X-Gene - Add APM X-Gene PCIe driver (Tanmay Inamdar) - Add arm64 DT APM X-Gene PCIe device tree nodes (Tanmay Inamdar) Freescale i.MX6 - Probe in module_init(), not fs_initcall() (Lucas Stach) - Delay enabling reference clock for SS until it stabilizes (Tim Harvey) Marvell MVEBU - Fix uninitialized variable in mvebu_get_tgt_attr() (Thomas Petazzoni) NVIDIA Tegra - Make sure the PCIe PLL is really reset (Eric Yuen) - Add error path tegra_msi_teardown_irq() cleanup (Jisheng Zhang) - Fix extended configuration space mapping (Peter Daifuku) - Implement resource hierarchy (Thierry Reding) - Clear CLKREQ# enable on port disable (Thierry Reding) - Add Tegra124 support (Thierry Reding) ST Microelectronics SPEAr13xx - Pass config resource through reg property (Pratyush Anand) Synopsys DesignWare - Use NULL instead of false (Fabio Estevam) - Parse bus-range property from devicetree (Lucas Stach) - Use pci_create_root_bus() instead of pci_scan_root_bus() (Lucas Stach) - Remove pci_assign_unassigned_resources() (Lucas Stach) - Check private_data validity in single place (Lucas Stach) - Setup and clear exactly one MSI at a time (Lucas Stach) - Remove open-coded bitmap operations (Lucas Stach) - Fix configuration base address when using 'reg' (Minghuan Lian) - Fix IO resource end address calculation (Minghuan Lian) - Rename get_msi_data() to get_msi_addr() (Minghuan Lian) - Add get_msi_data() to pcie_host_ops (Minghuan Lian) - Add support for v3.65 hardware (Murali Karicheri) - Fold struct pcie_port_info into struct pcie_port (Pratyush Anand) TI Keystone - Add TI Keystone PCIe driver (Murali Karicheri) - Limit MRSS for all downstream devices (Murali Karicheri) - Assume controller is already in RC mode (Murali Karicheri) - Set device ID based on SoC to support multiple ports (Murali Karicheri) Xilinx AXI - Add Xilinx AXI PCIe driver (Srikanth Thokala) - Fix xilinx_pcie_assign_msi() return value test (Dan Carpenter) Miscellaneous - Clean up whitespace (Quentin Lambert) - Remove assignments from "if" conditions (Quentin Lambert) - Move PCI_VENDOR_ID_VMWARE to pci_ids.h (Francesco Ruggeri) - x86: Mark DMI tables as initialization data (Mathias Krause) - x86: Move __init annotation to the correct place (Mathias Krause) - x86: Mark constants of pci_mmcfg_nvidia_mcp55() as __initconst (Mathias Krause) - x86: Constify pci_mmcfg_probes[] array (Mathias Krause) - x86: Mark PCI BIOS initialization code as such (Mathias Krause) - Parenthesize PCI_DEVID and PCI_VPD_LRDT_ID parameters (Megan Kamiya) - Remove unnecessary variable in pci_add_dynid() (Tobias Klauser)" * tag 'pci-v3.18-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (109 commits) arm64: dts: Add APM X-Gene PCIe device tree nodes PCI: Add ACS quirk for AMD A88X southbridge devices PCI: xgene: Add APM X-Gene PCIe driver PCI: designware: Remove open-coded bitmap operations PCI/MSI: Remove unnecessary temporary variable PCI/MSI: Use __write_msi_msg() instead of write_msi_msg() MSI/powerpc: Use __read_msi_msg() instead of read_msi_msg() PCI/MSI: Use __get_cached_msi_msg() instead of get_cached_msi_msg() PCI/MSI: Add "msi_bus" sysfs MSI/MSI-X control for endpoints PCI/MSI: Remove "pos" from the struct msi_desc msi_attrib PCI/MSI: Remove unused kobject from struct msi_desc PCI/MSI: Rename pci_msi_check_device() to pci_msi_supported() PCI/MSI: Move D0 check into pci_msi_check_device() PCI/MSI: Remove arch_msi_check_device() irqchip: armada-370-xp: Remove arch_msi_check_device() PCI/MSI/PPC: Remove arch_msi_check_device() arm64: Add architectural support for PCI PCI: Add pci_remap_iospace() to map bus I/O resources of/pci: Add support for parsing PCI host bridge resources from DT of/pci: Add pci_get_new_domain_nr() and of_get_pci_domain_nr() ... Conflicts: arch/arm64/boot/dts/apm-storm.dtsi
335 lines
8.7 KiB
Plaintext
335 lines
8.7 KiB
Plaintext
Devres - Managed Device Resource
|
|
================================
|
|
|
|
Tejun Heo <teheo@suse.de>
|
|
|
|
First draft 10 January 2007
|
|
|
|
|
|
1. Intro : Huh? Devres?
|
|
2. Devres : Devres in a nutshell
|
|
3. Devres Group : Group devres'es and release them together
|
|
4. Details : Life time rules, calling context, ...
|
|
5. Overhead : How much do we have to pay for this?
|
|
6. List of managed interfaces : Currently implemented managed interfaces
|
|
|
|
|
|
1. Intro
|
|
--------
|
|
|
|
devres came up while trying to convert libata to use iomap. Each
|
|
iomapped address should be kept and unmapped on driver detach. For
|
|
example, a plain SFF ATA controller (that is, good old PCI IDE) in
|
|
native mode makes use of 5 PCI BARs and all of them should be
|
|
maintained.
|
|
|
|
As with many other device drivers, libata low level drivers have
|
|
sufficient bugs in ->remove and ->probe failure path. Well, yes,
|
|
that's probably because libata low level driver developers are lazy
|
|
bunch, but aren't all low level driver developers? After spending a
|
|
day fiddling with braindamaged hardware with no document or
|
|
braindamaged document, if it's finally working, well, it's working.
|
|
|
|
For one reason or another, low level drivers don't receive as much
|
|
attention or testing as core code, and bugs on driver detach or
|
|
initialization failure don't happen often enough to be noticeable.
|
|
Init failure path is worse because it's much less travelled while
|
|
needs to handle multiple entry points.
|
|
|
|
So, many low level drivers end up leaking resources on driver detach
|
|
and having half broken failure path implementation in ->probe() which
|
|
would leak resources or even cause oops when failure occurs. iomap
|
|
adds more to this mix. So do msi and msix.
|
|
|
|
|
|
2. Devres
|
|
---------
|
|
|
|
devres is basically linked list of arbitrarily sized memory areas
|
|
associated with a struct device. Each devres entry is associated with
|
|
a release function. A devres can be released in several ways. No
|
|
matter what, all devres entries are released on driver detach. On
|
|
release, the associated release function is invoked and then the
|
|
devres entry is freed.
|
|
|
|
Managed interface is created for resources commonly used by device
|
|
drivers using devres. For example, coherent DMA memory is acquired
|
|
using dma_alloc_coherent(). The managed version is called
|
|
dmam_alloc_coherent(). It is identical to dma_alloc_coherent() except
|
|
for the DMA memory allocated using it is managed and will be
|
|
automatically released on driver detach. Implementation looks like
|
|
the following.
|
|
|
|
struct dma_devres {
|
|
size_t size;
|
|
void *vaddr;
|
|
dma_addr_t dma_handle;
|
|
};
|
|
|
|
static void dmam_coherent_release(struct device *dev, void *res)
|
|
{
|
|
struct dma_devres *this = res;
|
|
|
|
dma_free_coherent(dev, this->size, this->vaddr, this->dma_handle);
|
|
}
|
|
|
|
dmam_alloc_coherent(dev, size, dma_handle, gfp)
|
|
{
|
|
struct dma_devres *dr;
|
|
void *vaddr;
|
|
|
|
dr = devres_alloc(dmam_coherent_release, sizeof(*dr), gfp);
|
|
...
|
|
|
|
/* alloc DMA memory as usual */
|
|
vaddr = dma_alloc_coherent(...);
|
|
...
|
|
|
|
/* record size, vaddr, dma_handle in dr */
|
|
dr->vaddr = vaddr;
|
|
...
|
|
|
|
devres_add(dev, dr);
|
|
|
|
return vaddr;
|
|
}
|
|
|
|
If a driver uses dmam_alloc_coherent(), the area is guaranteed to be
|
|
freed whether initialization fails half-way or the device gets
|
|
detached. If most resources are acquired using managed interface, a
|
|
driver can have much simpler init and exit code. Init path basically
|
|
looks like the following.
|
|
|
|
my_init_one()
|
|
{
|
|
struct mydev *d;
|
|
|
|
d = devm_kzalloc(dev, sizeof(*d), GFP_KERNEL);
|
|
if (!d)
|
|
return -ENOMEM;
|
|
|
|
d->ring = dmam_alloc_coherent(...);
|
|
if (!d->ring)
|
|
return -ENOMEM;
|
|
|
|
if (check something)
|
|
return -EINVAL;
|
|
...
|
|
|
|
return register_to_upper_layer(d);
|
|
}
|
|
|
|
And exit path,
|
|
|
|
my_remove_one()
|
|
{
|
|
unregister_from_upper_layer(d);
|
|
shutdown_my_hardware();
|
|
}
|
|
|
|
As shown above, low level drivers can be simplified a lot by using
|
|
devres. Complexity is shifted from less maintained low level drivers
|
|
to better maintained higher layer. Also, as init failure path is
|
|
shared with exit path, both can get more testing.
|
|
|
|
|
|
3. Devres group
|
|
---------------
|
|
|
|
Devres entries can be grouped using devres group. When a group is
|
|
released, all contained normal devres entries and properly nested
|
|
groups are released. One usage is to rollback series of acquired
|
|
resources on failure. For example,
|
|
|
|
if (!devres_open_group(dev, NULL, GFP_KERNEL))
|
|
return -ENOMEM;
|
|
|
|
acquire A;
|
|
if (failed)
|
|
goto err;
|
|
|
|
acquire B;
|
|
if (failed)
|
|
goto err;
|
|
...
|
|
|
|
devres_remove_group(dev, NULL);
|
|
return 0;
|
|
|
|
err:
|
|
devres_release_group(dev, NULL);
|
|
return err_code;
|
|
|
|
As resource acquisition failure usually means probe failure, constructs
|
|
like above are usually useful in midlayer driver (e.g. libata core
|
|
layer) where interface function shouldn't have side effect on failure.
|
|
For LLDs, just returning error code suffices in most cases.
|
|
|
|
Each group is identified by void *id. It can either be explicitly
|
|
specified by @id argument to devres_open_group() or automatically
|
|
created by passing NULL as @id as in the above example. In both
|
|
cases, devres_open_group() returns the group's id. The returned id
|
|
can be passed to other devres functions to select the target group.
|
|
If NULL is given to those functions, the latest open group is
|
|
selected.
|
|
|
|
For example, you can do something like the following.
|
|
|
|
int my_midlayer_create_something()
|
|
{
|
|
if (!devres_open_group(dev, my_midlayer_create_something, GFP_KERNEL))
|
|
return -ENOMEM;
|
|
|
|
...
|
|
|
|
devres_close_group(dev, my_midlayer_create_something);
|
|
return 0;
|
|
}
|
|
|
|
void my_midlayer_destroy_something()
|
|
{
|
|
devres_release_group(dev, my_midlayer_create_something);
|
|
}
|
|
|
|
|
|
4. Details
|
|
----------
|
|
|
|
Lifetime of a devres entry begins on devres allocation and finishes
|
|
when it is released or destroyed (removed and freed) - no reference
|
|
counting.
|
|
|
|
devres core guarantees atomicity to all basic devres operations and
|
|
has support for single-instance devres types (atomic
|
|
lookup-and-add-if-not-found). Other than that, synchronizing
|
|
concurrent accesses to allocated devres data is caller's
|
|
responsibility. This is usually non-issue because bus ops and
|
|
resource allocations already do the job.
|
|
|
|
For an example of single-instance devres type, read pcim_iomap_table()
|
|
in lib/devres.c.
|
|
|
|
All devres interface functions can be called without context if the
|
|
right gfp mask is given.
|
|
|
|
|
|
5. Overhead
|
|
-----------
|
|
|
|
Each devres bookkeeping info is allocated together with requested data
|
|
area. With debug option turned off, bookkeeping info occupies 16
|
|
bytes on 32bit machines and 24 bytes on 64bit (three pointers rounded
|
|
up to ull alignment). If singly linked list is used, it can be
|
|
reduced to two pointers (8 bytes on 32bit, 16 bytes on 64bit).
|
|
|
|
Each devres group occupies 8 pointers. It can be reduced to 6 if
|
|
singly linked list is used.
|
|
|
|
Memory space overhead on ahci controller with two ports is between 300
|
|
and 400 bytes on 32bit machine after naive conversion (we can
|
|
certainly invest a bit more effort into libata core layer).
|
|
|
|
|
|
6. List of managed interfaces
|
|
-----------------------------
|
|
|
|
CLOCK
|
|
devm_clk_get()
|
|
devm_clk_put()
|
|
|
|
DMA
|
|
dmam_alloc_coherent()
|
|
dmam_alloc_noncoherent()
|
|
dmam_declare_coherent_memory()
|
|
dmam_free_coherent()
|
|
dmam_free_noncoherent()
|
|
dmam_pool_create()
|
|
dmam_pool_destroy()
|
|
|
|
GPIO
|
|
devm_gpiod_get()
|
|
devm_gpiod_get_index()
|
|
devm_gpiod_get_index_optional()
|
|
devm_gpiod_get_optional()
|
|
devm_gpiod_put()
|
|
|
|
IIO
|
|
devm_iio_device_alloc()
|
|
devm_iio_device_free()
|
|
devm_iio_device_register()
|
|
devm_iio_device_unregister()
|
|
devm_iio_trigger_alloc()
|
|
devm_iio_trigger_free()
|
|
|
|
IO region
|
|
devm_release_mem_region()
|
|
devm_release_region()
|
|
devm_release_resource()
|
|
devm_request_mem_region()
|
|
devm_request_region()
|
|
devm_request_resource()
|
|
|
|
IOMAP
|
|
devm_ioport_map()
|
|
devm_ioport_unmap()
|
|
devm_ioremap()
|
|
devm_ioremap_nocache()
|
|
devm_ioremap_resource() : checks resource, requests memory region, ioremaps
|
|
devm_iounmap()
|
|
pcim_iomap()
|
|
pcim_iomap_regions() : do request_region() and iomap() on multiple BARs
|
|
pcim_iomap_table() : array of mapped addresses indexed by BAR
|
|
pcim_iounmap()
|
|
|
|
IRQ
|
|
devm_free_irq()
|
|
devm_request_any_context_irq()
|
|
devm_request_irq()
|
|
devm_request_threaded_irq()
|
|
|
|
MDIO
|
|
devm_mdiobus_alloc()
|
|
devm_mdiobus_alloc_size()
|
|
devm_mdiobus_free()
|
|
|
|
MEM
|
|
devm_free_pages()
|
|
devm_get_free_pages()
|
|
devm_kasprintf()
|
|
devm_kcalloc()
|
|
devm_kfree()
|
|
devm_kmalloc()
|
|
devm_kmalloc_array()
|
|
devm_kmemdup()
|
|
devm_kstrdup()
|
|
devm_kvasprintf()
|
|
devm_kzalloc()
|
|
|
|
PCI
|
|
pcim_enable_device() : after success, all PCI ops become managed
|
|
pcim_pin_device() : keep PCI device enabled after release
|
|
|
|
PHY
|
|
devm_usb_get_phy()
|
|
devm_usb_put_phy()
|
|
|
|
PINCTRL
|
|
devm_pinctrl_get()
|
|
devm_pinctrl_put()
|
|
|
|
PWM
|
|
devm_pwm_get()
|
|
devm_pwm_put()
|
|
|
|
REGULATOR
|
|
devm_regulator_bulk_get()
|
|
devm_regulator_get()
|
|
devm_regulator_put()
|
|
devm_regulator_register()
|
|
|
|
SLAVE DMA ENGINE
|
|
devm_acpi_dma_controller_register()
|
|
|
|
SPI
|
|
devm_spi_register_master()
|