Merge commit 'jwb/next' into next
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 3 Mar 2009 02:30:03 +0000 (13:30 +1100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 3 Mar 2009 02:30:03 +0000 (13:30 +1100)
1  2 
arch/powerpc/Kconfig
arch/powerpc/include/asm/highmem.h
arch/powerpc/include/asm/thread_info.h
arch/powerpc/kernel/head_booke.h

diff --combined arch/powerpc/Kconfig
index d11896b445b6a2459b7559008c3901cc0bd37d33,2d6d133c0edd9d807cd15d709c89c0f779829f4a..5c10af66fb518eb8f7b96ab519f40e1a94ed5bb4
@@@ -111,7 -111,6 +111,7 @@@ config PP
        select HAVE_FTRACE_MCOUNT_RECORD
        select HAVE_DYNAMIC_FTRACE
        select HAVE_FUNCTION_TRACER
 +      select HAVE_FUNCTION_GRAPH_TRACER
        select ARCH_WANT_OPTIONAL_GPIOLIB
        select HAVE_IDE
        select HAVE_IOREMAP_PROT
@@@ -410,6 -409,18 +410,18 @@@ config PPC_HAS_HASH_64
        depends on PPC64
        default n
  
+ config STDBINUTILS
+       bool "Using standard binutils settings"
+       depends on 44x
+       default y
+       help
+         Turning this option off allows you to select 256KB PAGE_SIZE on 44x.
+         Note, that kernel will be able to run only those applications,
+         which had been compiled using binutils later than 2.17.50.0.3 with
+         '-zmax-page-size' set to 256K (the default is 64K). Or, if using
+         the older binutils, you can patch them with a trivial patch, which
+         changes the ELF_MAXPAGESIZE definition from 0x10000 to 0x40000.
  choice
        prompt "Page size"
        default PPC_4K_PAGES
@@@ -445,6 -456,19 +457,19 @@@ config PPC_64K_PAGE
        bool "64k page size" if 44x || PPC_STD_MMU_64
        select PPC_HAS_HASH_64K if PPC_STD_MMU_64
  
+ config PPC_256K_PAGES
+       bool "256k page size" if 44x
+       depends on !STDBINUTILS && (!SHMEM || BROKEN)
+       help
+         Make the page size 256k.
+         As the ELF standard only requires alignment to support page
+         sizes up to 64k, you will need to compile all of your user
+         space applications with a non-standard binutils settings
+         (see the STDBINUTILS description for details).
+         Say N unless you know what you are doing.
  endchoice
  
  config FORCE_MAX_ZONEORDER
        default "9" if PPC_STD_MMU_32 && PPC_16K_PAGES
        range 7 64 if PPC_STD_MMU_32 && PPC_64K_PAGES
        default "7" if PPC_STD_MMU_32 && PPC_64K_PAGES
+       range 5 64 if PPC_STD_MMU_32 && PPC_256K_PAGES
+       default "5" if PPC_STD_MMU_32 && PPC_256K_PAGES
        range 11 64
        default "11"
        help
@@@ -833,6 -859,31 +860,6 @@@ config TASK_SIZ
        default "0x80000000" if PPC_PREP || PPC_8xx
        default "0xc0000000"
  
 -config CONSISTENT_START_BOOL
 -      bool "Set custom consistent memory pool address"
 -      depends on ADVANCED_OPTIONS && NOT_COHERENT_CACHE
 -      help
 -        This option allows you to set the base virtual address
 -        of the consistent memory pool.  This pool of virtual
 -        memory is used to make consistent memory allocations.
 -
 -config CONSISTENT_START
 -      hex "Base virtual address of consistent memory pool" if CONSISTENT_START_BOOL
 -      default "0xfd000000" if (NOT_COHERENT_CACHE && 8xx)
 -      default "0xff100000" if NOT_COHERENT_CACHE
 -
 -config CONSISTENT_SIZE_BOOL
 -      bool "Set custom consistent memory pool size"
 -      depends on ADVANCED_OPTIONS && NOT_COHERENT_CACHE
 -      help
 -        This option allows you to set the size of the
 -        consistent memory pool.  This pool of virtual memory
 -        is used to make consistent memory allocations.
 -
 -config CONSISTENT_SIZE
 -      hex "Size of consistent memory pool" if CONSISTENT_SIZE_BOOL
 -      default "0x00200000" if NOT_COHERENT_CACHE
 -
  config PIN_TLB
        bool "Pinned Kernel TLBs (860 ONLY)"
        depends on ADVANCED_OPTIONS && 8xx
index a286e47100b56aa77c82e6159d3abcb630b3fa34,a2907595067f94502aa066bf8b755bba80343727..545028f8648801ebf321fbcbdfdd987718434d40
@@@ -39,15 -39,15 +39,15 @@@ extern pte_t *pkmap_page_table
   * chunk of RAM.
   */
  /*
-  * We use one full pte table with 4K pages. And with 16K/64K pages pte
-  * table covers enough memory (32MB and 512MB resp.) that both FIXMAP
-  * and PKMAP can be placed in single pte table. We use 1024 pages for
-  * PKMAP in case of 16K/64K pages.
+  * We use one full pte table with 4K pages. And with 16K/64K/256K pages pte
+  * table covers enough memory (32MB/512MB/2GB resp.), so that both FIXMAP
+  * and PKMAP can be placed in a single pte table. We use 512 pages for PKMAP
+  * in case of 16K/64K/256K page sizes.
   */
  #ifdef CONFIG_PPC_4K_PAGES
  #define PKMAP_ORDER   PTE_SHIFT
  #else
- #define PKMAP_ORDER   10
+ #define PKMAP_ORDER   9
  #endif
  #define LAST_PKMAP    (1 << PKMAP_ORDER)
  #ifndef CONFIG_PPC_4K_PAGES
@@@ -99,7 -99,7 +99,7 @@@ static inline void *kmap_atomic_prot(st
  #ifdef CONFIG_DEBUG_HIGHMEM
        BUG_ON(!pte_none(*(kmap_pte-idx)));
  #endif
 -      __set_pte_at(&init_mm, vaddr, kmap_pte-idx, mk_pte(page, prot));
 +      __set_pte_at(&init_mm, vaddr, kmap_pte-idx, mk_pte(page, prot), 1);
        local_flush_tlb_page(NULL, vaddr);
  
        return (void*) vaddr;
index 995ab7b80f69e0aa4ac0538cb6d17cc8d36cdcb6,e04286f92f614e50adb1560f45d4a1dfdb2dc614..9aba5a38a7c4f32a011c6af5c3bd22e28e88d8a6
  
  /* We have 8k stacks on ppc32 and 16k on ppc64 */
  
- #ifdef CONFIG_PPC64
+ #if defined(CONFIG_PPC64)
  #define THREAD_SHIFT          14
+ #elif defined(CONFIG_PPC_256K_PAGES)
+ #define THREAD_SHIFT          15
  #else
  #define THREAD_SHIFT          13
  #endif
@@@ -154,13 -156,6 +156,13 @@@ static inline void set_restore_sigmask(
        ti->local_flags |= _TLF_RESTORE_SIGMASK;
        set_bit(TIF_SIGPENDING, &ti->flags);
  }
 +
 +#ifdef CONFIG_PPC64
 +#define is_32bit_task()       (test_thread_flag(TIF_32BIT))
 +#else
 +#define is_32bit_task()       (1)
 +#endif
 +
  #endif        /* !__ASSEMBLY__ */
  
  #endif /* __KERNEL__ */
index 38e242eb0ef8f835bb79008a6c7a1cb84025e9ec,69a4489bc86ad06c593632cf5958b8d33a3db9de..95f39f1e68d449036b0206735936513c60533cdc
                mtspr   SPRN_IVOR##vector_number,r26;   \
                sync
  
+ #if (THREAD_SHIFT < 15)
+ #define ALLOC_STACK_FRAME(reg, val)                   \
+       addi reg,reg,val
+ #else
+ #define ALLOC_STACK_FRAME(reg, val)                   \
+       addis   reg,reg,val@ha;                         \
+       addi    reg,reg,val@l
+ #endif
  #define NORMAL_EXCEPTION_PROLOG                                                    \
        mtspr   SPRN_SPRG0,r10;         /* save two registers to work with */\
        mtspr   SPRN_SPRG1,r11;                                              \
@@@ -20,7 -29,7 +29,7 @@@
        beq     1f;                                                          \
        mfspr   r1,SPRN_SPRG3;          /* if from user, start at top of   */\
        lwz     r1,THREAD_INFO-THREAD(r1); /* this thread's kernel stack   */\
-       addi    r1,r1,THREAD_SIZE;                                           \
+       ALLOC_STACK_FRAME(r1, THREAD_SIZE);                                  \
  1:    subi    r1,r1,INT_FRAME_SIZE;   /* Allocate an exception frame     */\
        mr      r11,r1;                                                      \
        stw     r10,_CCR(r11);          /* save various registers          */\
@@@ -279,7 -288,7 +288,7 @@@ label
        lwz     r11,GPR11(r8);                                                \
        mfspr   r8,DEBUG_SPRG;                                                \
                                                                              \
 -      RFDI;                                                                 \
 +      PPC_RFDI;                                                                     \
        b       .;                                                            \
                                                                              \
        /* continue normal handling for a debug exception... */               \
This page took 0.030168 seconds and 5 git commands to generate.