diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-08-27 14:36:27 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-26 06:53:09 +0100 |
commit | e722a295cf493388dae474745d30e91e1a2ec549 (patch) | |
tree | 34ccece0c93cd8faf0b37cddc97a8669c513898d /tools/testing/selftests/android/ion/README | |
parent | 3650b228f83adda7e5ee532e2b90429c03f7b9ec (diff) | |
download | linux-e722a295cf493388dae474745d30e91e1a2ec549.tar.gz linux-e722a295cf493388dae474745d30e91e1a2ec549.tar.bz2 linux-e722a295cf493388dae474745d30e91e1a2ec549.zip |
staging: ion: remove from the tree
The ION android code has long been marked to be removed, now that we
dma-buf support merged into the real part of the kernel.
It was thought that we could wait to remove the ion kernel at a later
time, but as the out-of-tree Android fork of the ion code has diverged
quite a bit, and any Android device using the ion interface uses that
forked version and not this in-tree version, the in-tree copy of the
code is abandonded and not used by anyone.
Combine this abandoned codebase with the need to make changes to it in
order to keep the kernel building properly, which then causes merge
issues when merging those changes into the out-of-tree Android code, and
you end up with two different groups of people (the in-kernel-tree
developers, and the Android kernel developers) who are both annoyed at
the current situation. Because of this problem, just drop the in-kernel
copy of the ion code now, as it's not used, and is only causing problems
for everyone involved.
Cc: "Arve Hjønnevåg" <arve@android.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Christian Brauner <christian@brauner.io>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Hridya Valsaraju <hridya@google.com>
Cc: Joel Fernandes <joel@joelfernandes.org>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Laura Abbott <laura@labbott.name>
Cc: Martijn Coenen <maco@android.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Todd Kjos <tkjos@android.com>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20200827123627.538189-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/android/ion/README')
-rw-r--r-- | tools/testing/selftests/android/ion/README | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/tools/testing/selftests/android/ion/README b/tools/testing/selftests/android/ion/README deleted file mode 100644 index 21783e9c451e..000000000000 --- a/tools/testing/selftests/android/ion/README +++ /dev/null @@ -1,101 +0,0 @@ -ION BUFFER SHARING UTILITY -========================== -File: ion_test.sh : Utility to test ION driver buffer sharing mechanism. -Author: Pintu Kumar <pintu.ping@gmail.com> - -Introduction: -------------- -This is a test utility to verify ION buffer sharing in user space -between 2 independent processes. -It uses unix domain socket (with SCM_RIGHTS) as IPC to transfer an FD to -another process to share the same buffer. -This utility demonstrates how ION buffer sharing can be implemented between -two user space processes, using various heap types. -The following heap types are supported by ION driver. -ION_HEAP_TYPE_SYSTEM (0) -ION_HEAP_TYPE_SYSTEM_CONTIG (1) -ION_HEAP_TYPE_CARVEOUT (2) -ION_HEAP_TYPE_CHUNK (3) -ION_HEAP_TYPE_DMA (4) - -By default only the SYSTEM and SYSTEM_CONTIG heaps are supported. -Each heap is associated with the respective heap id. -This utility is designed in the form of client/server program. -The server part (ionapp_export) is the exporter of the buffer. -It is responsible for creating an ION client, allocating the buffer based on -the heap id, writing some data to this buffer and then exporting the FD -(associated with this buffer) to another process using socket IPC. -This FD is called as buffer FD (which is different than the ION client FD). - -The client part (ionapp_import) is the importer of the buffer. -It retrives the FD from the socket data and installs into its address space. -This new FD internally points to the same kernel buffer. -So first it reads the data that is stored in this buffer and prints it. -Then it writes the different size of data (it could be different data) to the -same buffer. -Finally the buffer FD must be closed by both the exporter and importer. -Thus the same kernel buffer is shared among two user space processes using -ION driver and only one time allocation. - -Prerequisite: -------------- -This utility works only if /dev/ion interface is present. -The following configs needs to be enabled in kernel to include ion driver. -CONFIG_ANDROID=y -CONFIG_STAGING=y -CONFIG_ION=y -CONFIG_ION_SYSTEM_HEAP=y - -This utility requires to be run as root user. - - -Compile and test: ------------------ -This utility is made to be run as part of kselftest framework in kernel. -To compile and run using kselftest you can simply do the following from the -kernel top directory. -linux$ make TARGETS=android kselftest -Or you can also use: -linux$ make -C tools/testing/selftests TARGETS=android run_tests -Using the selftest it can directly execute the ion_test.sh script to test the -buffer sharing using ion system heap. -Currently the heap size is hard coded as just 10 bytes inside this script. -You need to be a root user to run under selftest. - -You can also compile and test manually using the following steps: -ion$ make -These will generate 2 executable: ionapp_export, ionapp_import -Now you can run the export and import manually by specifying the heap type -and the heap size. -You can also directly execute the shell script to run the test automatically. -Simply use the following command to run the test. -ion$ sudo ./ion_test.sh - -Test Results: -------------- -The utility is verified on Ubuntu-32 bit system with Linux Kernel 4.14. -Here is the snapshot of the test result using kselftest. - -linux# make TARGETS=android kselftest -heap_type: 0, heap_size: 10 --------------------------------------- -heap type: 0 - heap id: 1 -heap name: ion_system_heap --------------------------------------- -Fill buffer content: -0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd -Sharing fd: 6, Client fd: 5 -<ion_close_buffer_fd>: buffer release successfully.... -Received buffer fd: 4 -Read buffer content: -0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0x0 0x0 0x0 0x0 0x0 0x0 -0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 -Fill buffer content: -0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd -0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd -0xfd 0xfd -<ion_close_buffer_fd>: buffer release successfully.... -ion_test.sh: heap_type: 0 - [PASS] - -ion_test.sh: done |