From patchwork Sat Dec 14 03:26:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 22476 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 30F4923FF5 for ; Sat, 14 Dec 2013 03:27:09 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id oy12sf5239198veb.1 for ; Fri, 13 Dec 2013 19:27:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=edv7oEk7MoF2msZ5PQK2gF2t8hItzJ28dQqPGm21z/E=; b=gg5105+m8IzwqJuM4SAUSpo2w721a3Wje2R9QYAbJdQth32vKj+4m1c5/vdigz4x6i 1dHK9BmoZHQFDkwupfB1XL8/r0wGgKdu9Mv5LTK2JKxZmSrn9vn/vSYLIkmBWrAwlsdq fH02cAb2Fo1WtTt/gE/CpBvCCl6d5uoFg4wZ51kxbExVreXD0YO527vaib42TXS+SBkR dZyHAR8EBVALvqAW5/RikR0oNr95pNwYvVcAk42jN3jF7RXBvzyJjp7mUK6BZ46+a4ga oq7b9NpHbrUtwR+DuQRAlkl7fc5xampbliJ/HyKsd9oMCqVZ7zFLaNcmOyzx394TdyCg CjMw== X-Gm-Message-State: ALoCoQlCOTtNHBJMaEh7cTmbHqk1iRiWFsOsDaT60fo83NWZUMbZSZ0pQGuQFie+3qexmP6SizAl X-Received: by 10.58.188.113 with SMTP id fz17mr2218412vec.26.1386991629058; Fri, 13 Dec 2013 19:27:09 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.16.35 with SMTP id c3ls1182754qed.83.gmail; Fri, 13 Dec 2013 19:27:08 -0800 (PST) X-Received: by 10.52.117.176 with SMTP id kf16mr2212220vdb.6.1386991628937; Fri, 13 Dec 2013 19:27:08 -0800 (PST) Received: from mail-vb0-f41.google.com (mail-vb0-f41.google.com [209.85.212.41]) by mx.google.com with ESMTPS id o6si1425704vcz.79.2013.12.13.19.27.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Dec 2013 19:27:08 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.41 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.41; Received: by mail-vb0-f41.google.com with SMTP id p14so235985vbm.14 for ; Fri, 13 Dec 2013 19:27:08 -0800 (PST) X-Received: by 10.53.10.34 with SMTP id dx2mr2177977vdd.13.1386991628860; Fri, 13 Dec 2013 19:27:08 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp86959vcz; Fri, 13 Dec 2013 19:27:08 -0800 (PST) X-Received: by 10.66.182.199 with SMTP id eg7mr7088706pac.135.1386991628144; Fri, 13 Dec 2013 19:27:08 -0800 (PST) Received: from mail-pd0-f175.google.com (mail-pd0-f175.google.com [209.85.192.175]) by mx.google.com with ESMTPS id cz3si2958259pbc.243.2013.12.13.19.27.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Dec 2013 19:27:08 -0800 (PST) Received-SPF: neutral (google.com: 209.85.192.175 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) client-ip=209.85.192.175; Received: by mail-pd0-f175.google.com with SMTP id w10so3232576pde.6 for ; Fri, 13 Dec 2013 19:27:07 -0800 (PST) X-Received: by 10.66.163.74 with SMTP id yg10mr7176973pab.85.1386991627472; Fri, 13 Dec 2013 19:27:07 -0800 (PST) Received: from localhost.localdomain (c-67-170-153-23.hsd1.or.comcast.net. [67.170.153.23]) by mx.google.com with ESMTPSA id nw11sm11680086pab.13.2013.12.13.19.27.06 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Dec 2013 19:27:06 -0800 (PST) From: John Stultz To: LKML Cc: Greg KH , Android Kernel Team , Sumit Semwal , Jesse Barker , Colin Cross , John Stultz Subject: [PATCH 106/115] ion: allow cached mappings of chunk and system heap buffers Date: Fri, 13 Dec 2013 19:26:26 -0800 Message-Id: <1386991595-6251-14-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1386991595-6251-1-git-send-email-john.stultz@linaro.org> References: <1386973529-4884-1-git-send-email-john.stultz@linaro.org> <1386991595-6251-1-git-send-email-john.stultz@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: john.stultz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.41 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Colin Cross Now that ion_vm_fault uses vm_insert_pfn instead of vm_insert_page cached buffers can be supported in any heap. Remove the checks in the chunk and system heaps. Signed-off-by: Colin Cross Signed-off-by: John Stultz --- drivers/staging/android/ion/ion_chunk_heap.c | 3 --- drivers/staging/android/ion/ion_system_heap.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/drivers/staging/android/ion/ion_chunk_heap.c b/drivers/staging/android/ion/ion_chunk_heap.c index 4eacf52..34d1d18 100644 --- a/drivers/staging/android/ion/ion_chunk_heap.c +++ b/drivers/staging/android/ion/ion_chunk_heap.c @@ -47,9 +47,6 @@ static int ion_chunk_heap_allocate(struct ion_heap *heap, unsigned long num_chunks; unsigned long allocated_size; - if (ion_buffer_fault_user_mappings(buffer)) - return -ENOMEM; - allocated_size = ALIGN(size, chunk_heap->chunk_size); num_chunks = allocated_size / chunk_heap->chunk_size; diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c index a4bcf09..53afa33 100644 --- a/drivers/staging/android/ion/ion_system_heap.c +++ b/drivers/staging/android/ion/ion_system_heap.c @@ -148,9 +148,6 @@ static int ion_system_heap_allocate(struct ion_heap *heap, if (align > PAGE_SIZE) return -EINVAL; - if (ion_buffer_fault_user_mappings(buffer)) - return -EINVAL; - INIT_LIST_HEAD(&pages); while (size_remaining > 0) { info = alloc_largest_available(sys_heap, buffer, size_remaining, max_order);