Instead of feeding net_secret[] at boot time, defer the init
at the point first socket is created.
This permits some platforms to use better entropy sources than
the ones available at boot time.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
It looks like its possible to open thousands of TCP IPv6
sessions on a server, all landing in a single slot of TCP hash
table. Incoming packets have to lookup sockets in a very
long list.
We should hash all bits from foreign IPv6 addresses, using
a salt and hash mix, not a simple XOR.
inet6_ehashfn() can also separately use the ports, instead
of xoring them.
Reported-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Iliyan Malchev <malchev@google.com>
Conflicts:
include/net/ipv6.h
The secure world requires that the metadata-containing buffer
be strongly ordered. Use the dma_alloc_attrs API to obtain a
strongly ordered region for this purpose.
Bug: 10750953
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
pgprot_stronglyordered sets page attributes to the strongly
ordered memory type. This type is often used for regions of memory which
cannot be speculated into. Strongly ordered memory by itself prevents
speculative data accesses but it will not prevent speculative instruction
accesses. Since strongly ordered memory will never be used for
instructions, set the XN bit as well to prevent speculative instruction
fethces.
Bug: 10750953
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
The push_object function that saves an IB in snapshot expects the size
of the IB in dwords. The byte-size of IB2 was passed to this function
instead of dwords. Fix this.
Change-Id: I7619696246129da2037338eec1325b80f0c4f321
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
We don't want to halt the GPU when trying to recover in
production devices. Remove the bit mask that would do that.
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Don't mix the streams of BIT() and set_bit(). When using set_bit(),
just send the bit offset rather than the results of BIT().
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
The driver attempts GPU reset several times if the first attempt
fails. If adreno_start() fails it will clean itself up and turn
off the GPU so there is no reason to call adreno_stop again. In
fact, it is dangerous to do so as adreno_stop makes the assumption
that the GPU is on.
Change-Id: Ic0dedbad00aad38bad6b532f1a3266e0cad22352
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
If kgsl_setup_ion() fails for whatever reason entry->priv_data may
either be NULL or pointing to freed memory. In either case, this
is a disaster when kgsl_destroy_ion() tries to use the unvalidated
pointer. Check for NULL in kgsl_destroy_ion() and make sure that
the entry->priv_data pointer is cleared on error in kgsl_setup_ion.
Change-Id: Ic0dedbad6a13e2d8e15982144102517bc8f4e2e8
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
drawctxt_active is cleared after the old context is removed
during context switch. Unfortunately, the context restore calls
adreno_use_default_setstate() which always returns true if
drawctxt_active is NULL, effectively always forcing us down the
software path.
Remove the check - adreno_use_default_setstate() already checks to see
if the GPU is idle and that is a more reliable verification that the
software path is worth going down.
Change-Id: Ic0dedbad57d7783bc23dd925a277a63cd2d78a7e
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
The function kgsl_get_device_from_dev() might return NULL, which
was not checked in a few places. Check the return value wherever
it is called.
Change-Id: I764b23a7b13acd692ce0e1bf4bd040c7e180c7d8
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
irq_last is a flag to indicate kgsl should busy wait in an
attempt to NAP because the GPU is likely done with its last
batch of processing.
The setting and clearing of the irq_last variable was removed
with the dispatcher. Although there are no visable instances
of trouble getting to NAP in current builds, re-add the functionality
until it can be fully replaced.
Change-Id: I8b4d2b72aec8948919fbeed9939684a09cb4f7f9
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
Return -ENOTTY Instead of returning -EINVAL for depcreated
legacy waittimestamp so the userspace caller understands that
the functionality no longer exists.
Change-Id: Ic0dedbad49faf4b85d7a2939ba83169ededc9eff
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Device log levels should be initialized during device initialization,
removing this from debugfs init because customer could disable
debugfs.
Change-Id: Ie1222be1d421405e0d7481c799045cb9876c2a91
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
VBIF, VBIF power and power performance counters are special case
counters that are stopped by using a different set of registers.
Handle the case to read these counters in separate functions.
Change-Id: Ia89ba44d1031496ac7742b435c28ea2f3b2177fa
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Restructure the performance counter mechanism by combining the two
structures declared for it. The 2 structures can only refer to a
single counter hence it is easier to manage by having them
under a single structure.
Change-Id: I19d13cf5aa619b85a332b383b464c2af65ad38c9
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Rather than just storing if the performance counter was referenced by the
kernel in a flag, keep track of user space and kernel space references
seperately. This allows finer grained manipulations on the performance
counters (ie when allowed to be released). This is needed to be able to
turn off certain performance counters when fault tolerance is disabled
at runtime.
Change-Id: I7b5593459e64557dabd594aeb6532a0c9af6a9c5
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Add VBIF register programming for a420 core during start up of
this device.
Change-Id: I1bd79f72dabdc8c4e9403bb2788b3ea53d8ba04c
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
When CFF is enabled active count on device was held which prevented
device from clocking off. This was done because simulator could not
handle device restarts. Instead of fixing this problem here the
post processing script can be modified to discard CFF data before
every starting opcode of CFF. Hence, there is no longer a requirement
to hold active count during CFF.
Change-Id: I7c23f90f2fe0deb8cfba10a067765a54c305bcef
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
When adreno_convertaddr is called the memory searched in this function
may have a memory entry associated with it if this allocation belongs
to user space. A reference to this memory entry is taken when
this function is called which should be returned when the caller is
done using the memory. Made changes to return a reference to the
entry when calling this function which is returned when caller is
done using the memory.
Change-Id: I610553fd4b119d3c47cbfcec970d50046dbb2863
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
CFF capture runs on virtual platforms that cannot access address
beyond a certain range. Set the address ranges during CFF capture
to keep the addresses within that limit.
Change-Id: I6aaabe23af8e212e34738fe7e2dceb619a957118
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Unmap memory from kernel space after it is used in CFF capture
function. The kernel mapping is not used frequently and code
sections that use it will always remap it in kernel.
Change-Id: I7909f11de928b5a5c881a3e693fb54aecd681bd3
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Support for A4XX GPU family. A4xx shares a lot of code with
A3xx, reuse the common functions whenever possible.
Change-Id: If10eac6ad71c92bf699a8874c1f189afc74db914
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
On some targets (A330v2) the hardware is in a wonky state following
a power collapse. Send a special command buffer before the first
submission to put everything back in place.
Change-Id: Ic0dedbadb8e676677b9db95defd53f7bd3fba338
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Queue a work item after taking snapshot. The work item saves
the data placed in frozen objects into a separate allocated memory.
The data in frozen objects can change after snapshot is taken and
before the snapshot is dumped or pulled from the system. This work
item in between helps in getting the actual data in the objects by
saving the data in memory. Data can change in the time the work item
executes and snapshot is taken but this time gap is much smaller
compared to snapshot being pulled and snapshot being taken so it
avoids incorrect data in most known cases.
Change-Id: I77d065a5f50517440fd249101b9f0f764125bfdd
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Add generic IB parser to parse adreno IB's and find the objects
that are required to execute the IB. This generic parser can
be used from snapshot and other places like CFF to get the
list of objects that are required for an IB to execute
Use the generic parser from snapshot to find the objects in IB's that
need to be dumped during snapshot and implement IB object list in
snapshot so that the amount of time to take snapshot does not increase.
Change-Id: I7c1383392d04387027afe95aba9a94d0347c8f99
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
After context has detached wake up threads that might be
waiting to submit commands for the detached context.
Change-Id: I16eca443354bc5f77a2d26ef4759d0a41014250e
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
It has been observed that if hard reset is tried again after failure
then it succeeds, so add a loop to retry hard reset a few times
before considering it a failure.
Change-Id: I46dd8a420d5fd49941d096168aafd2eab693bebb
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Skip IBs of only faulting context in fault handler instead
of skipping all the IBs that have the same address as the
faulting IB.
Change-Id: Ie25a6b2bb38cdb09312e5f7f5f358dba2f3a0e18
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Do not call the dispatcher fault handler if it has already been
called in the dispatcher work function. This can cause a cmdbatch
to be processed twice in dispatcher if a false fault occurs and
will run the policy on cmdbatch twice without letting the first
policy retire the cmdbatch.
Change-Id: Ie67852a2a63db1c6180f6ec2c1c968f1d416462f
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
On IOMMU pagefault the FSR is not cleared until the IOMMU
is reset and re-attached to the GPU device. Until FSR clears
the system will keep generating fault interrupts. Clear the
FSR when iommu is stopped in kgsl driver to prevent system
from generating additional fault interrupts for the same
fault until the IOMMU is re-attached
Change-Id: Ia56bbd1245a84a001ec8464f73cfedf2a2d312c2
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Set the fault bit before printing pagefault messages so that
if dispatcher runs while pagefault messages are being printed
the dispatcher can handle the fault and not wait until
pagefault messages have printed which can take a long time
in certain cases.
Change-Id: I3ac84def6ce0bfae688cccc3786b62e4097fa52c
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Fix issue:
1. Improve stability of two finger co-axis.
2. Ghost point problem of two fingers.
Bug: 10497139
Change-Id: I92a1cc01509a4dc37836e1dda5c52b0e0a082c7e
Signed-off-by: Mars_Kao <mars_kao@asus.com>
A race condition exists where the last retired timestamp may change
while processing the dispatcher work queue. If the next command is
a sync event that has not yet signaled a deadlock may occur.
Change-Id: I1113f2e60b8adeade65d6d979777a0aa276a172b
Signed-off-by: Jeff Boody <jboody@codeaurora.org>
A rare condition exists where the GPU is idle when a new event
is added. In this situation a GPU interrupt will not be
generated to trigger event processing. This condition can lead
to a deadlock and fence timeout.
Change-Id: I35601be2414930688901baec50a472346801eef7
Signed-off-by: Jeff Boody <jboody@codeaurora.org>
git://codeaurora.org/external/wlan/prima.git
b1d7f6b wlan : Revision 3.2.3.5
645ec74 wlan: Fix for "crash in pMac->cfg.gCfgEntry"
2e245b2 wlan: wlan: Change regulatory followed customer request
8e953f1 wlan: Fix the issue with probe req data rate on 5G channels.
1ce9188 wlan : Revision 3.2.3.4
5afb9c9 wlan:Increase CSR_RSN_MAX_AUTH_SUITES to 16
4be8f6a wlan : Revision 3.2.3.3
c3fc2f9 wlan: Update value of WLAN_HAL_PNO_MAX_NETW_CHANNELS
2cdd9a2 wlan: Fix invalid channel issue for p2p due to 11d change
c44b861 Fix for making TDLS max peer count independent of IBSS
d745d66 wlan: Fix for the assert in hdd_rx_packet_cbk
dcc4602 Wlan: Fix for device not entering into BMPS mode
29796b4 wlan: remove duplicate IF condition variable checks
a1f061f wlan: Fix for spectrum management bit in AddBss for SM disabled AP
972c1c0 wlan: DTIM3 changed to DTIM1 after roaming
6a4d0ed Wlan: Enable/Disable dynamic split scan
aa35216 wlan: Add more debug log for NS offload feature
35938f3 wlan: restore filter setting on resume
ad2ed83 wlan: Enable WLAN_NS_OFFLOAD feature flag in Kbuild
400721c wlan: Add NSOffload INI Param and issue NSOffload request to FW
eb137b7 wlan: Host Offload Cleanup
7229c34 wlan: MC/BC Filter cleanup
Signed-off-by: Iliyan Malchev <malchev@google.com>
Move validation of user supplied group id's after they've been copied
to kernel memory with copy_from_user.
Change-Id: Idce2b8df6faf018c3d2e41f3c3057d07b4e11535
Signed-off-by: Harsh Vardhan Dwivedi <hdwivedi@codeaurora.org>
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
KGSL does alignments for all user memory requests. If the
requests is large enough the alignment operation will overflow
resulting in a valid request of size 0. It's just a matter of
time until the kernel or user tries to then do something useful
with this buffer resulting in a hang. Perform a sanity check
after doing the alignments to ensure the overflow did not occur.
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Use the right length of allocation from the aligned base address of
CPU virtual map to look for collision in the GPU vitual map. This
prevents discarding of usable address ranges due to false collision
hits.
CRs-Fixed: 492041
Change-Id: I370e6a31f98803e8ca6858a5562f47afeeaa157e
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Improve the debug information printed for kgsl points and timelines.
kgsl_sync_pt_value_str:
- show timestamp passed to kgsl_add_fence_event()
kgsl_sync_timeline_value_str:
- show most recent timestamp passed to kgsl_sync_timeline_signal()
- show last retired timestamp according to kgsl_sync_get_timestamp()
Change-Id: I93fe408b06de054b11e05784cd7175ed3fcb76ad
Git-commit: 595e213985f63d6aa484c966a4f4a710b31ca209
Git-repo: https://www.codeaurora.org/gitweb/quic/la/?p=kernel/msm.git
Signed-off-by: Fred Fettinger <fred.fettinger@motorola.com>
Signed-off-by: Harsh Vardhan Dwivedi <hdwivedi@codeaurora.org>
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
On IOMMU fault it's more stable to reset the IOMMU
unit along with GPU.
Change-Id: I569e3e6fd13d75f3c5401ed0c48220de02618fd6
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
When IOMMU fault happens then set a fault bit defined
for it to handle it as a soft fault case instead of a hard
fault. This is required because a different fault can trigger
due to a page fault since we stall the gpu. If that happens the
other fault handler will run and handle the fault after which
we may end up in fault handler again trying to handle a false
IOMMU fault this time around. Since, its a false fault now we do
not want the command to be skipped which a hard fault enforces
and if we are in a true IOMMU fault then the command will be
skipped anyway since we check of a pagefault specifically in
the context.
Change-Id: Ib8e02190aeee911f9ce892b683e756528e5f8865
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Do not overwrite the fault in dispatcher but add
the fault type and let the fault handler decide how
to deal in multiple faults. And after fault handling
there is a possibility that the fault bit will still
be set if the fault timer fires when fault handler
is running. Ignore that fault by clearing fault bit
after reset in fault handler.
Change-Id: I7b240fb55378cb30092a93adf7feca20eaca7568
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
When an IOMMU fault occurs the fault is cleared in a
queued work item. Until the queued item runs the system
will report the same fault over and over again. Ignore
these faults until the original fault is cleared in the
queued work item.
Change-Id: I96a63ab8f568a874f25da0c56d1e3d8cf7e73e6c
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Clear the dispatcher fault bit if inflight commands are 0 and ensure
that the fault routine is called every time dispatcher is scheduled.
On a false hang detect there was a case when dispatcher fault routine
did not get called, this caused the dispatcher to stop issueing commands
to hardware, fix this by ensuring that fault routine is run every
time dispatcher is scheduled.
Change-Id: Ia36870e279f00630e0c79624437b0eaabb3d634c
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
If cmdbatch does not get re-queued in context list then
destroy it.
Change-Id: If2ba7f029887bdb04bb3d90b470ee4108ff71c24
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>