Revert "mm/pagewalk.c: walk_page_range should avoid VM_PFNMAP areas"

This seems to fix those crazy memory corruption issues, often shown when inodes are NULL and the
kernel panics.

Test by triggering a bug report in development options before/after.

Thanx to myfluxi

This reverts commit 247b2e1b2804cb28bdbd6bf871b16a991f11118f.

Signed-off-by: Dan Trifan <jimsth@gmail.com>
Revert "mm, show_mem: suppress page counts in non-blockable contexts"

This appears to improve RAM usage nicely. While
it was not possible to stay under 1200MB usage before, now it's in the ballpark of 900-950MB.

Thanx to myfluxi

This reverts commit 1d8bc36e6956a7f9cfe22f7e8615728485ef3332.

Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: msm: Add 24 bit support to Primary MI2S TX

Add 24 bit support to Primary MI2S Tx. Add
capability to specify bits per sample to DSP.

Signed-off-by: Damir Didjusto <damird@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: msm: Remove MI2S_TX for Multimedia4

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: msm: Add support for amwwb tunneled record

 Update the Multimedia4 Mixer control to handle
 PRI_MI2S_TX and add the new route from PRI_MI2S_TX
 to Multimedia4 Mixer to enable tunneled AMRWB recording

Signed-off-by: Sharad Sangle <assangle@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoc: msm: Add check for compressed capture format

- Only AMRWB format is supported in compress capture
  path, use default codec.id(SND_AUDIOCODEC_AMRWB) if
  request codec id is invalid.
- Use fixed band mode and dtx mode since these are the
  only supported parameters for AMRWB format

Signed-off-by: Mingming Yin <mingming@codeaurora.org>
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
slim_msm: Get platform-specific information from platform-data

Number of pipes available to application processor for data channels,
and product-code field of enumeration address needed for setting
these pipes can be different for different platforms.
Store this platform-specific information in platform-data, and get
it from Device-Tree if applicable.

Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
slim_msm: Add support for external MDM restart

If external MDM restarts when MDM slimbus channels are active, it
is possible that the MDM framer was clocking the bus, and ADSP was
not active. Make sure apps wakes up ADSP and checks the framer status
so that slimbus is clocked by ADSP instead of MDM, and communication
over slimbus is restored.

Signed-off-by: Naveen Kaje <nkaje@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ARM: dts: msm: Add pipe-ownership and product-code for slimbus in 8974

To setup data channels from application processor with at least one
endpoint in memory, slimbus driver requires information about pipes
owned by the apps processor, and the product-code of the controller.
Add this information to Device-Tree for MSM slimbus controller on
8974.

Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
slim_ngd: Handle error flags before handling SENT flag

It's possible that error flags were set alongwith SENT flag for
TX transaction status. In such a scenario, error flag status should
be handled (and SENT flag should be cleared). Move error-flag
handling ahead of SENT flag handling to avoid interrupt being called
twice, and completion being set twice.

Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
slimbus: Enable clients to send user messages to devices.

Slimbus protocol allows user messages of destination referred, or
source referred type to be sent to a slimbus device.
Provide framework to support such messages. Note that, controller
may not support all user messages.

Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
slim_ngd: Support REPEAT_CHANGE_VALUE user message

REPEAT_CHANGE_VALUE user message is used to transfer high amount of
messaging data efficiently.

Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
slim_msm: Signal client's completion for per transfer notification

Slimbus ports are connected to BAM pipes and ports inform the pipe
when descriptor's data transfer is done. Clients queue a completion
per descrptor when that descriptor is processed. This completion will
get overwritten if client queues multiple descriptors. Use
per-transfer user-data as client's completion to avoid this problem.
This also reduces controller-driver involvement in data transfer.

Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
slimbus: Use physical address type where physical address is used

Use physical address type for buffers using physical address.
(e.g. interaction with data-mover engine)

Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
slim_ngd: Use QMI server up notification instead of APR for probing

Slimbus QMI-server can reside on any other remote processor.
Avoid depedency on APR (for APR state) by utilizing QMI server-up
notification for slimbus hardware initialization from apps processor.

Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
slim-ngd: change log level of slave_notify completion

Change the logging of slave_notify completion to debug to avoid
excessive logging.

Signed-off-by: Naveen Kaje <nkaje@codeaurora.org>
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
Slim_ngd: Modify waiting mechanism in kthread

wait_for_completion_timeout() is not a good option in
kthread as it leads to scheduling the kthread on the every timeout.
Hence modify it to wait_for_completion() from
wait_for_completion_timeout().

Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
qseecom: Validate shared buffer length & virtual address

Return -EINVAL if virtual addr of shared buffer is NULL or
shared buffer length is 0

Signed-off-by: Hariprasad Dhalinarasimha <hnamgund@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
qseecom: Add support for PFE feature

Add key management support for crypto HW used for
PFE (per file encryption) features.

Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
qseecom: Check for FDE/PFE feature

Add checks for PFE/FDE feature before executing anything
related to the feature.

Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>