10 Feb, 2017
37 commits
-
Previously all data passed over binder needed
to be serialized, with the exception of Binder
objects and file descriptors.This patchs adds support for scatter-gathering raw
memory buffers into a binder transaction, avoiding
the need to first serialize them into a Parcel.To remain backwards compatibile with existing
binder clients, it introduces two new command
ioctls for this purpose - BC_TRANSACTION_SG and
BC_REPLY_SG. These commands may only be used with
the new binder_transaction_data_sg structure,
which adds a field for the total size of the
buffers we are scatter-gathering.Because memory buffers may contain pointers to
other buffers, we allow callers to specify
a parent buffer and an offset into it, to indicate
this is a location pointing to the buffer that
we are fixing up. The kernel will then take care
of fixing up the pointer to that buffer as well.Cc: Greg Kroah-Hartman
Cc: Martijn Coenen
Cc: Arve Hjønnevåg
Cc: Amit Pundir
Cc: Serban Constantinescu
Cc: Dmitry Shmidt
Cc: Rom Lemarchand
Cc: Android Kernel Team
Signed-off-by: Martijn Coenen
[jstultz: Fold in small fix from Amit Pundir ]
Signed-off-by: John Stultz
Signed-off-by: Greg Kroah-Hartman -
The binder_buffer allocator currently only allocates
space for the data and offsets buffers of a Parcel.
This change allows for requesting an additional chunk
of data in the buffer, which can for example be used
to hold additional meta-data about the transaction
(eg a security context).Cc: Greg Kroah-Hartman
Cc: Martijn Coenen
Cc: Arve Hjønnevåg
Cc: Amit Pundir
Cc: Serban Constantinescu
Cc: Dmitry Shmidt
Cc: Rom Lemarchand
Cc: Android Kernel Team
Signed-off-by: Martijn Coenen
Signed-off-by: John Stultz
Signed-off-by: Greg Kroah-Hartman -
Moved handling of fixup for binder objects,
handles and file descriptors into separate
functions.Cc: Greg Kroah-Hartman
Cc: Martijn Coenen
Cc: Arve Hjønnevåg
Cc: Amit Pundir
Cc: Serban Constantinescu
Cc: Dmitry Shmidt
Cc: Rom Lemarchand
Cc: Android Kernel Team
Signed-off-by: Martijn Coenen
Signed-off-by: John Stultz
Signed-off-by: Greg Kroah-Hartman -
Add a new module parameter 'devices', that can be
used to specify the names of the binder device
nodes we want to populate in /dev.Each device node has its own context manager, and
is therefore logically separated from all the other
device nodes.The config option CONFIG_ANDROID_BINDER_DEVICES can
be used to set the default value of the parameter.This approach was favored over using IPC namespaces,
mostly because we require a single process to be a
part of multiple binder contexts, which seemed harder
to achieve with namespaces.Cc: Greg Kroah-Hartman
Cc: Martijn Coenen
Cc: Arve Hjønnevåg
Cc: Amit Pundir
Cc: Serban Constantinescu
Cc: Dmitry Shmidt
Cc: Rom Lemarchand
Cc: Android Kernel Team
Signed-off-by: Martijn Coenen
[jstultz: minor checkpatch warning fix]
Signed-off-by: John Stultz
Signed-off-by: Greg Kroah-Hartman -
Properly print the context in debugfs entries.
Cc: Greg Kroah-Hartman
Cc: Martijn Coenen
Cc: Arve Hjønnevåg
Cc: Amit Pundir
Cc: Serban Constantinescu
Cc: Dmitry Shmidt
Cc: Rom Lemarchand
Cc: Android Kernel Team
Signed-off-by: Martijn Coenen
Signed-off-by: John Stultz
Signed-off-by: Greg Kroah-Hartman -
Move the context manager state into a separate
struct context, and allow for each process to have
its own context associated with it.Cc: Greg Kroah-Hartman
Cc: Martijn Coenen
Cc: Arve Hjønnevåg
Cc: Amit Pundir
Cc: Serban Constantinescu
Cc: Dmitry Shmidt
Cc: Rom Lemarchand
Cc: Android Kernel Team
Signed-off-by: Martijn Coenen
[jstultz: Minor checkpatch fix]
Signed-off-by: John Stultz
Signed-off-by: Greg Kroah-Hartman -
flat_binder_object is used for both handling
binder objects and file descriptors, even though
the two are mostly independent. Since we'll
have more fixup objects in binder in the future,
instead of extending flat_binder_object again,
split out file descriptors to their own object
while retaining backwards compatibility to
existing user-space clients. All binder objects
just share a header.Cc: Greg Kroah-Hartman
Cc: Martijn Coenen
Cc: Arve Hjønnevåg
Cc: Amit Pundir
Cc: Serban Constantinescu
Cc: Dmitry Shmidt
Cc: Rom Lemarchand
Cc: Android Kernel Team
Signed-off-by: Martijn Coenen
Signed-off-by: John Stultz
Signed-off-by: Greg Kroah-Hartman -
There is no need for the driver to use private workqueue, standard system
workqueue should suffice as they are going to use the same worker pool
anyway.Acked-by: Robin van der Gracht
Signed-off-by: Dmitry Torokhov
Signed-off-by: Greg Kroah-Hartman -
This patch fixes following issues in input device (keypad) handling:
- requesting IRQ before allocating and initializing parts of the device
that can be referenced from IRQ handler is racy, even if we try to
disable interrupt after requesting it. Let's move allocations around
so that everything is ready by the time we request IRQ.- using threaded interrupt handler to schedule a work item it sub-optimal.
Disabling and then re-enabling interrupts in work item and in open/close
methods is prone to races and exactly the reason theraded interrupts were
introduced. Let's use the infrastructure properly and keep scanning the
matrix array in IRQ thread, stopping when there are no keys, or when told
to do so.Signed-off-by: Dmitry Torokhov
Tested-by: Robin van der Gracht
Signed-off-by: Greg Kroah-Hartman -
'fbdev' is allocated as part of larger ht16k33_priv structure; trying to
free it will cause troubles.Acked-by: Robin van der Gracht
Signed-off-by: Dmitry Torokhov
Signed-off-by: Greg Kroah-Hartman -
The hypercall page only needs to be executable but currently it is setup to
be writable as well. Fix the issue.Signed-off-by: K. Y. Srinivasan
Cc:
Acked-by: Kees Cook
Reported-by: Stephen Hemminger
Tested-by: Stephen Hemminger
Signed-off-by: Greg Kroah-Hartman -
Since sendpacket no longer uses kickq argument remove it.
Remove it no longer used xmit_more in sendpacket in netvsc as well.Signed-off-by: Stephen Hemminger
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
The explicit signal policy is no longer used. A different mechanism
will be added later when xmit_more is supported.Signed-off-by: Stephen Hemminger
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
The flag to cause notification of host is unused after
commit a01a291a282f7c2e ("Drivers: hv: vmbus: Base host signaling
strictly on the ring state"). Therefore remove it from the ring
buffer internal API.Signed-off-by: Stephen Hemminger
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
Use standard kernel operations for find first set bit to traverse
the channel bit array. This has added benefit of speeding up
lookup on 64 bit and because it uses find first set instruction.Signed-off-by: Stephen Hemminger
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
Fix a typo.
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
With TimeSync version 4 protocol support we started updating system time
continuously through the whole lifetime of Hyper-V guests. Every 5 seconds
there is a time sample from the host which triggers do_settimeofday[64]().
While the time from the host is very accurate such adjustments may cause
issues:
- Time is jumping forward and backward, some applications may misbehave.
- In case an NTP server runs in parallel and uses something else for time
sync (network, PTP,...) system time will never converge.
- Systemd starts annoying you by printing "Time has been changed" every 5
seconds to the system log.Instead of doing in-kernel time adjustments offload the work to an
NTP client by exposing TimeSync messages as a PTP device. Users may now
decide what they want to use as a source.I tested the solution with chrony, the config was:
refclock PHC /dev/ptp0 poll 3 dpoll -2 offset 0
The result I'm seeing is accurate enough, the time delta between the guest
and the host is almost always within [-10us, +10us], the in-kernel solution
was giving us comparable results.I also tried implementing PPS device instead of PTP by using not currently
used Hyper-V synthetic timers (we use only one of four for clockevent) but
with PPS source only chrony wasn't able to give me the required accuracy,
the delta often more that 100us.Signed-off-by: Vitaly Kuznetsov
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
As a preparation to implementing Hyper-V PTP device supporting
.getcrosststamp we need to export a reference to the current Hyper-V
clocksource in use (MSR or TSC page).Signed-off-by: Vitaly Kuznetsov
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
Fix the bug in the generation of the guest ID. Without this fix
the host side telemetry code is broken.Signed-off-by: K. Y. Srinivasan
Fixes: 352c9624242d ("Drivers: hv: vmbus: Move the definition of generate_guest_id()")
Signed-off-by: Greg Kroah-Hartman -
Currently the periodic scan timer is used for three purposes,
entangling keypad and display handling, which are both optional:
1. Scanning the keypad,
2. Flashing the backlight when a key is pressed,
3. Disabling temporary backlighting after a fixed period of time.Abstract the second purpose using a new lcd_poke() function.
Make the non-periodic temporary backlight handling independent from
keypad handling by converting it to a delayed workqueue.Signed-off-by: Geert Uytterhoeven
Signed-off-by: Greg Kroah-Hartman -
Add a helper function to move the cursor to the home position, so
callers no longer need access to internal state.Signed-off-by: Geert Uytterhoeven
Signed-off-by: Greg Kroah-Hartman -
panel_detach() already verified that pptr is a valid pointer.
Signed-off-by: Geert Uytterhoeven
Signed-off-by: Greg Kroah-Hartman -
All 18 suboptions related to the panel driver have individual
dependencies on PANEL.Replace them by a single "if PANEL / endif # PANEL" section for easier
dependency management.Signed-off-by: Geert Uytterhoeven
Signed-off-by: Greg Kroah-Hartman -
As of commit 7c5763b8453a9487 ("drivers: misc: Remove MISC_DEVICES
config option"), misc device support no longer needs to be enabled
manually.Signed-off-by: Geert Uytterhoeven
Signed-off-by: Greg Kroah-Hartman -
These definitions were never used in any publicly available version
since (at least) 2004.Signed-off-by: Geert Uytterhoeven
Signed-off-by: Greg Kroah-Hartman -
Hardcoded driver versions are so pre-git.
Signed-off-by: Geert Uytterhoeven
Signed-off-by: Greg Kroah-Hartman -
LCD_FLAG_F is the font flag, LCD_FLAG_N is the two-lines flag.
Signed-off-by: Geert Uytterhoeven
Signed-off-by: Greg Kroah-Hartman -
module_w1_family() makes the code simpler by eliminating
boilerplate code.Signed-off-by: Wei Yongjun
Acked-by: Maciej S. Szmigiero
Signed-off-by: Greg Kroah-Hartman -
Use kmemdup rather than duplicating its implementation.
Generated by: scripts/coccinelle/api/memdup.cocci
Signed-off-by: Wei Yongjun
Acked-by: Maciej S. Szmigiero
Signed-off-by: Greg Kroah-Hartman -
This allows the driver to avoid a high order coherent DMA allocation
and memory copy. With this patch it can DMA directly from the kernel
pages that the bitfile is stored in.Since this is now a gather DMA operation the driver uses the ISR
to feed the chips DMA queue with each entry from the SGL.Signed-off-by: Jason Gunthorpe
Acked-by: Moritz Fischer
Signed-off-by: Greg Kroah-Hartman -
Requiring contiguous kernel memory is not a good idea, this is a limited
resource and allocation can fail under normal work loads.This introduces a .write_sg op that supporting drivers can provide
to DMA directly from dis-contiguous memory and a new entry point
fpga_mgr_buf_load_sg that users can call to directly provide page
lists.The full matrix of compatibility is provided, either the linear or sg
interface can be used by the user with a driver supporting either
interface.A notable change for drivers is that the .write op can now be called
multiple times.Signed-off-by: Jason Gunthorpe
Acked-by: Alan Tull
Acked-by: Moritz Fischer
Signed-off-by: Greg Kroah-Hartman -
There is no sense in sending a bitstream we know will not work, and
with the variety of options for bitstream generation in Xilinx tools
it is not terribly clear what the correct input should be.This is particularly important for Zynq since auto-correction was
removed from the driver and the Zynq hardware only accepts a bitstream
format that is different from what the Xilinx tools typically produce.Worse, the hardware provides no indication why the bitstream fails,
it simply times out if the input is wrong.The best option here is to have the kernel print a message informing
the user they are using a malformed bistream and programming failure
isn't for any of the myriad of other reasons.Signed-off-by: Jason Gunthorpe
Acked-by: Moritz Fischer
Acked-by: Alan Tull
Signed-off-by: Greg Kroah-Hartman -
The completion did not check the interrupt status to see if any error
bits were asserted, check error bits and dump some registers if things
went wrong.A few fixes are needed to make this work, the IXR_ERROR_FLAGS_MASK was
wrong, it included the done bits, which shows a bug in mask/unmask_irqs
which were using the wrong bits, simplify all of this stuff.Signed-off-by: Jason Gunthorpe
Reviewed-by: Moritz Fischer
Acked-by: Alan Tull
Signed-off-by: Greg Kroah-Hartman -
Parallel reads from multiple threads on a file descriptor
are not well defined and racy. It is safer to return to original
behavior and simply fail the additional read.
The solution is to remove request for next read credit.Cc: #4.9
Fixes: ff1586a7ea57 ("mei: enqueue consecutive reads")
Signed-off-by: Alexander Usyskin
Signed-off-by: Tomas Winkler
Signed-off-by: Greg Kroah-Hartman -
Driver bind to devices based on the engine types & (optional) versions.
Signed-off-by: Jeremy Kerr
Signed-off-by: Chris Bostic
Signed-off-by: Greg Kroah-Hartman -
Add structs for fsi devices & drivers, and struct device conversion
functions.Signed-off-by: Jeremy Kerr
Signed-off-by: Chris Bostic
Signed-off-by: Greg Kroah-Hartman -
This change adds the initial (empty) fsi bus definition, and introduces
drivers/fsi/.Signed-off-by: Jeremy Kerr
Signed-off-by: Chris Bostic
Signed-off-by: Greg Kroah-Hartman
06 Feb, 2017
2 commits
-
We want the hv and other fixes in here as well to handle merge and
testing issues.Signed-off-by: Greg Kroah-Hartman
05 Feb, 2017
1 commit
-
Pull irq fixes from Thomas Gleixner:
- Prevent double activation of interrupt lines, which causes problems
on certain interrupt controllers- Handle the fallout of the above because x86 (ab)uses the activation
function to reconfigure interrupts under the hood.* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/irq: Make irq activate operations symmetric
irqdomain: Avoid activating interrupts more than once