Commit graph

443567 commits

Author SHA1 Message Date
Yuanyuan Zhong b4c98bc799 arm64: strcmp: align to 64B cache line
Align strcmp to 64B. This will ensure the preformance critical
loop is within one 64B cache line.

Change-Id: I9240fbb4407637b2290a44e02ad59098a377b356
Signed-off-by: Yuanyuan Zhong <zyy@motorola.com>
Reviewed-on: https://gerrit.mot.com/902536
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Yi-Wei Zhao <gbjc64@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
2017-04-18 12:17:54 +02:00
Hong-Mei Li 5cb8aed1c3 arm64: lib: memory utilities optimization
Optimize memcpy and memmove, to prefetch several cache lines.
We can achieve 15% memcpy speed improvement with the preload method.

Change-Id: I2259b98a33eba0b7466920b3f270f953e609cf13
Signed-off-by: Hong-Mei Li <a21834@motorola.com>
Reviewed-on: http://gerrit.mot.com/740766
SLTApproved: Slta Waiver <sltawvr@motorola.com>
SME-Granted: SME Approvals Granted
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Zhi-Ming Yuan <a14194@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
2017-04-18 12:17:48 +02:00
Will Deacon c182462032 arm64: lib: improve copy_page to deal with 128 bytes at a time
We want to avoid lots of different copy_page implementations, settling
for something that is "good enough" everywhere and hopefully easy to
understand and maintain whilst we're at it.

This patch reworks our copy_page implementation based on discussions
with Cavium on the list and benchmarking on Cortex-A processors so that:

  - The loop is unrolled to copy 128 bytes per iteration

  - The reads are offset so that we read from the next 128-byte block
    in the same iteration that we store the previous block

  - Explicit prefetch instructions are removed for now, since they hurt
    performance on CPUs with hardware prefetching

  - The loop exit condition is calculated at the start of the loop

Change-Id: I0d9f3bbe4efa2751f41432a3b4b299fbb0e494be
Signed-off-by: Will Deacon <will.deacon@arm.com>
Tested-by: Andrew Pinski <apinski@cavium.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-04-18 12:17:45 +02:00
Will Deacon 59180ec546 arm64: lib: use pair accessors for copy_*_user routines
commit 23e94994464a7281838785675e09c8ed1055f62f upstream.

The AArch64 instruction set contains load/store pair memory accessors,
so use these in our copy_*_user routines to transfer 16 bytes per
iteration.

Change-Id: Ie9874b067ff7450a40b29a760f0c6e742f750adc
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: David Brown <david.brown@linaro.org>
2017-04-18 12:17:42 +02:00
Eric Dumazet 260634a3a6 tcp_cubic: do not set epoch_start in the future
Tracking idle time in bictcp_cwnd_event() is imprecise, as epoch_start
is normally set at ACK processing time, not at send time.

Doing a proper fix would need to add an additional state variable,
and does not seem worth the trouble, given CUBIC bug has been there
forever before Jana noticed it.

Let's simply not set epoch_start in the future, otherwise
bictcp_update() could overflow and CUBIC would again
grow cwnd too fast.

This was detected thanks to a packetdrill test Neal wrote that was flaky
before applying this fix.

Change-Id: Ifd1e4be175824a31619ff4c1dc973f82346b799d
Fixes: 30927520dbae ("tcp_cubic: better follow cubic curve after idle period")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Cc: Jana Iyengar <jri@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-04-18 12:17:39 +02:00
Eric Dumazet 859bef1ae4 tcp_cubic: better follow cubic curve after idle period
Jana Iyengar found an interesting issue on CUBIC :

The epoch is only updated/reset initially and when experiencing losses.
The delta "t" of now - epoch_start can be arbitrary large after app idle
as well as the bic_target. Consequentially the slope (inverse of
ca->cnt) would be really large, and eventually ca->cnt would be
lower-bounded in the end to 2 to have delayed-ACK slow-start behavior.

This particularly shows up when slow_start_after_idle is disabled
as a dangerous cwnd inflation (1.5 x RTT) after few seconds of idle
time.

Jana initial fix was to reset epoch_start if app limited,
but Neal pointed out it would ask the CUBIC algorithm to recalculate the
curve so that we again start growing steeply upward from where cwnd is
now (as CUBIC does just after a loss). Ideally we'd want the cwnd growth
curve to be the same shape, just shifted later in time by the amount of
the idle period.

Change-Id: I5a6b57d38d85c1e685835061888e719d240350dc
Reported-by: Jana Iyengar <jri@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: Sangtae Ha <sangtae.ha@gmail.com>
Cc: Lawrence Brakmo <lawrence@brakmo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-04-18 12:17:37 +02:00
Ard Biesheuvel 96cc375d4d crypto: arm64/crc32 - bring in line with generic CRC32
The arm64 CRC32 (not CRC32c) implementation was not quite doing
the same thing as the generic one. Fix that.

Change-Id: Ia994facbe7ca05ab852919731eb4c5fb62810919
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Steve Capper <steve.capper@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-04-18 12:17:34 +02:00
Yazen Ghannam dd6860445e crypto: crc32 - Add ARM64 CRC32 hw accelerated module
This module registers a crc32 algorithm and a crc32c algorithm
that use the optional CRC32 and CRC32C instructions in ARMv8.

Tested on AMD Seattle.

Improvement compared to crc32c-generic algorithm:
TCRYPT CRC32C speed test shows ~450% speedup.
Simple dd write tests to btrfs filesystem show ~30% speedup.

Change-Id: I733dfcfc4a17493fd5d9e63cd30ec394f4ab1f9d
Signed-off-by: Yazen Ghannam <yazen.ghannam@linaro.org>
Acked-by: Steve Capper <steve.capper@linaro.org>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-04-18 12:17:31 +02:00
LuK1337 d46b8fa23c input: keyboard: hall_ic: Fix inverted SW_LID event
Change-Id: Ic11c1d9b5c07af5a2cd8041636b81de666a0caed
2017-04-18 12:17:27 +02:00
LuK1337 fe93bada8a input: keyboard: hall_ic: Send SW_LID key event instead of SW_FLIP
* That's what we handle in LineageOS.
2017-04-18 12:17:24 +02:00
Luca Stefani 30fdda7075 drivers/usb/gadget: ci13xxx: Fix non-debug build 2017-04-18 12:16:13 +02:00
LuK1337 4e71469c73 Merge tag 'LA.BR.1.3.6-03510-8976.0' into HEAD
Change-Id: Ie506850703bf9550ede802c13ba5f8c2ce723fa3
2017-04-18 12:11:50 +02:00
Luca Stefani 7a4b2283bc drivers/input/touchscreen: synaptics_dsx2: Add FB notifier
Change-Id: Ie289bd714b033790dcb06b51ddfcbbe419af1d8a
2017-04-18 12:11:25 +02:00
LuK1337 9649a17752 input: keyboard: tc350k: Add FB notifier callback
Change-Id: Ia9b742a5fa83b0d9159706faa65bfd2cb6db78eb
2017-04-18 12:11:25 +02:00
Luca Stefani a7cd234cfe codecs: rt5659: Revert back to M calibration
Change-Id: Iae98fd7f298b906ced14379af72411e199b65758
2017-04-18 12:11:12 +02:00
Antonio Alecrim Jr 6a80abce55 X.509: remove possible code fragility: enumeration values not handled
commit eb8948a03704f3dbbfc7e83090e20e93c6c476d2 upstream.

Signed-off-by: Antonio Alecrim Jr <antonio.alecrim@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
2017-04-18 12:11:12 +02:00
Luca Stefani ac1e4ac5d8 sound: rt5659: Fake msm8952-tomtom-snd-card model
Change-Id: I6ebd997e382457f15fed86b9014e65c12e10652c
2017-04-18 12:11:12 +02:00
Ramkumar Ramachandra 8f3f7cc146 scripts: remove unused function in sortextable.c
Change-Id: Iaea9c3af8d48afb39087b2c4b7c2e6605a4485bb
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Acked-by: David Daney <david.daney@cavium.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2017-04-18 10:33:44 +02:00
Tim Gardner ced284bec3 scripts/sortextable: suppress warning: `relocs_size' may be used uninitialized
In file included from scripts/sortextable.c:194:0:
scripts/sortextable.c: In function `main':
scripts/sortextable.h:176:3: warning: `relocs_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
   memset(relocs, 0, relocs_size);
   ^
scripts/sortextable.h:106:6: note: `relocs_size' was declared here
  int relocs_size;
      ^
In file included from scripts/sortextable.c:192:0:
scripts/sortextable.h:176:3: warning: `relocs_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
   memset(relocs, 0, relocs_size);
   ^
scripts/sortextable.h:106:6: note: `relocs_size' was declared here
  int relocs_size;
      ^

gcc 4.9.1

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Reviewed-by: Jamie Iles <jamie.iles@oracle.com>

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-04-18 10:33:40 +02:00
Luca Stefani a7a8f8cae1 scripts: kconfig: Remove samsung changes
Change-Id: I645827cfa59eeeecd26a185d81d663715d403906
2017-04-18 10:33:06 +02:00
Olivier Karasangabo 641ab2bdbf arm64: Disable Samsung security restrictions by default 2017-04-18 04:44:48 +02:00
Luca Stefani 8e6f726608 video: mdnie: Sanitize sysfs 2017-04-18 04:40:51 +02:00
Luca Stefani ea57af3cf7 video: mdnie: Return mode number 2017-04-18 04:40:50 +02:00
Luca Stefani 53c9d0fc6d arch/arm64: configs: Use EXT4 for EXT2/3
Change-Id: I97aa16b489090feca2836ee25953dabf640766bc
2017-04-18 04:40:26 +02:00
Ethan Chen f8cc952732 arch/arm64: configs: Enable NF_MATCH_RPFILTER
Needed for tethering

Change-Id: I9f081d2217ffbdec46616864c24e8eb6ae57af9c
2017-04-18 04:38:09 +02:00
LuK1337 eb0401fa60 arch/arm64: configs: Enable BFQ
Change-Id: Ide8c90f0999e003c4dfc0f7d6341f43dec94e552
2017-04-18 04:37:20 +02:00
Mauro Andreolini 78b11b701c block, bfq: add Early Queue Merge (EQM) to BFQ-v7r8 for 3.10.8+
A set of processes may happen  to  perform interleaved reads, i.e.,requests
whose union would give rise to a  sequential read  pattern.  There are two
typical  cases: in the first  case,   processes  read  fixed-size chunks of
data at a fixed distance from each other, while in the second case processes
may read variable-size chunks at  variable distances. The latter case occurs
for  example with  QEMU, which  splits the  I/O generated  by the  guest into
multiple chunks,  and lets these chunks  be served by a  pool of cooperating
processes,  iteratively  assigning  the  next  chunk of  I/O  to  the first
available  process. CFQ  uses actual  queue merging  for the  first type of
rocesses, whereas it  uses preemption to get a sequential  read pattern out
of the read requests  performed by the second type of  processes. In the end
it uses  two different  mechanisms to  achieve the  same goal: boosting the
throughput with interleaved I/O.

This patch introduces  Early Queue Merge (EQM), a unified mechanism to get a
sequential  read pattern  with both  types of  processes. The  main idea is
checking newly arrived requests against the next request of the active queue
both in case of actual request insert and in case of request merge. By doing
so, both the types of processes can be handled by just merging their queues.
EQM is  then simpler and  more compact than the  pair of mechanisms used in
CFQ.

Finally, EQM  also preserves the  typical low-latency properties of BFQ, by
properly restoring the weight-raising state of  a queue when it gets back to
a non-merged state.

Change-Id: I31d48c463273603c6c49ec675c7a524a6937da2a
Signed-off-by: Mauro Andreolini <mauro.andreolini@unimore.it>
Signed-off-by: Arianna Avanzini <avanzini.arianna@gmail.com>
Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
2017-04-18 04:37:20 +02:00
Paolo Valente ac922cd71c block: introduce the BFQ-v7r8 I/O sched for 3.10.8+
Add the BFQ-v7r8 I/O scheduler to 3.10.8+.
The general structure is borrowed from CFQ, as much of the code for
handling I/O contexts Over time, several useful features have been
ported from CFQ as well (details in the changelog in README.BFQ). A
(bfq_)queue is associated to each task doing I/O on a device, and each
time a scheduling decision has to be made a queue is selected and served
until it expires.

    - Slices are given in the service domain: tasks are assigned
      budgets, measured in number of sectors. Once got the disk, a task
      must however consume its assigned budget within a configurable
      maximum time (by default, the maximum possible value of the
      budgets is automatically computed to comply with this timeout).
      This allows the desired latency vs "throughput boosting" tradeoff
      to be set.

    - Budgets are scheduled according to a variant of WF2Q+, implemented
      using an augmented rb-tree to take eligibility into account while
      preserving an O(log N) overall complexity.

    - A low-latency tunable is provided; if enabled, both interactive
      and soft real-time applications are guaranteed a very low latency.

    - Latency guarantees are preserved also in the presence of NCQ.

    - Also with flash-based devices, a high throughput is achieved
      while still preserving latency guarantees.

    - BFQ features Early Queue Merge (EQM), a sort of fusion of the
      cooperating-queue-merging and the preemption mechanisms present
      in CFQ. EQM is in fact a unified mechanism that tries to get a
      sequential read pattern, and hence a high throughput, with any
      set of processes performing interleaved I/O over a contiguous
      sequence of sectors.

    - BFQ supports full hierarchical scheduling, exporting a cgroups
      interface.  Since each node has a full scheduler, each group can
      be assigned its own weight.

    - If the cgroups interface is not used, only I/O priorities can be
      assigned to processes, with ioprio values mapped to weights
      with the relation weight = IOPRIO_BE_NR - ioprio.

    - ioprio classes are served in strict priority order, i.e., lower
      priority queues are not served as long as there are higher
      priority queues.  Among queues in the same class the bandwidth is
      distributed in proportion to the weight of each queue. A very
      thin extra bandwidth is however guaranteed to the Idle class, to
      prevent it from starving.

Change-Id: Iebf9be399041b89d79b54077da1a34a81d4e4238
Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
Signed-off-by: Arianna Avanzini <avanzini.arianna@gmail.com>
2017-04-18 04:37:19 +02:00
Arianna Avanzini 3c67a316fd block: cgroups, kconfig, build bits for BFQ-v7r8-3.10.8+
Update Kconfig.iosched and do the related Makefile changes to include
kernel configuration options for BFQ. Also add the bfqio controller
to the cgroups subsystem.

Change-Id: I41b0fe61f036d59b641205ab21902401e7a704c0
Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
Signed-off-by: Arianna Avanzini <avanzini.arianna@gmail.com>
Signed-off-by: Josue Rivera <prbassplayer@gmail.com>
2017-04-18 04:37:19 +02:00
Luca Stefani eeee7a4d5a arch/arm64: configs: Enable core ctl
Change-Id: I697b103ce251d0effd6c380c1128647d28d30d52
2017-04-18 04:37:18 +02:00
Pavankumar Kondeti 5a5f645ab8 core_ctl: Manage number of online cores based on system load
The core_ctl module takes input from userspace and CPU load information to
decide how many CPUs to keep online. User space has the following tunables:

- min_cpus: Minimum number of CPUs to keep online. This overrides other
  heuristics.
- max_cpus: Maximum number of CPUs to keep online. This overrides other
  heuristics.
- additional_cpus: Additional idle CPUs to keep ready for use.
- busy_up_thres: The normalized load% threshold that the CPU load should
  exceeded for the CPU to be go from not busy to busy.
  It could be a single threshold for all CPUs in a group, or num_cpus
  thresholds separated by spaces to specify different thresholds based on
  the current number of online CPUs.
- busy_down_thres: The normalized load% threshold that the CPU load should
  be lower than for the CPU to go from busy to not busy.
  It could be a single threshold for all CPUs in a group, or num_cpus
  thresholds separated by spaces to specify different thresholds based on
  the current number of online CPUs.
- offline_delay_ms: The time to wait for before offline cores when the
  number of needed CPUs goes down.

Mot-CRs-fixed: (CR)

Change-Id: Ied1d5bcbb8da5bbd5f3d1a3f042599babace6b65
Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Ravi Chebolu <arc095@motorola.com>
Reviewed-on: http://gerrit.mot.com/866560
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Lian-Wei Wang <lian-wei.wang@motorola.com>
Reviewed-by: Christopher Fries <cfries@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
2017-04-18 04:37:18 +02:00
Luca Stefani ee9890d0e7 arch/arm64: configs: Enable CPUSETS
Change-Id: I9573e135016163f0cd2199d2dd617e33535ff4ef
2017-04-18 04:37:17 +02:00
Riley Andrews 7ca254094c cpuset: Make cpusets restore on hotplug
This deliberately changes the behavior of the per-cpuset
cpus file to not be effected by hotplug. When a cpu is offlined,
it will be removed from the cpuset/cpus file. When a cpu is onlined,
if the cpuset originally requested that that cpu was part of the cpuset, that
cpu will be restored to the cpuset. The cpus files still
have to be hierachical, but the ranges no longer have to be out of
the currently online cpus, just the physically present cpus.

Change-Id: I3efbae24a1f6384be1e603fb56f0d3baef61d924
2017-04-18 04:37:17 +02:00
Riley Andrews bbe2a4a077 cpuset: Add allow_attach hook for cpusets on android.
Change-Id: Ic1b61b2bbb7ce74c9e9422b5e22ee9078251de21
2017-04-18 04:37:16 +02:00
Luca Stefani 7a18b32171 drivers: firmware: Add firmware-modem fw path 2017-04-18 04:17:09 +02:00
Luca Stefani baf265165c arch/arm: dts: samsung: Fix build warning
* Define #address-cells and #size-cells

Change-Id: I7c67a069a20c0f79fc4f41c7e340753d628e95ac
2017-04-18 04:16:34 +02:00
LuK1337 2e888813a7 arch/arm: dts: samsung: Set sound card name to msm8952-tomtom-snd-card
* We don't support rt5659.

Change-Id: I6ed014ba526418db27837b10bc9742154d33be64
2017-04-18 04:16:10 +02:00
LuK1337 2c49f6551c mobicore_driver: TlcTui is dead
Change-Id: I2eec28737ad990b17968a2525367e53a04827c8c
2017-04-18 04:11:35 +02:00
LuK1337 86713deafd arch/arm64: configs: Kill modules support
Change-Id: Id88c734a9c16957fc0196ddb9aa7473bb98f7e76
2017-04-18 04:11:34 +02:00
LuK1337 bae534be0c arch/arm64: configs: Add gts28vewifi_defconfig and gts210vewifi_defconfig
Change-Id: Iffa72886f9033fa884987bdfdff6f7c08a87edba
2017-04-18 04:11:33 +02:00
Christopher R. Palmer 4162ffa391 kconfig: Don't require a VARIANT_DEFCONFIG
Change-Id: I4a652c22ad4e29cd2a7eb31ae533d1e09a015ced
2017-04-18 03:46:37 +02:00
Luca Stefani 44cf03b1cc scripts: Don't create .reverse.dts files 2017-04-18 03:46:37 +02:00
LuK1337 fc9499e55a Import latest Samsung release
* Package version: T713XXU2BQCO

Change-Id: I293d9e7f2df458c512d59b7a06f8ca6add610c99
2017-04-18 03:43:52 +02:00
Jaegeuk Kim 497842998b f2fs: use __set{__clear}_bit_le
This patch uses __set{__clear}_bit_le for highter speed.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2017-03-10 09:54:36 -08:00
kbuild test robot af5bc5abf7 f2fs: update_free_nid_bitmap() can be static
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2017-03-10 09:54:26 -08:00
kbuild test robot d88d1d9621 f2fs: __update_nat_bits() can be static
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2017-03-10 09:54:26 -08:00
Jaegeuk Kim fdcfc3af51 f2fs: le16_to_cpu for xattr->e_value_size
This patch fixes missing le16 conversion, reported by kbuild test robot.

Fixes: 5f35a2cd5 ("f2fs: Don't update the xattr data that same as the exist")
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2017-03-10 09:54:23 -08:00
Jaegeuk Kim d71b05d2c5 f2fs: don't overwrite node block by SSR
This patch fixes that SSR can overwrite previous warm node block consisting of
a node chain since the last checkpoint.

Fixes: 5b6c6be2d878 ("f2fs: use SSR for warm node as well")
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2017-03-09 19:26:40 -08:00
Jaegeuk Kim 0aeb6e0b46 f2fs: don't need to invalidate wrong node page
If f2fs_new_inode() is failed, the bad inode will invalidate 0'th node page
during f2fs_evict_inode(), which doesn't need to do.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2017-03-09 19:26:29 -08:00
Yunlei He faf5b8adb6 f2fs: fix an error return value in truncate_partial_data_page
This patch fix a error return value in truncate_partial_data_page

Signed-off-by: Yunlei He <heyunlei@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2017-03-09 19:26:20 -08:00