From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f170.google.com (mail-pd0-f170.google.com [209.85.192.170]) by kanga.kvack.org (Postfix) with ESMTP id 60BA66B0035 for ; Fri, 8 Aug 2014 05:16:11 -0400 (EDT) Received: by mail-pd0-f170.google.com with SMTP id g10so6780715pdj.1 for ; Fri, 08 Aug 2014 02:16:11 -0700 (PDT) Received: from mga14.intel.com (mga14.intel.com. [192.55.52.115]) by mx.google.com with ESMTP id az2si2024158pdb.198.2014.08.08.02.16.09 for ; Fri, 08 Aug 2014 02:16:10 -0700 (PDT) From: "Sha, Ruibin" Subject: [PATCH] export the function kmap_flush_unused. Date: Fri, 8 Aug 2014 09:16:03 +0000 Message-ID: <3C85A229999D6B4A89FA64D4680BA6142C7DFA@SHSMSX101.ccr.corp.intel.com> Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_3C85A229999D6B4A89FA64D4680BA6142C7DFASHSMSX101ccrcorpi_" MIME-Version: 1.0 Sender: owner-linux-mm@kvack.org List-ID: To: "linux-kernel@vger.kernel.org" Cc: "linux-mm@kvack.org" , "mel@csn.ul.ie" , "a.p.zijlstra@chello.nl" , "mgorman@suse.de" , "mingo@redhat.com" , "Zhang, Yanmin" , "He, Bo" --_000_3C85A229999D6B4A89FA64D4680BA6142C7DFASHSMSX101ccrcorpi_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable export the function kmap_flush_unused. Scenario: When graphic driver need high memory spece, we use alloc_pages() to allocate. But if the allocated page has just been mapped in the KMAP space(like first kmap then kunmap) and no flush page happened on PKMAP, the page virtual address is not NULL.Then when we get that page and set page attribute like set_memory_uc and set_memory_wc, we hit error. fix: For that scenario,when we get the allocated page and its virtual address is not NULL, we would like first flush that page. So need export that function kmap_flush_unused. Signed-off-by: sha, ruibin --- mm/highmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/highmem.c b/mm/highmem.c index b32b70c..511299b 100644 --- a/mm/highmem.c +++ b/mm/highmem.c @@ -156,6 +156,7 @@ void kmap_flush_unused(void) flush_all_zero_pkmaps(); unlock_kmap(); } +EXPORT_SYMBOL(kmap_flush_unused); static inline unsigned long map_new_virtual(struct page *page) { -- 1.7.9.5 Best Regards --------------------------------------------------------------- Sha, Rui bin ( Robin ) +86 13817890945 Android System Integration Shanghai --_000_3C85A229999D6B4A89FA64D4680BA6142C7DFASHSMSX101ccrcorpi_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

export the function kmap_flush_unused.

Scenario:  When graphic driver need high memory spece, we use alloc_pa= ges()
         to allocate. But if the allocat= ed page has just been
         mapped in the KMAP space(like f= irst kmap then kunmap) and
         no flush page happened on PKMAP= , the page virtual address is
         not NULL.Then when we get that = page and set page attribute like
         set_memory_uc and set_memory_wc= , we hit error.

fix:       For that scenario,when we get the = allocated page and its virtual
           address is not= NULL, we would like first flush that page.
         So need export that function km= ap_flush_unused.

Signed-off-by: sha, ruibin <ruibin.sha@intel.com>

---
 mm/highmem.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/highmem.c b/mm/highmem.c
index b32b70c..511299b 100644
--- a/mm/highmem.c
+++ b/mm/highmem.c
@@ -156,6 +156,7 @@ void kmap_flush_unused(void)
      flush_all_zero_pkmaps();
      unlock_kmap();
 }
+EXPORT_SYMBOL(kmap_flush_unused);
 
 static inline unsigned long map_new_virtual(struct page *page)
 {
--
1.7.9.5

 

 

 

Best Regards

-------------------------------------------------------= --------

Sha, Ru= i bin ( Robin )

+86= 13817890945

Android= System Integration Shanghai

 

--_000_3C85A229999D6B4A89FA64D4680BA6142C7DFASHSMSX101ccrcorpi_-- -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org