linux-hexagon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* hexagon: CONFIG_PAGE_SIZE_1MB?
@ 2014-05-17 11:32 Paul Bolle
  2014-05-18 15:53 ` Rob Landley
  2014-05-21  0:25 ` rkuo
  0 siblings, 2 replies; 5+ messages in thread
From: Paul Bolle @ 2014-05-17 11:32 UTC (permalink / raw)
  To: Richard Kuo; +Cc: linux-hexagon

Richard,

0) There are two checks for CONFIG_PAGE_SIZE_1MB in Linux' hexagon code.
But there's no Kconfig symbol PAGE_SIZE_1MB.

1) There are two trivial solutions to this issue:
    diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig
    index 0fd6138f6203..fe3c235930a5 100644
    --- a/arch/hexagon/Kconfig
    +++ b/arch/hexagon/Kconfig
    @@ -148,6 +148,9 @@ config PAGE_SIZE_64KB
     config PAGE_SIZE_256KB
            bool "256KB"
    
    +config PAGE_SIZE_1MB
    +       bool "1MB"
    +
     endchoice
 
     source "mm/Kconfig"

and
    diff --git a/arch/hexagon/include/asm/page.h b/arch/hexagon/include/asm/page.h
    index 93f5669b4aa1..7bcec3c0447c 100644
    --- a/arch/hexagon/include/asm/page.h
    +++ b/arch/hexagon/include/asm/page.h
    @@ -45,11 +45,6 @@
     #define HEXAGON_L1_PTE_SIZE __HVM_PDE_S_256KB
     #endif
     
    -#ifdef CONFIG_PAGE_SIZE_1MB
    -#define PAGE_SHIFT 20
    -#define HEXAGON_L1_PTE_SIZE __HVM_PDE_S_1MB
    -#endif
    -
     /*
      *  These should be defined in hugetlb.h, but apparently not.
      *  "Huge" for us should be 4MB or 16MB, which are both represented
    diff --git a/arch/hexagon/include/asm/pgtable.h b/arch/hexagon/include/asm/pgtable.h
    index d8bd54fa431e..861a993afb7e 100644
    --- a/arch/hexagon/include/asm/pgtable.h
    +++ b/arch/hexagon/include/asm/pgtable.h
    @@ -111,10 +111,6 @@ extern unsigned long zero_page_mask;
     #define PTRS_PER_PTE 16
     #endif
     
    -#ifdef CONFIG_PAGE_SIZE_1MB
    -#define PTRS_PER_PTE 4
    -#endif
    -
     /*  Any bigger and the PTE disappears.  */
     #define pgd_ERROR(e) \
            printk(KERN_ERR "%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__,\


2) Which trivial solution would you prefer?


Paul Bolle

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: hexagon: CONFIG_PAGE_SIZE_1MB?
  2014-05-17 11:32 hexagon: CONFIG_PAGE_SIZE_1MB? Paul Bolle
@ 2014-05-18 15:53 ` Rob Landley
  2014-05-21  0:25 ` rkuo
  1 sibling, 0 replies; 5+ messages in thread
From: Rob Landley @ 2014-05-18 15:53 UTC (permalink / raw)
  To: Paul Bolle, Richard Kuo; +Cc: linux-hexagon

On 05/17/14 06:32, Paul Bolle wrote:
> Richard,
> 
> 0) There are two checks for CONFIG_PAGE_SIZE_1MB in Linux' hexagon code.
> But there's no Kconfig symbol PAGE_SIZE_1MB.

Query: did we ever get a hexagon emulator that lets civilians like
myself poke at it? I haven't been able to play with this target since I
lost access to the comet board...

Rob

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: hexagon: CONFIG_PAGE_SIZE_1MB?
  2014-05-17 11:32 hexagon: CONFIG_PAGE_SIZE_1MB? Paul Bolle
  2014-05-18 15:53 ` Rob Landley
@ 2014-05-21  0:25 ` rkuo
  2014-05-23 14:37   ` [PATCH] Hexagon: remove checks for CONFIG_PAGE_SIZE_1MB Paul Bolle
  1 sibling, 1 reply; 5+ messages in thread
From: rkuo @ 2014-05-21  0:25 UTC (permalink / raw)
  To: Paul Bolle; +Cc: linux-hexagon

On Sat, May 17, 2014 at 01:32:43PM +0200, Paul Bolle wrote:
> Richard,
> 
> 0) There are two checks for CONFIG_PAGE_SIZE_1MB in Linux' hexagon code.
> But there's no Kconfig symbol PAGE_SIZE_1MB.
> 
> 1) There are two trivial solutions to this issue:
>     diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig
>     index 0fd6138f6203..fe3c235930a5 100644
>     --- a/arch/hexagon/Kconfig
>     +++ b/arch/hexagon/Kconfig
>     @@ -148,6 +148,9 @@ config PAGE_SIZE_64KB
>      config PAGE_SIZE_256KB
>             bool "256KB"
>     
>     +config PAGE_SIZE_1MB
>     +       bool "1MB"
>     +
>      endchoice
>  
>      source "mm/Kconfig"
> 
> and
>     diff --git a/arch/hexagon/include/asm/page.h b/arch/hexagon/include/asm/page.h
>     index 93f5669b4aa1..7bcec3c0447c 100644
>     --- a/arch/hexagon/include/asm/page.h
>     +++ b/arch/hexagon/include/asm/page.h
>     @@ -45,11 +45,6 @@
>      #define HEXAGON_L1_PTE_SIZE __HVM_PDE_S_256KB
>      #endif
>      
>     -#ifdef CONFIG_PAGE_SIZE_1MB
>     -#define PAGE_SHIFT 20
>     -#define HEXAGON_L1_PTE_SIZE __HVM_PDE_S_1MB
>     -#endif
>     -
>      /*
>       *  These should be defined in hugetlb.h, but apparently not.
>       *  "Huge" for us should be 4MB or 16MB, which are both represented
>     diff --git a/arch/hexagon/include/asm/pgtable.h b/arch/hexagon/include/asm/pgtable.h
>     index d8bd54fa431e..861a993afb7e 100644
>     --- a/arch/hexagon/include/asm/pgtable.h
>     +++ b/arch/hexagon/include/asm/pgtable.h
>     @@ -111,10 +111,6 @@ extern unsigned long zero_page_mask;
>      #define PTRS_PER_PTE 16
>      #endif
>      
>     -#ifdef CONFIG_PAGE_SIZE_1MB
>     -#define PTRS_PER_PTE 4
>     -#endif
>     -
>      /*  Any bigger and the PTE disappears.  */
>      #define pgd_ERROR(e) \
>             printk(KERN_ERR "%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__,\
> 
> 
> 2) Which trivial solution would you prefer?

I'd go with just removing it from pgtable.h.  The last time we
tried anything that large, there were...  adverse side effects, like
overrunning one of the object counters in the slab allocator.


Thanks,
Richard Kuo



-- 

Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] Hexagon: remove checks for CONFIG_PAGE_SIZE_1MB
  2014-05-21  0:25 ` rkuo
@ 2014-05-23 14:37   ` Paul Bolle
  2014-05-29  2:31     ` rkuo
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Bolle @ 2014-05-23 14:37 UTC (permalink / raw)
  To: Richard Kuo; +Cc: linux-hexagon, linux-kernel

There are two checks for CONFIG_PAGE_SIZE_1MB in hexagon's code. But
there is no Kconfig symbol PAGE_SIZE_1MB. Remove these unneeded checks
and the code they hide.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
Untested.

Richard preferred this over the equally trivial patch to add an entry
for PAGE_SIZE_1MB.

 arch/hexagon/include/asm/page.h    | 5 -----
 arch/hexagon/include/asm/pgtable.h | 4 ----
 2 files changed, 9 deletions(-)

diff --git a/arch/hexagon/include/asm/page.h b/arch/hexagon/include/asm/page.h
index 93f5669b4aa1..7bcec3c0447c 100644
--- a/arch/hexagon/include/asm/page.h
+++ b/arch/hexagon/include/asm/page.h
@@ -45,11 +45,6 @@
 #define HEXAGON_L1_PTE_SIZE __HVM_PDE_S_256KB
 #endif
 
-#ifdef CONFIG_PAGE_SIZE_1MB
-#define PAGE_SHIFT 20
-#define HEXAGON_L1_PTE_SIZE __HVM_PDE_S_1MB
-#endif
-
 /*
  *  These should be defined in hugetlb.h, but apparently not.
  *  "Huge" for us should be 4MB or 16MB, which are both represented
diff --git a/arch/hexagon/include/asm/pgtable.h b/arch/hexagon/include/asm/pgtable.h
index d8bd54fa431e..861a993afb7e 100644
--- a/arch/hexagon/include/asm/pgtable.h
+++ b/arch/hexagon/include/asm/pgtable.h
@@ -111,10 +111,6 @@ extern unsigned long zero_page_mask;
 #define PTRS_PER_PTE 16
 #endif
 
-#ifdef CONFIG_PAGE_SIZE_1MB
-#define PTRS_PER_PTE 4
-#endif
-
 /*  Any bigger and the PTE disappears.  */
 #define pgd_ERROR(e) \
 	printk(KERN_ERR "%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__,\
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Hexagon: remove checks for CONFIG_PAGE_SIZE_1MB
  2014-05-23 14:37   ` [PATCH] Hexagon: remove checks for CONFIG_PAGE_SIZE_1MB Paul Bolle
@ 2014-05-29  2:31     ` rkuo
  0 siblings, 0 replies; 5+ messages in thread
From: rkuo @ 2014-05-29  2:31 UTC (permalink / raw)
  To: Paul Bolle; +Cc: linux-hexagon, linux-kernel

On Fri, May 23, 2014 at 04:37:25PM +0200, Paul Bolle wrote:
> There are two checks for CONFIG_PAGE_SIZE_1MB in hexagon's code. But
> there is no Kconfig symbol PAGE_SIZE_1MB. Remove these unneeded checks
> and the code they hide.
> 
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
> ---
> Untested.
> 
> Richard preferred this over the equally trivial patch to add an entry
> for PAGE_SIZE_1MB.
> 
>  arch/hexagon/include/asm/page.h    | 5 -----
>  arch/hexagon/include/asm/pgtable.h | 4 ----
>  2 files changed, 9 deletions(-)
> 

Thanks!

Acked-by: Richard Kuo <rkuo@codeaurora.org>

-- 

Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-05-29  2:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-17 11:32 hexagon: CONFIG_PAGE_SIZE_1MB? Paul Bolle
2014-05-18 15:53 ` Rob Landley
2014-05-21  0:25 ` rkuo
2014-05-23 14:37   ` [PATCH] Hexagon: remove checks for CONFIG_PAGE_SIZE_1MB Paul Bolle
2014-05-29  2:31     ` rkuo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).