From patchwork Sat Jan 30 06:07:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 60847 Delivered-To: patches@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1550012lbb; Fri, 29 Jan 2016 22:08:05 -0800 (PST) X-Received: by 10.98.93.136 with SMTP id n8mr19662257pfj.88.1454134070272; Fri, 29 Jan 2016 22:07:50 -0800 (PST) Return-Path: Received: from mail-pf0-x22b.google.com (mail-pf0-x22b.google.com. [2607:f8b0:400e:c00::22b]) by mx.google.com with ESMTPS id y22si29168634pfi.57.2016.01.29.22.07.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Jan 2016 22:07:50 -0800 (PST) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c00::22b as permitted sender) client-ip=2607:f8b0:400e:c00::22b; Authentication-Results: mx.google.com; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c00::22b as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dkim=pass header.i=@linaro.org Received: by mail-pf0-x22b.google.com with SMTP id 65so53525996pfd.2 for ; Fri, 29 Jan 2016 22:07:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Wq6ypgfyRnH377Dj7YLMKD8VonIJIhG5+wUOqK8/H/I=; b=aTTj5UX9eQ5wmEwBYNMXZMc9hyxEte69GJ94zLjnIuyiJPlpfJ3m1qFxeAmRBu7pKe XgU1gRXPADkX2QY8X3dsF5TU/67VzO4A1r80+cJXVQkpMu8gds37MHD9leh17JPsv98N Nj8ZdIS7J8H4RRknsMk+003wgIFm2WHFZ0rpM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Wq6ypgfyRnH377Dj7YLMKD8VonIJIhG5+wUOqK8/H/I=; b=dNWIGgZ8ClhKqGzDCrDzOPlXYMWz7tJkfaNRILcMxfU94QZv+5rEo39FPUGcCCqKQx 5b/ynh6Kp7yI4Eh8aeC4VsR6lEZ7WwzToNLMRiz4pm9sHtf+X+DbgYmRoOc+OoQi68kp EVOwoBbafXOGrAyBz9HYg3Qx3nKU8DJr0OAJkaO+sSM1TqAHPgmLAX3kBpu5WIKILJQP YDyd7sgfE+5hYsDIgRIQIMElKT0KyNSxf1mi/rgVhP6RzHNYhaGQ88XgzCwAj/SAxN+o FOfkC1pIf3qGWVTsEWP9pzim+LZoPX3ius3Jdha7iF73CZbfLOSHkJAJL8LLYYbXQxJE 6LVg== X-Gm-Message-State: AG10YOQZlDlmseEBdtTwzCV5n6W0C3+AHqf5S/L/psAohFphY7aalQuj3eYHQvFSWVtbGMqZgO4= X-Received: by 10.98.14.68 with SMTP id w65mr20102389pfi.146.1454134069926; Fri, 29 Jan 2016 22:07:49 -0800 (PST) Return-Path: Received: from localhost.localdomain (c-76-115-103-22.hsd1.or.comcast.net. [76.115.103.22]) by smtp.gmail.com with ESMTPSA id z3sm27480774par.17.2016.01.29.22.07.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jan 2016 22:07:49 -0800 (PST) From: John Stultz To: lkml Cc: Amit Pundir , Android Kernel Team , Greg KH , Laura Abbott , Sumit Semwal , John Stultz Subject: [PATCH 9/9] staging: ion: Fix page pool cache policy Date: Fri, 29 Jan 2016 22:07:38 -0800 Message-Id: <1454134058-16466-10-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454134058-16466-1-git-send-email-john.stultz@linaro.org> References: <1454134058-16466-1-git-send-email-john.stultz@linaro.org> From: Amit Pundir Fix redundant "buffer->private_flags & ION_PRIV_FLAG_SHRINKER_FREE" checks in if(!cached ...) condition block. The previous patch, "ion: Handle the memory mapping correctly on x86", is broken on android-3.18+ kernels. It conflicts with upstream commit commit 53a91c68fa7b ("staging: ion: Add private buffer flag to skip page pooling on free"), and breaks the ION_PRIV_FLAG_SHRINKER_FREE private flag check logic. Cc: Android Kernel Team Cc: Greg KH Cc: Laura Abbott Cc: Sumit Semwal Reported-by: chenfeng Signed-off-by: Amit Pundir Signed-off-by: John Stultz --- drivers/staging/android/ion/ion_system_heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c index fa62cc4..57d115d 100644 --- a/drivers/staging/android/ion/ion_system_heap.c +++ b/drivers/staging/android/ion/ion_system_heap.c @@ -83,7 +83,7 @@ static void free_buffer_page(struct ion_system_heap *heap, unsigned int order = compound_order(page); bool cached = ion_buffer_cached(buffer); - if (!cached && !(buffer->private_flags & ION_PRIV_FLAG_SHRINKER_FREE)) { + if (!cached) { struct ion_page_pool *pool = heap->pools[order_to_index(order)]; if (buffer->private_flags & ION_PRIV_FLAG_SHRINKER_FREE) ion_page_pool_free_immediate(pool, page);