aboutsummaryrefslogtreecommitdiff
path: root/include/linux
AgeCommit message (Collapse)AuthorFilesLines
2019-07-31docs: thermal: add it to the driver APIMauro Carvalho Chehab1-2/+2
The file contents mostly describes driver internals. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]>
2019-07-31locking/spinlocks: Use CONFIG_PREEMPTIONThomas Gleixner2-2/+2
CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Adjust the comments in the locking code. Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Masami Hiramatsu <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Steven Rostedt <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2019-07-31rcu: Use CONFIG_PREEMPTIONThomas Gleixner3-3/+3
CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the conditionals in RCU to use CONFIG_PREEMPTION. That's the first step towards RCU on RT. The further tweaks are work in progress. This neither touches the selftest bits which need a closer look by Paul. Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Masami Hiramatsu <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Steven Rostedt <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2019-07-31sched/preempt: Use CONFIG_PREEMPTION where appropriateThomas Gleixner2-6/+6
CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the preemption code, scheduler and init task over to use CONFIG_PREEMPTION. That's the first step towards RT in that area. The more complex changes are coming separately. Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Masami Hiramatsu <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Steven Rostedt <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2019-07-31Merge tag 'mac80211-next-for-davem-2019-07-31' of ↵David S. Miller1-2/+61
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== We have a reasonably large number of changes: * lots more HE (802.11ax) support, particularly things relevant for the the AP side, but also mesh support * debugfs cleanups from Greg * some more work on extended key ID * start using genl parallel_ops, as preparation for weaning ourselves off RTNL and getting parallelism * various other changes all over ==================== Signed-off-by: David S. Miller <[email protected]>
2019-07-31cpuidle: header file stubs must be "static inline"Stephen Rothwell1-1/+1
An x86_64 allmodconfig build produces these errors: x86_64-linux-gnu-ld: kernel/sched/core.o: in function `cpuidle_poll_time': core.c:(.text+0x230): multiple definition of `cpuidle_poll_time'; arch/x86/= kernel/process.o:process.c:(.text+0xc0): first defined here (and more) Fixes: 259231a04561 ("cpuidle: add poll_limit_ns to cpuidle_device structure") Signed-off-by: Stephen Rothwell <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2019-07-31gpiolib-acpi: Move acpi_dev_add_driver_gpios() et al to consumer.hAndy Shevchenko2-51/+57
The API, which belongs to GPIO library, is foreign to ACPI headers. Earlier we moved out I²C out of the latter, and now it's time for acpi_dev_add_driver_gpios() et al. For time being the acpi_gpio_get_irq_resource() and acpi_dev_gpio_irq_get() are left untouched as they need more thought about. Note, it requires uninline acpi_dev_remove_driver_gpios() to keep purity of consumer.h. Cc: Pierre-Louis Bossart <[email protected]> Cc: Liam Girdwood <[email protected]> Cc: Jie Yang <[email protected]> Cc: Mark Brown <[email protected]> Cc: [email protected] (moderated list:INTEL ASoC DRIVERS) Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
2019-07-31gpiolib: of: Reshuffle contents of consumer.h for new library layoutAndy Shevchenko1-30/+48
Kernel build bot reported a compilation error after the commit f626d6dfb709 ("gpio: of: Break out OF-only code"): drivers/gpio/gpiolib-devres.o: In function `devm_gpiod_get_from_of_node': gpiolib-devres.c:(.text+0x19a): undefined reference to `gpiod_get_from_of_node' This happens due to move the latter under umbrella of CONFIG_OF_GPIO while customer.h contains staled data. Fix it by reshuffling contents of consumer.h to satisfy build dependencies. Reported-by: kbuild test robot <[email protected]> Fixes: f626d6dfb709 ("gpio: of: Break out OF-only code"): Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
2019-07-30vsock/virtio: fix locking in virtio_transport_inc_tx_pkt()Stefano Garzarella1-1/+1
fwd_cnt and last_fwd_cnt are protected by rx_lock, so we should use the same spinlock also if we are in the TX path. Move also buf_alloc under the same lock. Signed-off-by: Stefano Garzarella <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-07-30vsock/virtio: reduce credit update messagesStefano Garzarella1-0/+1
In order to reduce the number of credit update messages, we send them only when the space available seen by the transmitter is less than VIRTIO_VSOCK_MAX_PKT_BUF_SIZE. Signed-off-by: Stefano Garzarella <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-07-30vsock/virtio: limit the memory used per-socketStefano Garzarella1-0/+1
Since virtio-vsock was introduced, the buffers filled by the host and pushed to the guest using the vring, are directly queued in a per-socket list. These buffers are preallocated by the guest with a fixed size (4 KB). The maximum amount of memory used by each socket should be controlled by the credit mechanism. The default credit available per-socket is 256 KB, but if we use only 1 byte per packet, the guest can queue up to 262144 of 4 KB buffers, using up to 1 GB of memory per-socket. In addition, the guest will continue to fill the vring with new 4 KB free buffers to avoid starvation of other sockets. This patch mitigates this issue copying the payload of small packets (< 128 bytes) into the buffer of last packet queued, in order to avoid wasting memory. Signed-off-by: Stefano Garzarella <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-07-30hrtimer: Remove task argument from hrtimer_init_sleeper()Thomas Gleixner2-3/+2
All callers hand in 'current' and that's the only task pointer which actually makes sense. Remove the task argument and set current in the function. Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Steven Rostedt (VMware) <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
2019-07-30compat_ioctl: pppoe: fix PPPOEIOCSFWD handlingArnd Bergmann1-0/+3
Support for handling the PPPOEIOCSFWD ioctl in compat mode was added in linux-2.5.69 along with hundreds of other commands, but was always broken sincen only the structure is compatible, but the command number is not, due to the size being sizeof(size_t), or at first sizeof(sizeof((struct sockaddr_pppox)), which is different on 64-bit architectures. Guillaume Nault adds: And the implementation was broken until 2016 (see 29e73269aa4d ("pppoe: fix reference counting in PPPoE proxy")), and nobody ever noticed. I should probably have removed this ioctl entirely instead of fixing it. Clearly, it has never been used. Fix it by adding a compat_ioctl handler for all pppoe variants that translates the command number and then calls the regular ioctl function. All other ioctl commands handled by pppoe are compatible between 32-bit and 64-bit, and require compat_ptr() conversion. This should apply to all stable kernels. Acked-by: Guillaume Nault <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-07-30linux: Remove bvec page_offset, use bv_offsetJonathan Lemon2-9/+6
Now that page_offset is referenced through accessors, remove the union, and use bv_offset. Signed-off-by: Jonathan Lemon <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-07-30linux: Add skb_frag_t page_offset accessorsJonathan Lemon1-8/+59
Add skb_frag_off(), skb_frag_off_add(), skb_frag_off_set(), and skb_frag_off_copy() accessors for page_offset. Signed-off-by: Jonathan Lemon <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-07-30Merge tag 'generic_lookup_helpers' into for-nextJacek Anaszewski2-3/+237
Generic Device Lookup Helpers Persistent tag for others to pull this branch from Based on patch series from Suzuki K Poulose <[email protected]> with Subject: [PATCH v3 0/7] drivers: Add generic device lookup helpers Signed-off-by: Greg Kroah-Hartman <[email protected]> * tag 'generic_lookup_helpers': platform: Add platform_find_device_by_driver() helper drivers: Add generic helper to match any device drivers: Introduce device lookup variants by ACPI_COMPANION device drivers: Introduce device lookup variants by device type drivers: Introduce device lookup variants by fwnode drivers: Introduce device lookup variants by of_node drivers: Introduce device lookup variants by name
2019-07-30Merge tag 'for-linus-hmm' of ↵Linus Torvalds1-54/+0
git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull HMM fixes from Jason Gunthorpe: "Fix the locking around nouveau's use of the hmm_range_* APIs. It works correctly in the success case, but many of the the edge cases have missing unlocks or double unlocks. The diffstat is a bit big as Christoph did a comprehensive job to move the obsolete API from the core header and into the driver before fixing its flow, but the risk of regression from this code motion is low" * tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: nouveau: unlock mmap_sem on all errors from nouveau_range_fault nouveau: remove the block parameter to nouveau_range_fault mm/hmm: move hmm_vma_range_done and hmm_vma_fault to nouveau mm/hmm: always return EBUSY for invalid ranges in hmm_range_{fault,snapshot}
2019-07-30loop: Fix mount(2) failure due to race with LOOP_SET_FDJan Kara1-0/+6
Commit 33ec3e53e7b1 ("loop: Don't change loop device under exclusive opener") made LOOP_SET_FD ioctl acquire exclusive block device reference while it updates loop device binding. However this can make perfectly valid mount(2) fail with EBUSY due to racing LOOP_SET_FD holding temporarily the exclusive bdev reference in cases like this: for i in {a..z}{a..z}; do dd if=/dev/zero of=$i.image bs=1k count=0 seek=1024 mkfs.ext2 $i.image mkdir mnt$i done echo "Run" for i in {a..z}{a..z}; do mount -o loop -t ext2 $i.image mnt$i & done Fix the problem by not getting full exclusive bdev reference in LOOP_SET_FD but instead just mark the bdev as being claimed while we update the binding information. This just blocks new exclusive openers instead of failing them with EBUSY thus fixing the problem. Fixes: 33ec3e53e7b1 ("loop: Don't change loop device under exclusive opener") Cc: [email protected] Tested-by: Kai-Heng Feng <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-07-30SUNRPC: Track writers of the 'channel' file to improve cache_listeners_existDave Wysochanski1-3/+3
The sunrpc cache interface is susceptible to being fooled by a rogue process just reading a 'channel' file. If this happens the kernel may think a valid daemon exists to service the cache when it does not. For example, the following may fool the kernel: cat /proc/net/rpc/auth.unix.gid/channel Change the tracking of readers to writers when considering whether a listener exists as all valid daemon processes either open a channel file O_RDWR or O_WRONLY. While this does not prevent a rogue process from "stealing" a message from the kernel, it does at least improve the kernels perception of whether a valid process servicing the cache exists. Signed-off-by: Dave Wysochanski <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2019-07-30cpuidle-haltpoll: disable host side polling when kvm virtualizedMarcelo Tosatti1-0/+16
When performing guest side polling, it is not necessary to also perform host side polling. So disable host side polling, via the new MSR interface, when loading cpuidle-haltpoll driver. Signed-off-by: Marcelo Tosatti <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2019-07-30governors: unify last_state_idxMarcelo Tosatti1-0/+1
Since this field is shared by all governors, move it to cpuidle device structure. Signed-off-by: Marcelo Tosatti <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2019-07-30cpuidle: add poll_limit_ns to cpuidle_device structureMarcelo Tosatti1-0/+6
Add a poll_limit_ns variable to cpuidle_device structure. Calculate and configure it in the new cpuidle_poll_time function, in case its zero. Individual governors are allowed to override this value. Signed-off-by: Marcelo Tosatti <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2019-07-30PCI: Make pci_set_of_node(), etc privateKelsey Skunberg1-8/+0
These interfaces: void pci_set_of_node(struct pci_dev *dev); void pci_release_of_node(struct pci_dev *dev); void pci_set_bus_of_node(struct pci_bus *bus); void pci_release_bus_of_node(struct pci_bus *bus); are only used in drivers/pci/ and do not need to be seen by the rest of the kernel. Move them to drivers/pci/pci.h so they're private to the PCI subsystem. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kelsey Skunberg <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2019-07-30PCI: Make pci_enable_ptm() privateKelsey Skunberg1-7/+0
This interface: int pci_enable_ptm(struct pci_dev *dev, u8 *granularity); is only used in drivers/pci/ and does not need to be seen by the rest of the kernel. Move it to drivers/pci/pci.h so it's private to the PCI subsystem. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kelsey Skunberg <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2019-07-30PCI: Make pcie_set_ecrc_checking(), pcie_ecrc_get_policy() privateKelsey Skunberg1-8/+0
These interfaces: void pcie_set_ecrc_checking(struct pci_dev *dev); void pcie_ecrc_get_policy(char *str); are only used in drivers/pci/ and do not need to be seen by the rest of the kernel. Move them to drivers/pci/pci.h so they're private to the PCI subsystem. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kelsey Skunberg <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2019-07-30PCI: Make pci_ats_init() privateKelsey Skunberg1-2/+0
This interface: void pci_ats_init(struct pci_dev *dev); is only used in drivers/pci/ and does not need to be seen by the rest of the kernel. Move it to drivers/pci/pci.h so it's private to the PCI subsystem. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kelsey Skunberg <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2019-07-30PCI: Make pcie_update_link_speed() privateKelsey Skunberg1-1/+0
This interface: void pcie_update_link_speed(struct pci_bus *bus, u16 link_status); is only used in drivers/pci/ and does not need to be seen by the rest of the kernel. Move it to drivers/pci/pci.h so it's private to the PCI subsystem. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kelsey Skunberg <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2019-07-30PCI: Make pci_bus_get(), pci_bus_put() privateKelsey Skunberg1-2/+0
These interfaces: struct pci_bus *pci_bus_get(struct pci_bus *bus); void pci_bus_put(struct pci_bus *bus); are only used in drivers/pci/ and do not need to be seen by the rest of the kernel. Move them to drivers/pci/pci.h so they're private to the PCI subsystem. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kelsey Skunberg <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2019-07-30PCI: Make pci_hotplug_io_size, mem_size, and bus_size privateKelsey Skunberg1-4/+0
These symbols: extern unsigned long pci_hotplug_io_size; extern unsigned long pci_hotplug_mem_size; extern unsigned long pci_hotplug_bus_size; are only used in drivers/pci/ and do not need to be seen by the rest of the kernel. Move them to drivers/pci/pci.h so they're private to the PCI subsystem. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kelsey Skunberg <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2019-07-30PCI: Make pci_save_vc_state(), pci_restore_vc_state(), etc privateKelsey Skunberg1-5/+0
These Virtual Channel interfaces: int pci_save_vc_state(struct pci_dev *dev); void pci_restore_vc_state(struct pci_dev *dev); void pci_allocate_vc_save_buffers(struct pci_dev *dev); are only used in drivers/pci/ and do not need to be seen by the rest of the kernel. Move them to drivers/pci/pci.h so they're private to the PCI subsystem. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kelsey Skunberg <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2019-07-30PCI: Make pci_get_host_bridge_device(), pci_put_host_bridge_device() privateKelsey Skunberg1-3/+0
These interfaces: struct device *pci_get_host_bridge_device(struct pci_dev *dev); void pci_put_host_bridge_device(struct device *dev); are only used in drivers/pci/ and do not need to be seen by the rest of the kernel. Move them to drivers/pci/pci.h so they're private to the PCI subsystem. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kelsey Skunberg <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2019-07-30PCI: Make pci_check_pme_status(), pci_pme_wakeup_bus() privateKelsey Skunberg1-2/+0
These interfaces: bool pci_check_pme_status(struct pci_dev *dev); void pci_pme_wakeup_bus(struct pci_bus *bus); are only used in drivers/pci/ and do not need to be seen by the rest of the kernel. Move them to drivers/pci/pci.h so they're private to the PCI subsystem. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kelsey Skunberg <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2019-07-30PCI: Make PCI_PM_* delay times privateKelsey Skunberg1-5/+0
These delay time definitions: #define PCI_PM_D2_DELAY 200 #define PCI_PM_D3_WAIT 10 #define PCI_PM_D3COLD_WAIT 100 #define PCI_PM_BUS_WAIT 50 are only used in drivers/pci/ and do not need to be seen by the rest of the kernel. Move them to drivers/pci/pci.h so they're private to the PCI subsystem. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kelsey Skunberg <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2019-07-30Merge branch 'generic_lookup_helpers' into driver-core-nextGreg Kroah-Hartman2-3/+237
This was on a separate branch so that others can pull it in. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-07-30platform/x86: asus-wmi: fix CPU fan control on recent productsDaniel Drake1-0/+1
Previously, asus-wmi was using the AGFN interface and FAN_CTRL device for CPU fan control. However, this code has been found to be not fully working on some recent products, and having checked the spec, these interfaces are marked as being removed from future products currently in development. The replacement appears to be the CPU_FAN device, added in spec version 8.3 (March 2014) and present on many modern Asus laptops. Add support for this device, and use it whenever it is detected. The older approach based on AGFN and FAN_CTRL is used as a fallback on products that do not have such device. Other than switching between automatic and full speed, there is no fan speed control through this new interface. Signed-off-by: Daniel Drake <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2019-07-30platform/x86: asus-wmi: cleanup AGFN fan handlingDaniel Drake1-2/+2
The asus-wmi driver currently uses the "AGFN" interface and the FAN_CTRL device for fan control. According to the spec, this interface is very dated and marked as pending removal from products currently in development. Clean up the way that the AGFN fan is detected and handled, also preparing the driver for the introduction of an alternate fan control method needed to support recent Asus products. Not anticipating further development of this interface, simplify the code by dropping any notion of being able to control multiple AGFN fans (this was already limited to just a single fan through only exposing a single fan in sysfs). Check for the presence of AGFN fans at probe time, simplifying the code flow in asus_hwmon_sysfs_is_visible(). Signed-off-by: Daniel Drake <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2019-07-30platform: Add platform_find_device_by_driver() helperSuzuki K Poulose1-0/+3
Provide a helper to lookup platform devices by matching device driver in order to avoid drivers trying to use platform bus internals. Cc: Eric Anholt <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: "Heiko Stübner" <[email protected]> Cc: Inki Dae <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Sandy Huang <[email protected]> Cc: Seung-Woo Kim <[email protected]> Tested-by: Heiko Stuebner <[email protected]> Signed-off-by: Suzuki K Poulose <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-07-30drivers: Add generic helper to match any deviceSuzuki K Poulose1-0/+17
Add a generic helper to match any/all devices. Using this introduce new wrappers {bus/driver/class}_find_next_device(). Cc: Elie Morisse <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: "Martin K. Petersen" <[email protected]> Cc: Nehal Shah <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Shyam Sundar S K <[email protected]> Signed-off-by: Suzuki K Poulose <[email protected]> Acked-by: Bjorn Helgaas <[email protected]> # PCI Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-07-30drivers: Introduce device lookup variants by ACPI_COMPANION deviceSuzuki K Poulose1-0/+65
Add a generic helper to match a device by the ACPI_COMPANION device and provide wrappers for the device lookup APIs. Cc: Len Brown <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Mika Westerberg <[email protected]> Cc: [email protected] Cc: "Rafael J. Wysocki" <[email protected]> Signed-off-by: Suzuki K Poulose <[email protected]> Acked-by: Mark Brown <[email protected]> Acked-by: Wolfram Sang <[email protected]> # I2C parts Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-07-30drivers: Introduce device lookup variants by device typeSuzuki K Poulose1-0/+37
Add a helper to match a device by its type and provide wrappers for {bus/class/driver}_find_device() APIs. Cc: Alexander Shishkin <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Harald Freudenberger <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: [email protected] Cc: Oliver Neukum <[email protected]> Cc: Sebastian Andrzej Siewior <[email protected]> Cc: Tomas Winkler <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Ulf Hansson <[email protected]> Cc: Joe Perches <[email protected]> Signed-off-by: Suzuki K Poulose <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-07-30drivers: Introduce device lookup variants by fwnodeSuzuki K Poulose1-0/+39
Add a helper to match the firmware node handle of a device and provide wrappers for {bus/class/driver}_find_device() APIs to avoid proliferation of duplicate custom match functions. Cc: "David S. Miller" <[email protected]> Cc: Doug Ledford <[email protected]> Cc: Jason Gunthorpe <[email protected]> Cc: [email protected] Cc: "Rafael J. Wysocki" <[email protected]> Cc: Ulf Hansson <[email protected]> Cc: Joe Perches <[email protected]> Cc: Will Deacon <[email protected]> Cc: Joerg Roedel <[email protected]> Signed-off-by: Suzuki K Poulose <[email protected]> Acked-by: Robin Murphy <[email protected]> Reviewed-by: Mathieu Poirier <[email protected]> Reviewed-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-07-30drivers: Introduce device lookup variants by of_nodeSuzuki K Poulose1-0/+37
Introduce wrappers for {bus/driver/class}_find_device() to locate devices by its of_node. Cc: Maarten Lankhorst <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: [email protected] Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: [email protected] Cc: Florian Fainelli <[email protected]> Cc: Frank Rowand <[email protected]> Cc: Heiko Stuebner <[email protected]> Cc: Liam Girdwood <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Mathieu Poirier <[email protected]> Cc: Rob Herring <[email protected]> Cc: Srinivas Kandagatla <[email protected]> Cc: Takashi Iwai <[email protected]> Cc: Alan Tull <[email protected]> Cc: [email protected] Cc: Peter Rosin <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: Heiner Kallweit <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Andrew Lunn <[email protected]> Cc: Liam Girdwood <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Thor Thayer <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: Andrew Lunn <[email protected]> Cc: Peter Rosin <[email protected]> Signed-off-by: Suzuki K Poulose <[email protected]> Acked-by: Lee Jones <[email protected]> Acked-by: Wolfram Sang <[email protected]> # I2C part Acked-by: Moritz Fischer <[email protected]> # For FPGA part Acked-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-07-30drivers: Introduce device lookup variants by nameSuzuki K Poulose1-3/+39
Add a helper to match the device name for device lookup. Also reuse this generic exported helper for the existing bus_find_device_by_name(). and add similar variants for driver/class. Cc: Alessandro Zummo <[email protected]> Cc: Alexander Aring <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Dan Murphy <[email protected]> Cc: Harald Freudenberger <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Jacek Anaszewski <[email protected]> Cc: Lee Jones <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Maxime Coquelin <[email protected]> Cc: Pavel Machek <[email protected]> Cc: Peter Oberparleiter <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Stefan Schmidt <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Signed-off-by: Suzuki K Poulose <[email protected]> Reviewed-by: Heikki Krogerus <[email protected]> Acked-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-07-30ACPI: PM: Set up EC GPE for system wakeup from drivers that need itRafael J. Wysocki2-0/+5
The EC GPE needs to be set up for system wakeup only if there is a driver depending on it, either intel-hid or intel-vbtn, bound to a button device that is expected to wake up the system from sleep (such as the power button on some Dell systems, like the XPS13 9360). It doesn't need to be set up for waking up the system from sleep in any other cases and whether or not it is expected to wake up the system from sleep doesn't depend on whether or not the LPS0 device is present in the ACPI namespace. For this reason, rearrange the ACPI suspend-to-idle code to make the drivers depending on the EC GPE wakeup take care of setting it up and decouple that from the LPS0 device handling. While at it, make intel-hid and intel-vbtn prepare for system wakeup only if they are allowed to wake up the system from sleep by user space (via sysfs). [Note that acpi_ec_mark_gpe_for_wake() and acpi_ec_set_gpe_wake_mask() are there to prevent the EC GPE from being disabled by the acpi_enable_all_wakeup_gpes() call in acpi_s2idle_prepare(), so on systems with either intel-hid or intel-vbtn this change doesn't affect any interactions with the hardware or platform firmware.] Signed-off-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]>
2019-07-30gpio: remove less important #ifdef around declarationsMasahiro Yamada1-19/+8
The whole struct/function declarations in this header are surrounded by #ifdef. As far as I understood, the motivation of this is probably to break the build earlier if a driver misses to select or depend on correct CONFIG options in Kconfig. Since commit 94bed2a9c4ae ("Add -Werror-implicit-function-declaration") no one cannot call functions that have not been declared. So, I see some benefit in doing this in the cost of uglier headers. In reality, it would not be so easy to catch missed 'select' or 'depends on' because GPIOLIB, GPIOLIB_IRQCHIP etc. are already selected by someone else eventually. So, this kind of error, if any, will be caught by randconfig bots. In summary, I am not a big fan of cluttered #ifdef nesting, and this does not matter for normal developers. The code readability wins. Signed-off-by: Masahiro Yamada <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2019-07-29xdp: Add devmap_hash map type for looking up devices by hashed indexToke Høiland-Jørgensen2-0/+8
A common pattern when using xdp_redirect_map() is to create a device map where the lookup key is simply ifindex. Because device maps are arrays, this leaves holes in the map, and the map has to be sized to fit the largest ifindex, regardless of how many devices actually are actually needed in the map. This patch adds a second type of device map where the key is looked up using a hashmap, instead of being used as an array index. This allows maps to be densely packed, so they can be smaller. Signed-off-by: Toke Høiland-Jørgensen <[email protected]> Acked-by: Yonghong Song <[email protected]> Acked-by: Jesper Dangaard Brouer <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]>
2019-07-29include/bpf.h: Remove map_insert_ctx() stubsToke Høiland-Jørgensen1-10/+0
When we changed the device and CPU maps to use linked lists instead of bitmaps, we also removed the need for the map_insert_ctx() helpers to keep track of the bitmaps inside each map. However, it seems I forgot to remove the function definitions stubs, so remove those here. Signed-off-by: Toke Høiland-Jørgensen <[email protected]> Acked-by: Yonghong Song <[email protected]> Acked-by: Jesper Dangaard Brouer <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]>
2019-07-29leds: netxbig: remove legacy board-file supportMasahiro Yamada1-54/+0
Since commit ebc278f15759 ("ARM: mvebu: remove static LED setup for netxbig boards"), no one in upstream passes in the platform data to this driver. Squash leds-kirkwood-netxbig.h into the driver, and remove the legacy board-file support. Link: https://lkml.org/lkml/2019/7/20/83 Suggested-by: Arnd Bergmann <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]> Signed-off-by: Jacek Anaszewski <[email protected]>
2019-07-29Merge tag 'platform-drivers-x86-v5.3-3' of ↵Linus Torvalds1-0/+1
git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver fixes from Andy Shevchenko: "Business as usual, a few fixes and new IDs: - PC Engines APU got one fix for software dependencies to automatically load them and another fix for mapping of key button in the front to issue restart event. - OLPC driver is now probed automatically based on module device table. - Intel PMC core driver supports Intel Ice Lake NNPI processor. - WMI driver missed description of a new field in the structure that has been added" * tag 'platform-drivers-x86-v5.3-3' of git://git.infradead.org/linux-platform-drivers-x86: platform/x86: pcengines-apuv2: use KEY_RESTART for front button platform/x86: intel_pmc_core: Add ICL-NNPI support to PMC Core Platform: OLPC: add SPI MODULE_DEVICE_TABLE platform/x86: wmi: add missing struct parameter description platform/x86: pcengines-apuv2: Fix softdep statement
2019-07-29iommu/io-pgtable: Pass struct iommu_iotlb_gather to ->tlb_add_page()Will Deacon1-7/+9
With all the pieces in place, we can finally propagate the iommu_iotlb_gather structure from the call to unmap() down to the IOMMU drivers' implementation of ->tlb_add_page(). Currently everybody ignores it, but the machinery is now there to defer invalidation. Signed-off-by: Will Deacon <[email protected]>