Commit graph

563468 commits

Author SHA1 Message Date
Matt Wagantall
137431c1fb soc: qcom: socinfo: simplify searching for smem regions
Instead calling smem_find() repeatedly with different sizes
for SMEM_HW_SW_BUILD_ID, call smem_get_entry() which returns
a pointer to the region regardless of its size.

Change-Id: If68ab31f808e2ecb740e1560ec5d9a7edd9a8c9f
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
2016-03-22 11:02:27 -07:00
Ian Maund
52dabc73a5 Update target name references for 8976
With the official announcement of 8976, remove all references to its
internal code name, and replace them with 8976.

Change-Id: Iadedabf16a7bef92c582524ae6ea38b31ba26ac4
Signed-off-by: Ian Maund <imaund@codeaurora.org>
2016-03-22 11:02:26 -07:00
Matt Wagantall
11c8f9dc1a msm: socinfo: Add 'family' sysfs node and redefine 'machine' node
Move the "Snapdragon" string from the machine node to the
previously-unused family node.  The machine node is updated
to instead contain the SoC name (ex. "MSM8996"). The soc_id
field remains untouched, and contains the numerical id
corresponding to the specific SoC variant

Change-Id: I659bdc0516cd85ed44d8b4a337411b540e3e404f
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
2016-03-22 11:02:25 -07:00
Abhimanyu Kapur
791e7caba5 soc: qcom: Add socinfo driver snapshot
This is a snapshot of the socinfo driver as of
msm-3.14 commit:

3bc54cf86bdc7affa7cd4bf7faa3c57fe8f8819d (Merge "msm:
camera: Add dummy sub module in sensor pipeline")

Change-Id: I6b5b866ede0e84432fad460e9d95babfdbc556fc
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:02:24 -07:00
Runmin Wang
664a9b75a2 defconfig: arm64: msm: Enable poweroff reset driver and download mode
Enable POWER_RESET and DLOAD_MODE for defconfig and perf_defconfig

Change-Id: If127eaa2b8dae27bdba67b53d920ccffc5cdb577
2016-03-22 11:02:23 -07:00
David Ng
b38d1c71b0 power: reset: msm: Handle dm-verity and keys reset reasons
Write magic cookies/PON reset reason to indicate reasons
of dm-verity corruption, re-enable enforcing mode, and
(unrelated) keys clear.

Change-Id: I49904c79940515863d794b23fa7ac84e472b2466
Signed-off-by: David Ng <dave@codeaurora.org>
2016-03-22 11:02:23 -07:00
Matt Wagantall
69c5effef6 power: reset: use hard resets by default for all restart commands
Present, hard resets are used only when rebooting for "recovery",
"rtc", or "bootload" reboot commands or when the reboot command
is an empty string. Perform hard resets for invalid reboot commands
also, to avoid accidental warm resets if an invalid reboot command
is mistakenly used.

Continue to use warm resets for entry into download mode. This is
required for collection of ramdumps.

Change-Id: I71f657e9c8c20abcbbda86d789c843060c8ffce7
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
2016-03-22 11:02:22 -07:00
Lijuan Gao
64efabe747 power: reset: fix bug on warm reset or hard reset selection
Rebooting to recovery, bootloader and rtc should be treated as
hard reset if PMIC sparse regs are used to store reset reason.
Otherwise it should be set as warm reset to keep compatible with
legacy design. So correct logic of need_warm_reset here.

Change-Id: Ica173cc379df16a28f11bf5da87cb928e73ecdfb
Signed-off-by: Lijuan Gao <lijuang@codeaurora.org>
2016-03-22 11:02:21 -07:00
Stepan Moskovchenko
30787dfc1c power: reset: msm: Defer set_dload_mode to end of probe
The set_dload_mode() call in msm_restart_probe() may depend
on the TCSR base address, which is initialized later in the
probe function. Move this call to the end of
msm_restart_probe() to avoid potentially trying to use an
uninitialized resource.

Change-Id: I65c408f065cc7c68a929ec43d50b0a493942a189
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
2016-03-22 11:02:20 -07:00
Stepan Moskovchenko
e731442230 power: reset: msm: Define reg-names for the qcom,pshold device
Since the qcom,pshold device now supports up to two
distinct register definitions, add the 'reg-names' property
to assign names to the memory resources, rather than
relying on resource numbering.

Change-Id: Ie0bc5eae0119901239efae05357ae107a112b87a
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
2016-03-22 11:02:19 -07:00
Stepan Moskovchenko
0a8080c060 power: reset: msm: Allow configuring reset type via secure I/O
Some targets require that the Download Mode / EDL
configuration be performed by means of a Secure I/O write
to the TCSR_BOOT_MISC_DETECT register rather than through a
generic SCM operation. Provide a mechanism for specifying
the address of this register in the device tree, to use as
a fallback method if the generic SCM call to set the
download mode configuration is unavailable.

This is necessary to comply with atomicity requirements of the
secure environment.

Change-Id: I5d3fcb48b0b47815d4839a3b722b0462a1bca087
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
2016-03-22 11:02:18 -07:00
Stepan Moskovchenko
6c3bc79a39 power: reset: msm: Deassert PS_HOLD via SCM if possible
Support a new SCM call which disables the PMIC arbiter and
deasserts PS_HOLD in a single operation. Fall back on the
legacy behavior of disabling the PMIC abriter and directly
deasserting PS_HOLD if this call is not available.

This is necessary comply with atomicity requirements of the
secure environment.

Change-Id: Ia3b13d469932edf94d3249fa3e7234a1c12eee1b
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
2016-03-22 11:02:17 -07:00
Kumar Gala
4a5aa46b78 power: reset: Fix build with !CONFIG_MSM_DLOAD_MODE
We only define in_panic when CONFIG_MSM_DLOAD_MODE is enabled.  Otherwise
we get the following compile error:

drivers/power/reset/msm-poweroff.c: In function ‘do_msm_restart’:
drivers/power/reset/msm-poweroff.c:276:28: error: ‘in_panic’
	undeclared (first use in this function)
  if (WDOG_BITE_ON_PANIC && in_panic)
                            ^
drivers/power/reset/msm-poweroff.c:276:28: note: each undeclared identifier
is reported only once for each function it appears in

Just add simple #ifdef CONFIG_MSM_DLOAD_MODE around the code to fix.

Change-Id: I01f8641e90dd000813127a5b8ce730529f3485cc
Signed-off-by: Kumar Gala <galak@codeaurora.org>
2016-03-22 11:02:16 -07:00
Subbaraman Narayanamurthy
aff6914761 soc: qcom: watchdog_v2: Add support to trigger watchdog bite on panic
In certain cases during a kernel panic,the interrupts on non-panicking
CPUs are disabled. Since CPU context cannot be collected by sending IPI
to those CPUs, we're limited to debug the problem. Forcing a watchdog
bite during kernel panic will ensure us getting the proper CPU context.
Hence adding support for the same.

Change-Id: Id06030d9bc46d94209da7f0ef8c47bfd3477baf6
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
[abhimany: resolve trivial merge conflicts]
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:02:15 -07:00
Vikram Mulukutla
96864fd7ed power: reset: Add support for the new scm_call2 API
The SCM library now provides a new API that implements
a secure world syscall interface that is more aligned
with the ARMv8 SMC calling convention. Add support for
this new API.

Change-Id: Ia76309de556e97e43c1e8ab782f89c4115d5fac6
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2016-03-22 11:02:15 -07:00
Josh Cartwright
b47b146f86 power: reset: replace upstream msm-poweroff driver
This is a snapshot of the msm-poweroff driver as of msm-3.10 commit

acdce027751d5a7488b283f0ce3111f873a5816d (Merge "defconfig: arm64: Enable
ONESHOT_SYNC for msm8994")

In addition, make this driver selectable when ARCH_MSM || ARCH_QCOM.

Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
[abhimany: resolve trivial merge conflicts]
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>

Change-Id: Ifca5e017ad67cd78cbd507864fd3a0ee37d8713e
2016-03-22 11:02:14 -07:00
Karthikeyan Ramasubramanian
1fdfc96250 defconfig: arm64: msm: Enable SMP2P
SMP2P is a simple, low-latency interprocessor communication protocol for
communicating simple state changes between processors in the SoC.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:02:13 -07:00
Karthikeyan Ramasubramanian
219ef7f352 soc: qcom: smp2p: Fix implicit module_init declaration error
module_init() declaration has moved from init.h to module.h. Fix the
"implicit module_init() declaration" compile-time error by including
the module.h header file.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:02:12 -07:00
Karthikeyan Ramasubramanian
e170bbd9bd gpio: smp2p: Use irq_domain_get_of_node accessor
The internals of irq_domain data structure has changed and of_node element
has been replaced with fwnode element.

Use irq_domain_get_of_node accessor to refer to of_node element in
irq_domain data structure.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:02:11 -07:00
Karthikeyan Ramasubramanian
07eb2c2868 gpio: smp2p: Remove setting IRQ flags
set_irq_flags is ARM specific with custom flags which have genirq equivalents.
The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:02:10 -07:00
Karthikeyan Ramasubramanian
d4516a3652 soc: qcom: Add snapshot of SMP2P Driver
This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:02:10 -07:00
Karthikeyan Ramasubramanian
180a1bcbe0 arm64: qcom: increase number of max gpios
Increase number of maxium gpios for ARCH_QCOM.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:02:09 -07:00
Joonwoo Park
0f79e443a5 arm64: msm: increase number of max gpios
Increase number of maxium gpios for ARCH_MSM.

Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2016-03-22 11:02:08 -07:00
Olof Johansson
e52b48462f CHROMIUM: ARM64: add gpio.h to increase default nr
Signed-off-by: Olof Johansson <olofj@chromium.org>
Signed-off-by: David Riley <davidriley@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/206724
Git-commit: a98a5186344c027fb53506994ce93f7af8a79960
Git-repo: https://chromium.googlesource.com/chromiumos/third_party/kernel
[joonwoop@codeaurora.org: fixed merge conflict in arch/arm64/Kconfig.
 removed Change-Id tag from commit text.]
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2016-03-22 11:02:07 -07:00
Venkat Gopalakrishnan
0fbc1f6f2e ARM: dts: 8996: update compatible for ufs driver
Use the upstream naming convention and update the ufs driver
compatible string.

Change-Id: I599f774a92ad2f795f0c49ce095b26173f597b24
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:02:06 -07:00
Venkat Gopalakrishnan
6356ac33c5 scsi: ufs-qcom: fix uninitialized use warning
Initialize flags before using.

Change-Id: Id59be40b89eeac4a560a76590cbaed5055d73d70
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:02:05 -07:00
Venkat Gopalakrishnan
68d437a53f scsi: ufs-qcom: ifdef msm bus scaling code appropriately
ifdef msm-bus include and api's with CONFIG_MSM_BUS_SCALING.
This makes compiling UFS driver clean when MSM_BUS_SCALING
is not enabled.

Change-Id: I50a3f43c7c1deb1033d4ece1493e0f205d8ed553
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:02:04 -07:00
Venkat Gopalakrishnan
1191a83ef3 scsi: ufs-qcom: ifdef qcom ufs crypto code appropriately
ifdef qcom ufs crypto related code based on CONFIG_SCSI_UFS_QCOM_ICE.
This makes compiling UFS driver clean when QCOM_ICE is not enabled.

Change-Id: I57917ccfa76bc1e80f15a024d1fefd15e0e902da
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:02:03 -07:00
Venkat Gopalakrishnan
1686d75c12 block: test-iosched: Fix compilation error in end_test_bio
The function signature of bio_end_io_t is changed in 4.4 kernel and
the error value is assigned in bi_error field of the bio struct, so
just free the bio after bio completion.

Change-Id: I08f64d8d51ae401fa608351b90b1120d8b84605f
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:02:03 -07:00
Subhash Jadavani
09ed2d9d3c block: don't allow nr_pending to go negative
nr_pending can go negative if we attempt to decrement it without matching
increment call earlier. If nr_pending goes negative, LLD's runtime suspend
might race with the ongoing request. This change allows decrementing
nr_pending only if it is non-zero.

Change-Id: I5f1e93ab0e0f950307e2e3c4f95c7cb01e83ffdd
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2016-03-22 11:02:02 -07:00
Venkat Gopalakrishnan
a627c73479 block/fs: make tracking dirty task debug only
Adding a new element "tsk_dirty" to struct page increases the size
of mem_map/vmemmap, restrict this to a debug only functionality to
save few MB of memory.

Considering a system with 1G of RAM, there will be nearly 262144
pages and thus that many number of page structures in mem_map/vmemmap.
With pointer size of 8 bytes on a 64 bit system, adding this
pointer to "struct page" means an increase of "2MB" for mem_map.

CRs-Fixed: 738692
Change-Id: Idf3217dcbe17cf1ab4d462d2aa8d39da1ffd8b13
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
[venkatg@codeaurora.org: Fixed trivial merge conflict]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:02:01 -07:00
Venkat Gopalakrishnan
014929f975 block/fs: keep track of the task that dirtied the page
Background writes happen in the context of a background thread.
It is very useful to identify the actual task that generated the
request instead of background task that submited the request.
Hence keep track of the task when a page gets dirtied and dump
this task info while tracing. Not all the pages in the bio are
dirtied by the same task but most likely it will be, since the
sectors accessed on the device must be adjacent.

Change-Id: I6afba85a2063dd3350a0141ba87cf8440ce9f777
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
[venkatg@codeaurora.org: Fixed trivial merge conflicts]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:02:00 -07:00
Gilad Broner
a27d5a2f83 block: test-iosched: fix spinlock recursion
spin_lock_irq() / spin_unlock_irq() is used so interrupts are
enabled after unlocking the spinlock. However, it is not guaranteed
they were enabled before.
This change uses the proper irqsave / irqrestore variants instead.
Without it, a spinlock recursion on the scsi request completion path
is possible if completion interrupt occurs when used for UFS testing.

Change-Id: I25a9bf6faaa2bbfedc807111fbcb32276cccea2f
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
2016-03-22 11:01:59 -07:00
Lee Susman
b5bec249a9 block: test-iosched: expose sector_range variable to user
Expose "sector_range", which will indicate to the low-level driver
unit-tests the size (in sectors, starting from "start_sector") of the
address space in which they can perform I/O operations. This user-defined
variable can be used to change the address space size from the default
512MiB.

Change-Id: I515a6849eb39b78e653f4018993a2c8e64e2a77f
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
2016-03-22 11:01:58 -07:00
Gilad Broner
f3664f905d block: test-iosched: fix bio allocation for test requests
Unit tests submit large requests of 512KB made of 128 bios.
Current allocation was done via kmalloc which may not be able
to allocate such a large buffer which is also physically contiguous.
Using kmalloc to allocate each bio separately is also problematic as
it might not be page aligned. Some bio may end up using more than a
single memory segment which will fail the mapping of the bios to
the request which supports up to 128 physical segments.
To avoid such failure, allocate a separate page for each bio
(bio size is single page size).

Change-Id: Id0da394d458942e093d924bc7aa23aa3231cdca7
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[venkatg@codeaurora.org: Drop changes to mmc_block_test.c]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:58 -07:00
Gilad Broner
60f3461f17 block: test-iosched: enable running of simultaneous tests
Current test-iosched design enables running only a single test
for a single block device.
This change modifies the test-iosched framework to allow running
several tests on several block devices.

Change-Id: I051d842733873488b64e89053d9c4e30e1249870
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[merez@codeaurora.org: fix conflicts due to removal of BKOPs UT]
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
[venkatg@codeaurora.org: Drop changes to ufs_test.c and
mmc_block_test.c]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:57 -07:00
Gilad Broner
ddb20cd6f0 block: test-iosched: fix spinlock recursion
blk_run_queue() takes the queue spinlock and disabled irqs.
Consider the following callstack:

blk_run_queue
 ->__blk_run_queue
  -> scsi_request_fn
   -> blk_peek_request
    -> __elv_next_request
     -> elevator_dispatch_fn
      -> test_dispatch_requests
       -> test_dispatch_from

test_dispatch_from() will release the test-iosched spinlock
using spin_unlock_irq which will enable interrupts, however,
caller is assuming interrupts are disabled.
An interrupt can occur now and scsi soft-irq may be scheduled
with the following call stack:

scsi_softirq_done
 -> scsi_finish_command
  -> scsi_device_unbusy

scsi_device_unbusy() tries to lock the queue spinlock which was
previously locked when blk_run_queue was called, resulting in a
spinlock recursion.

Change test_dispatch_from() to use the spinlock irq save/restore variants
to prevent enabling the irq in case they were previously disabled.

Change-Id: Icaea4f9ba54771edb0302c6005047fcc5478ce8d
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
2016-03-22 11:01:56 -07:00
Gilad Broner
2e5c505a50 block: test-iosched: remove test timeout timer
When running a test, a timer was set to detect test timeout
and to unblock the wait_event() function which is waiting for the
test to finish. This is redundant as wait_event timeout variant
gives the same functionality without the overhead of managing a
timer for this purpose and improve code readability.

Change-Id: Icbd3cb0f3fcb5854673f4506b102b0c80e97d6bb
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
2016-03-22 11:01:55 -07:00
Maya Erez
e355904bbf block: test-iosched: expose APIs to allow compiling ufs_test as a module
The UFS tests are used for testing the functionality and performance
of the UFS driver. Some of the tests call compare_buffer_to_pattern
for data integrity checking. This function should be exposed in order
to allow compilation of ufs_test as a module.

Change-Id: I2279b0ae9dbdf4ecad073fab2b15116be2ea1713
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-22 11:01:54 -07:00
Dolev Raviv
949aad284e scsi: ufs: mixed long sequential
The test will verify correctness of sequential data pattern
written to the device while new data (with same pattern) is
written simultaneously.
First this test will run a long sequential write scenario.
This first stage will write the pattern that will be read
later. Second, sequential read requests will read and
compare the same data. The second stage reads, will issue in
Parallel to write requests with the same LBA and size.
NOTE: The test requires a long timeout.

The purpose of this test is to mix read and write requests on the same
LBA while checking for the read data correctness.

Change-Id: I6a437ce689b66233af3055d07a7f62f1e7b40765
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
[venkatg@codeaurora.org: Changes to ufs_test.c are already
present as part of earlier commit, hence drop them here]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:53 -07:00
Dolev Raviv
0c46efdd45 scsi: ufs: add support for test specific completion check
Introduce a new callback 'check_test_completion_fn' to test-iosched
framework. This callback is necessary to determine if a test has
completed or not in situation where the request queue is empty, but the
test was not completed.

Change-Id: I60bd8cccffacab11a5a7cba78caccf53fea3e1d8
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
[venkatg@codeaurora.org: Changes to ufs_test.c are already
present as part of earlier commit, hence drop them here]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:52 -07:00
Lee Susman
d4670e5bb0 scsi: ufs: long sequential read/write tests
This test adds the ability to test the UFS task management feature
in the driver. It loads the queue with requests in order to allow
the task management to operate in full capacity.

Modify test-iosched infrastructure to support the new tests:
- expose  check_test_completion()

Note: we submit 16-bio requests since the current HW is very slow
and we don't want to exceed the timeout duration.

Change-Id: I8ee752cba3c6838d8edc05747fa0288c4b347ef6
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
[merez@codeaurora.org: fix trivial conflicts in ufs_test.c]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[venkatg@codeaurora.org: Changes to ufs_test.c are already
present as part of earlier commit, hence drop them here]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:51 -07:00
Maya Erez
2dcf7d92a9 block: test-iosched: fix test-iosched compilation
Fix test-iosched compilation issues due to differences in data
structures in kernel-3.14.

Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-22 11:01:51 -07:00
Lee Susman
fcb6ce0633 block: add test bio size define to test-iosched
Add a define for the test bio size (which is the size of a page),
this is used for allocating the right sized buffer for the bio during
test request creation.

Change-Id: I9505c85c4352009bdee442172eb8ae8f4254cfb0
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
2016-03-22 11:01:50 -07:00
Maya Erez
819ba4dd19 mmc: Unit test fix for logging
Update logging with:
- prefix with module name
- add '\n' in the end
- test_pr_* removed

Change-Id: I465c9809def9d294dcbb3f7cf7f474c189f5fdbf
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
[merez@codeaurora.org: fix conflicts due to removal of bkops tests]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[venkatg@codeaurora.org: Drop changes to mmc_block_test.c]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:49 -07:00
Dolev Raviv
dbe45fb01e block: test-iosched: disable statistic flag on request
The flag REQ_IO_STAT is enabled by default this assumes statistics are
initialized and might cause NULL references in the kernel. To avoid it
this flag is cleared in the request and stats are not updated.

Change-Id: I6a1890dde51dfa8ffdd376b13f4466c9db0ae05b
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
2016-03-22 11:01:48 -07:00
Lee Susman
ef94ce156f mmc: card: change long_sequential_test time measurements to ktime
Change time measurements in long_sequential_test from jiffies to ktime,
and make the relevant change in test-iosched infrastructure.

In long_sequential_test we measure throughput, and the jiffies resolution
is not sensitive enough for this calculation.

Change-Id: If7c9a03c687f61996609c014e056bcd7132b9012
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
[venkatg@codeaurora.org: Drop changes to mmc_block_test.c]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:47 -07:00
Dolev Raviv
2bf9babb4d block: fix test crashing due to synchronization issue
The __blk_run_queue function is called from several contexts. The fix is
replacing it with blk_run_queue function, this function is guarded with
a lock, thus making it thread safe and prevents the crashing.

Change-Id: I3e12fa9c8b9e161375fffa3570abfa46b223a60b
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
2016-03-22 11:01:46 -07:00
Lee Susman
da2d513f18 mmc: enhance long_sequential_test for higher throughput
Change the test design so that requests are dynamically created
and freed. This enables running tests with more than 128 requests,
therefore more than 50MiB can be written/read and makes it possible
to measure driver write/read throughput more accurately.

Change-Id: I56c9d6c1afba5c91a0621a16d97feafd4689521d
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
[merez@codeaurora.org: fix conflicts due to BKOPS tests removal]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[venkatg@codeaurora.org: Drop changes to mmc_block_test.c]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:45 -07:00
Dolev Raviv
a3c942633c block: test-iosched: Add support for setting rq_disk
Some block devices requires the rq_disk field to be assigned.
This patch exposes a new API to the block device test utility for
getting the rq_disk assigned, in the created request.

Change-Id: I61dc4dad50eb7600728156a6cd08bb1ee134df0d
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
2016-03-22 11:01:45 -07:00