qseecom: Check if ce clock is enabled before sending cmd to TZ

Make change to check if ce clock is enabled before sending command
to TZ, then to prevent data aborting if clock is not enabled for
TZ crypto operation.

CRs-Fixed: 726840
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Signed-off-by: William Clark <wclark@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
qseecom: Enable/disable clock for client if bus scaling is not enabled

To avoid the service failure on a target where bus scaling flag is not
enabled in target device tree file by mistake, make a change to enable/
disable crypto clocks when the client calls to scale up bus bandwidth
and send command even if bus scaling feature is not enabled.

CRs-Fixed: 726840
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
mmc: core: Fix unclocked access in get_xfer_remain/stop_request

The unclocked access could happen in the following scenario -

1. mmcqd thread is waiting for previously submitted io to be done
2. before this io is done, it is woken up due to is_urgent event
3. mmcqd thread is running and is processing the is_urgent event
4. Just about the same time the previously submitted io is done and
it sets is_done_rcv flag, tries to wake up mmcqd thread and release
host clock so as to gate the clocks.

If step 3 and 4 happen at the same time, then clocks will be gated off
before is_urgent is completely handled. Hence, make sure to hold the
clock before invoking get_xfer_remain and stop_request host->op.

Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ARM: validate address before dumping it in OOPS message

As a part of kernel OOPS message, kernel treats every register
as memory pointer and dumps the memory area from an offset of
0x80. Add check to see if its a valid virtual address before
dumping it.

Such addresses may be part of CMA regions and they may
be protected at times. Therefore, while dumping such addresses
violations can potentially occur.

Additionally validate the pfn first as it may belong to a
carveout region which has no associated page object.

Add check to see if they belong to CMA region and don't dump
such addresses altogether to be safe.

CRs-Fixed: 696028,737215
Signed-off-by: Vignesh Radhakrishnan <vigneshr@codeaurora.org>
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>