aboutsummaryrefslogtreecommitdiff
path: root/include/linux
AgeCommit message (Collapse)AuthorFilesLines
2017-04-20net: add netif_is_ovs_port helperJiri Pirko1-0/+5
To find out if a netdev is an OVS port. Signed-off-by: Jiri Pirko <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2017-04-20dm: add dax_device and dax_operations supportDan Williams1-0/+1
Allocate a dax_device to represent the capacity of a device-mapper instance. Provide a ->direct_access() method via the new dax_operations indirection that mirrors the functionality of the current direct_access support via block_device_operations. Once fs/dax.c has been converted to use dax_operations the old dm_blk_direct_access() will be removed. A new helper dm_dax_get_live_target() is introduced to separate some of the dm-specifics from the direct_access implementation. This enabling is only for the top-level dm representation to upper layers. Converting target direct_access implementations is deferred to a separate patch. Cc: Toshi Kani <[email protected]> Reviewed-by: Mike Snitzer <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2017-04-20dax: introduce dax_direct_access()Dan Williams2-0/+3
Replace bdev_direct_access() with dax_direct_access() that uses dax_device and dax_operations instead of a block_device and block_device_operations for dax. Once all consumers of the old api have been converted bdev_direct_access() will be deleted. Given that block device partitioning decisions can cause dax page alignment constraints to be violated this also introduces the bdev_dax_pgoff() helper. It handles calculating a logical pgoff relative to the dax_device and also checks for page alignment. Signed-off-by: Dan Williams <[email protected]>
2017-04-20block: kill bdev_dax_capable()Dan Williams1-1/+0
This is leftover dead code that has since been replaced by bdev_dax_supported(). Signed-off-by: Dan Williams <[email protected]>
2017-04-20block: remove the errors field from struct requestChristoph Hellwig1-2/+0
Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Acked-by: Roger Pau Monné <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2017-04-20block: add a error_count field to struct requestChristoph Hellwig1-0/+1
This is for the legacy floppy and ataflop drivers that currently abuse ->errors for this purpose. It's stashed away in a union to not grow the struct size, the other fields are either used by modern drivers for different purposes or the I/O scheduler before queing the I/O to drivers. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2017-04-20blk-mq: remove the error argument to blk_mq_complete_requestChristoph Hellwig1-1/+1
Now that all drivers that call blk_mq_complete_requests have a ->complete callback we can remove the direct call to blk_mq_end_request, as well as the error argument to blk_mq_complete_request. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2017-04-20scsi: introduce a result field in struct scsi_requestChristoph Hellwig1-1/+1
This passes on the scsi_cmnd result field to users of passthrough requests. Currently we abuse req->errors for this purpose, but that field will go away in its current form. Note that the old IDE code abuses the errors field in very creative ways and stores all kinds of different values in it. I didn't dare to touch this magic, so the abuses are brought forward 1:1. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2017-04-20block: remove the blk_execute_rq return valueChristoph Hellwig1-1/+1
The function only returns -EIO if rq->errors is non-zero, which is not very useful and lets a large number of callers ignore the return value. Just let the callers figure out their error themselves. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2017-04-20bdi: Drop 'parent' argument from bdi_register[_va]()Jan Kara1-5/+4
Drop 'parent' argument of bdi_register() and bdi_register_va(). It is always NULL. Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2017-04-20block: Remove unused functionsJan Kara1-5/+0
Now that all backing_dev_info structure are allocated separately, we can drop some unused functions. Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2017-04-20fs: Remove SB_I_DYNBDI flagJan Kara1-3/+0
Now that all bdi structures filesystems use are properly refcounted, we can remove the SB_I_DYNBDI flag. Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2017-04-20nfs: Convert to separately allocated bdiJan Kara1-1/+0
Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: Anna Schumaker <[email protected]> CC: [email protected] Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jan Kara <[email protected]> Acked-by: Trond Myklebust <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2017-04-20coda: Convert to separately allocated bdiJan Kara1-1/+0
Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: Jan Harkes <[email protected]> CC: [email protected] CC: [email protected] Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2017-04-20mtd: Convert to dynamically allocated bdi infrastructureJan Kara1-5/+0
MTD already allocates backing_dev_info dynamically. Convert it to use generic infrastructure for this including proper refcounting. We drop mtd->backing_dev_info as its only use was to pass mtd_bdi pointer from one file into another and if we wanted to keep that in a clean way, we'd have to make mtd hold and drop bdi reference as needed which seems pointless for passing one global pointer... CC: David Woodhouse <[email protected]> CC: Brian Norris <[email protected]> CC: [email protected] Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2017-04-20fs: Provide infrastructure for dynamic BDIs in filesystemsJan Kara2-1/+7
Provide helper functions for setting up dynamically allocated backing_dev_info structures for filesystems and cleaning them up on superblock destruction. CC: [email protected] CC: [email protected] CC: Petr Vandrovec <[email protected]> CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2017-04-20bdi: Provide bdi_register_va() and bdi_alloc()Jan Kara1-0/+6
Add function that registers bdi and takes va_list instead of variable number of arguments. Add bdi_alloc() as simple wrapper for NUMA-unaware users allocating BDI. Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2017-04-20NFS: move rw_mode to nfs_pageio_headerBenjamin Coddington2-2/+3
Let's try to have it in a cacheline in nfs4_proc_pgio_rpc_prepare(). Signed-off-by: Benjamin Coddington <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2017-04-20Merge tag 'mac80211-next-for-davem-2017-04-18' of ↵David S. Miller1-2/+18
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== My last pull request has been a while, we now have: * connection quality monitoring with multiple thresholds * support for FILS shared key authentication offload * pre-CAC regulatory compliance - only ETSI allows this * sanity check for some rate confusion that hit ChromeOS (but nobody else uses it, evidently) * some documentation updates * lots of cleanups ==================== Signed-off-by: David S. Miller <[email protected]>
2017-04-20NFS: fix usage of mempools.NeilBrown1-1/+1
When passed GFP flags that allow sleeping (such as GFP_NOIO), mempool_alloc() will never return NULL, it will wait until memory is available. This means that we don't need to handle failure, but that we do need to ensure one thread doesn't call mempool_alloc() twice on the one pool without queuing or freeing the first allocation. If multiple threads did this during times of high memory pressure, the pool could be exhausted and a deadlock could result. pnfs_generic_alloc_ds_commits() attempts to allocate from the nfs_commit_mempool while already holding an allocation from that pool. This is not safe. So change nfs_commitdata_alloc() to take a flag that indicates whether failure is acceptable. In pnfs_generic_alloc_ds_commits(), accept failure and handle it as we currently do. Else where, do not accept failure, and do not handle it. Even when failure is acceptable, we want to succeed if possible. That means both - using an entry from the pool if there is one - waiting for direct reclaim is there isn't. We call mempool_alloc(GFP_NOWAIT) to achieve the first, then kmem_cache_alloc(GFP_NOIO|__GFP_NORETRY) to achieve the second. Each of these can fail, but together they do the best they can without blocking indefinitely. The objects returned by kmem_cache_alloc() will still be freed by mempool_free(). This is safe as mempool_alloc() uses exactly the same function to allocate objects (since the mempool was created with mempool_create_slab_pool()). The object returned by mempool_alloc() and kmem_cache_alloc() are indistinguishable so mempool_free() will handle both identically, either adding to the pool or calling kmem_cache_free(). Also, don't test for failure when allocating from nfs_wdata_mempool. Signed-off-by: NeilBrown <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2017-04-20Merge tag 'usb-serial-4.12-rc1' of ↵Greg Kroah-Hartman1-10/+32
git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for v4.12-rc1 Here are the USB-serial updates for 4.12, including: - support for devices with up to 16 ports (e.g. some Moxa devices) - support for endpoint sanity checks in core, which allows for code sharing and avoids allocating resources for rejected interfaces - support for endpoint-port remapping, which allows some driver hacks to be removed as well as omninet to use the generic write implementation - removal of an obsolete tty open-race workaround which prevented a port from being opened immediately after having been registered - generic-driver support for interfaces with just a bulk-in endpoint - improved ftdi_sio event-char and latency-timer handling - improved ftdi_sio support for some broken BM chips Included are also various clean ups and a new ftdi_sio device id. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold <[email protected]>
2017-04-20Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2-12/+42
A function in kernel/bpf/syscall.c which got a bug fix in 'net' was moved to kernel/bpf/verifier.c in 'net-next'. Signed-off-by: David S. Miller <[email protected]>
2017-04-20iommu/omap: Move data structures to omap-iommu.hJoerg Roedel1-17/+0
The internal data-structures are scattered over various header and C files. Consolidate them in omap-iommu.h. While at this, add the kerneldoc comment for the missing iommu domain variable and revise the iommu_arch_data name. Signed-off-by: Joerg Roedel <[email protected]> [[email protected]: revise kerneldoc comments] Signed-off-by: Suman Anna <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
2017-04-20iommu/omap: Drop legacy-style device supportSuman Anna1-3/+0
All the supported boards that have OMAP IOMMU devices do support DT boot only now. So, drop the support for the non-DT legacy-style devices from the OMAP IOMMU driver. Couple of the fields from the iommu platform data would no longer be required, so they have also been cleaned up. The IOMMU platform data is still needed though for performing reset management properly in a multi-arch environment. Signed-off-by: Suman Anna <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
2017-04-20ACPI/IORT: Remove linker section for IORT entries probingLorenzo Pieralisi1-3/+0
The IORT linker section introduced by commit 34ceea275f62 ("ACPI/IORT: Introduce linker section for IORT entries probing") was needed to make sure SMMU drivers are registered (and therefore probed) in the kernel before devices using the SMMU have a chance to probe in turn. Through the introduction of deferred IOMMU configuration the linker section based IORT probing infrastructure is not needed any longer, in that device/SMMU probe dependencies are managed through the probe deferral mechanism, making the IORT linker section infrastructure unused, so that it can be removed. Remove the unused IORT linker section probing infrastructure from the kernel to complete the ACPI IORT IOMMU configure probe deferral mechanism implementation. Tested-by: Hanjun Guo <[email protected]> Reviewed-by: Robin Murphy <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Cc: Sricharan R <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
2017-04-20drivers: acpi: Handle IOMMU lookup failure with deferred probing or errorSricharan R1-2/+5
This is an equivalent to the DT's handling of the iommu master's probe with deferred probing when the corrsponding iommu is not probed yet. The lack of a registered IOMMU can be caused by the lack of a driver for the IOMMU, the IOMMU device probe not having been performed yet, having been deferred, or having failed. The first case occurs when the firmware describes the bus master and IOMMU topology correctly but no device driver exists for the IOMMU yet or the device driver has not been compiled in. Return NULL, the caller will configure the device without an IOMMU. The second and third cases are handled by deferring the probe of the bus master device which will eventually get reprobed after the IOMMU. The last case is currently handled by deferring the probe of the bus master device as well. A mechanism to either configure the bus master device without an IOMMU or to fail the bus master device probe depending on whether the IOMMU is optional or mandatory would be a good enhancement. Tested-by: Hanjun Guo <[email protected]> Reviewed-by: Robin Murphy <[email protected]> [Lorenzo: Added fixes for dma_coherent_mask overflow, acpi_dma_configure called multiple times for same device] Signed-off-by: Lorenzo Pieralisi <[email protected]> Signed-off-by: Sricharan R <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
2017-04-20iommu: of: Handle IOMMU lookup failure with deferred probing or errorLaurent Pinchart1-3/+6
Failures to look up an IOMMU when parsing the DT iommus property need to be handled separately from the .of_xlate() failures to support deferred probing. The lack of a registered IOMMU can be caused by the lack of a driver for the IOMMU, the IOMMU device probe not having been performed yet, having been deferred, or having failed. The first case occurs when the device tree describes the bus master and IOMMU topology correctly but no device driver exists for the IOMMU yet or the device driver has not been compiled in. Return NULL, the caller will configure the device without an IOMMU. The second and third cases are handled by deferring the probe of the bus master device which will eventually get reprobed after the IOMMU. The last case is currently handled by deferring the probe of the bus master device as well. A mechanism to either configure the bus master device without an IOMMU or to fail the bus master device probe depending on whether the IOMMU is optional or mandatory would be a good enhancement. Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Robin Murphy <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Laurent Pichart <[email protected]> Signed-off-by: Sricharan R <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
2017-04-20of/acpi: Configure dma operations at probe time for platform/amba/pci bus ↵Sricharan R1-0/+12
devices Configuring DMA ops at probe time will allow deferring device probe when the IOMMU isn't available yet. The dma_configure for the device is now called from the generic device_attach callback just before the bus/driver probe is called. This way, configuring the DMA ops for the device would be called at the same place for all bus_types, hence the deferred probing mechanism should work for all buses as well. pci_bus_add_devices (platform/amba)(_device_create/driver_register) | | pci_bus_add_device (device_add/driver_register) | | device_attach device_initial_probe | | __device_attach_driver __device_attach_driver | driver_probe_device | really_probe | dma_configure Similarly on the device/driver_unregister path __device_release_driver is called which inturn calls dma_deconfigure. This patch changes the dma ops configuration to probe time for both OF and ACPI based platform/amba/pci bus devices. Tested-by: Marek Szyprowski <[email protected]> Tested-by: Hanjun Guo <[email protected]> Reviewed-by: Robin Murphy <[email protected]> Acked-by: Rob Herring <[email protected]> Acked-by: Bjorn Helgaas <[email protected]> (drivers/pci part) Acked-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Sricharan R <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
2017-04-20of: dma: Make of_dma_deconfigure() publicLaurent Pinchart1-0/+3
As part of moving DMA initializing to probe time the of_dma_deconfigure() function will need to be called from different source files. Make it public and move it to drivers/of/device.c where the of_dma_configure() function is. Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Robin Murphy <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
2017-04-20Merge branch 'linus' into irq/coreThomas Gleixner20-47/+113
Pick up upstream fixes to avoid conflicts with pending patches.
2017-04-20PCI: Export pcie_flr()Christoph Hellwig1-0/+1
Currently we opencode the FLR sequence in lots of place; export a core helper instead. We split out the probing for FLR support as all the non-core callers already know their hardware. Note that in the new pci_has_flr() function the quirk check has been moved before the capability check as there is no point in reading the capability in this case. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2017-04-20PCI: Add I/O BAR support to generic pci_mmap_resource_range()David Woodhouse1-0/+4
This will need to call into an arch-provided pci_iobar_pfn() function. Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2017-04-20PCI: Add pci_mmap_resource_range() and use it for ARM64David Woodhouse1-4/+15
Starting to leave behind the legacy of the pci_mmap_page_range() interface which takes "user-visible" BAR addresses. This takes just the resource and offset. For now, both APIs coexist and depending on the platform, one is implemented as a wrapper around the other. Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2017-04-20PCI: Add BAR index argument to pci_mmap_page_range()David Woodhouse1-1/+2
In all cases we know which BAR it is. Passing it in means that arch code (or generic code; watch this space) won't have to go looking for it again. Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2017-04-20powerpc/kprobes: Fix handling of function offsets on ABIv2Naveen N. Rao1-1/+1
commit 239aeba76409 ("perf powerpc: Fix kprobe and kretprobe handling with kallsyms on ppc64le") changed how we use the offset field in struct kprobe on ABIv2. perf now offsets from the global entry point if an offset is specified and otherwise chooses the local entry point. Fix the same in kernel for kprobe API users. We do this by extending kprobe_lookup_name() to accept an additional parameter to indicate the offset specified with the kprobe registration. If offset is 0, we return the local function entry and return the global entry point otherwise. With: # cd /sys/kernel/debug/tracing/ # echo "p _do_fork" >> kprobe_events # echo "p _do_fork+0x10" >> kprobe_events before this patch: # cat ../kprobes/list c0000000000d0748 k _do_fork+0x8 [DISABLED] c0000000000d0758 k _do_fork+0x18 [DISABLED] c0000000000412b0 k kretprobe_trampoline+0x0 [OPTIMIZED] and after: # cat ../kprobes/list c0000000000d04c8 k _do_fork+0x8 [DISABLED] c0000000000d04d0 k _do_fork+0x10 [DISABLED] c0000000000412b0 k kretprobe_trampoline+0x0 [OPTIMIZED] Acked-by: Ananth N Mavinakayanahalli <[email protected]> Signed-off-by: Naveen N. Rao <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2017-04-20kprobes: Convert kprobe_lookup_name() to a functionNaveen N. Rao1-0/+1
The macro is now pretty long and ugly on powerpc. In the light of further changes needed here, convert it to a __weak variant to be over-ridden with a nicer looking function. Suggested-by: Masami Hiramatsu <[email protected]> Acked-by: Masami Hiramatsu <[email protected]> Signed-off-by: Naveen N. Rao <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2017-04-20Clocksource/mips-gic: Remove redundant non devicetree initMatt Redfearn1-1/+0
Malta was the only platform probing this driver from platform code without using device tree. With that code removed, gic_clocksource_init is redundant so remove it. Signed-off-by: Matt Redfearn <[email protected]> Cc: [email protected] Cc: Jason Cooper <[email protected]> Cc: Paul Burton <[email protected]> Cc: Daniel Lezcano <[email protected]> Cc: Ralf Baechle <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2017-04-20clocksource: Use GENMASK_ULL in definition of CLOCKSOURCE_MASKMatthias Kaehlcke1-1/+1
Besides reusing existing code this removes the special case handling for 64-bit masks, which causes clang to raise a shift count overflow warning due to https://bugs.llvm.org//show_bug.cgi?id=10030. Suggested-by: Dmitry Torokhov <[email protected]> Signed-off-by: Matthias Kaehlcke <[email protected]> Cc: Grant Grundler <[email protected]> Cc: Greg Hackmann <[email protected]> Cc: Michael Davidson <[email protected]> Cc: John Stultz <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2017-04-20dma-buf: Rename dma-ops to prevent conflict with kunmap_atomic macroLogan Gunthorpe1-11/+11
Seeing the kunmap_atomic dma_buf_ops share the same name with a macro in highmem.h, the former can be aliased if any dma-buf user includes that header. I'm personally trying to include highmem.h inside scatterlist.h and this breaks the dma-buf code proper. Christoph Hellwig suggested [1] renaming it and pushing this patch ASAP. To maintain consistency I've renamed all four of kmap* and kunmap* to be map* and unmap*. (Even though only kmap_atomic presently conflicts.) [1] https://www.spinics.net/lists/target-devel/msg15070.html Signed-off-by: Logan Gunthorpe <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]> Acked-by: Daniel Vetter <[email protected]> Acked-by: Sumit Semwal <[email protected]> Signed-off-by: Sumit Semwal <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-04-20Merge branch 'WIP.x86/process' into perf/coreIngo Molnar2-0/+6
2017-04-20Merge tag 'arch-timer-gtdt' of ↵Thomas Gleixner1-0/+7
git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux into timers/core Pull arch timer GTDT support from Mark Rutland - arch_timer cleanups and refactoring - new common GTDT parser - GTDT-based MMIO arch_timer support - GTDT-based SBSA watchdog support Fix up a trivial pr_err() conflict.
2017-04-19block: Inline blk_rq_set_prio()Bart Van Assche1-14/+0
Since only a single caller remains, inline blk_rq_set_prio(). Initialize req->ioprio even if no I/O priority has been set in the bio nor in the I/O context. Signed-off-by: Bart Van Assche <[email protected]> Reviewed-by: Adam Manzanares <[email protected]> Tested-by: Adam Manzanares <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Cc: Matias Bjørling <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2017-04-19block: Export blk_init_request_from_bio()Bart Van Assche1-0/+1
Export this function such that it becomes available to block drivers. Signed-off-by: Bart Van Assche <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Cc: Matias Bjørling <[email protected]> Cc: Adam Manzanares <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2017-04-19pmem: add dax_operations supportDan Williams1-0/+6
Setup a dax_device to have the same lifetime as the pmem block device and add a ->direct_access() method that is equivalent to pmem_direct_access(). Once fs/dax.c has been converted to use dax_operations the old pmem_direct_access() will be removed. Signed-off-by: Dan Williams <[email protected]>
2017-04-19dax: introduce dax_operationsDan Williams1-0/+10
Track a set of dax_operations per dax_device that can be set at alloc_dax() time. These operations will be used to stop the abuse of block_device_operations for communicating dax capabilities to filesystems. It will also be used to replace the "pmem api" and move pmem-specific cache maintenance, and other dax-driver-specific filesystem-dax operations, to dax device methods. In particular this allows us to stop abusing __copy_user_nocache(), via memcpy_to_pmem(), with a driver specific replacement. This is a standalone introduction of the operations. Follow on patches convert each dax-driver and teach fs/dax.c to use ->direct_access() from dax_operations instead of block_device_operations. Suggested-by: Christoph Hellwig <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2017-04-19dax: add a facility to lookup a dax device by 'host' device nameDan Williams1-0/+1
For the current block_device based filesystem-dax path, we need a way for it to lookup the dax_device associated with a block_device. Add a 'host' property of a dax_device that can be used for this purpose. It is a free form string, but for a dax_device associated with a block device it is the bdev name. This is a stop-gap until filesystems are able to mount on a dax-inode directly. Signed-off-by: Dan Williams <[email protected]>
2017-04-19ACPI / utils: Add new acpi_dev_present helperHans de Goede1-0/+5
acpi_dev_found just iterates over all ACPI-ids and sees if one matches. This means that it will return true for devices which are in the DSDT but disabled (their _STA method returns 0). For some drivers it is useful to be able to check if a certain HID is not only present in the namespace, but also actually present as in acpi_device_is_present() will return true for the device. For example because if a certain device is present then the driver will want to use an extcon or IIO ADC channel provided by that device. This commit adds a new acpi_dev_present helper which drivers can use to this end. Like acpi_dev_found, acpi_dev_present take a HID as argument, but it also has 2 extra optional arguments to only check for an ACPI device with a specific UID and/or HRV value. This makes it more generic and allows it to replace custom code doing similar checks in several places. Arguably acpi_dev_present is what acpi_dev_found should have been, but there are too many users to just change acpi_dev_found without the risk of breaking something. Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Lukas Wunner <[email protected]> Reviewed-by: Mika Westerberg <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2017-04-19linux/io.h: Add pci_remap_cfgspace() interfaceLorenzo Pieralisi1-0/+21
The PCI specifications (Rev 3.0, 3.2.5 "Transaction Ordering and Posting") mandate non-posted configuration transactions. As further highlighted in the PCIe specifications (4.0 - Rev0.3, "Ordering Considerations for the Enhanced Configuration Access Mechanism"), through ECAM and ECAM-derivative configuration mechanism, the memory mapped transactions from the host CPU into Configuration Requests on the PCI express fabric may create ordering problems for software because writes to memory address are typically posted transactions (unless the architecture can enforce through virtual address mapping non-posted write transactions behaviour) but writes to Configuration Space are not posted on the PCI express fabric. Current DT and ACPI host bridge controllers map PCI configuration space (ECAM and ECAM-derivative) into the virtual address space through ioremap() calls, that are non-cacheable device accesses on most architectures, but may provide "bufferable" or "posted" write semantics in architecture like eg ARM/ARM64 that allow ioremap'ed regions writes to be buffered in the bus connecting the host CPU to the PCI fabric; this behaviour, as underlined in the PCIe specifications, may trigger transactions ordering rules and must be prevented. Introduce a new generic and explicit API to create a memory mapping for ECAM and ECAM-derivative config space area that defaults to ioremap_nocache() (which should provide a sane default behaviour) but still allowing architectures on which ioremap_nocache() results in posted write transactions to override the function call with an arch specific implementation that complies with the PCI specifications for configuration transactions. [bhelgaas: fold in #ifdef CONFIG_PCI wrapper] Signed-off-by: Lorenzo Pieralisi <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Will Deacon <[email protected]> Cc: Russell King <[email protected]> Cc: Catalin Marinas <[email protected]>
2017-04-19mtd: use dev_of_node helper in mtd_get_of_nodeRafał Miłecki1-1/+1
This allows better compile-time optimizations with CONFIG_OF disabled. Signed-off-by: Rafał Miłecki <[email protected]> Acked-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2017-04-19leds: pca9532: Extend pca9532 device tree supportFelix Brack1-2/+2
This patch extends the device tree support for the pca9532 by adding the leds 'default-state' property. Signed-off-by: Felix Brack <[email protected]> Signed-off-by: Jacek Anaszewski <[email protected]>