Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d0bd31dc authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'xtensa-20180129' of git://github.com/jcmvbkbc/linux-xtensa

Pull Xtensa updates from Max Filippov:

 - add SSP support

 - add KASAN support

 - improvements to xtensa-specific assembly:
    - use ENTRY and ENDPROC consistently
    - clean up and unify word alignment macros
    - clean up and unify fixup marking
    - use 'call' instead of 'callx' where possible

 - various cleanups:
    - consiolidate kernel stack size related definitions
    - replace #ifdef'fed/commented out debug printk statements with
      pr_debug
    - use struct exc_table instead of flat array for exception handling
      data

 - build kernel with -mtext-section-literals; simplify xtensa linker
   script

 - fix futex_atomic_cmpxchg_inatomic()

* tag 'xtensa-20180129' of git://github.com/jcmvbkbc/linux-xtensa: (21 commits)
  xtensa: fix futex_atomic_cmpxchg_inatomic
  xtensa: shut up gcc-8 warnings
  xtensa: print kernel sections info in mem_init
  xtensa: use generic strncpy_from_user with KASAN
  xtensa: use __memset in __xtensa_clear_user
  xtensa: add support for KASAN
  xtensa: move fixmap and kmap just above the KSEG
  xtensa: don't clear swapper_pg_dir in paging_init
  xtensa: extract init_kio
  xtensa: implement early_trap_init
  xtensa: clean up exception handling structure
  xtensa: clean up custom-controlled debug output
  xtensa: enable stack protector
  xtensa: print hardware config ID on startup
  xtensa: consolidate kernel stack size related definitions
  xtensa: clean up functions in assembly code
  xtensa: clean up word alignment macros in assembly code
  xtensa: clean up fixups in assembly code
  xtensa: use call instead of callx in assembly code
  xtensa: build kernel with text-section-literals
  ...
parents aca21de2 ca474809
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -35,5 +35,5 @@
    |          um: | TODO |
    |   unicore32: | TODO |
    |         x86: |  ok  | 64-bit only
    |      xtensa: | TODO |
    |      xtensa: |  ok  |
    -----------------------
+1 −1
Original line number Diff line number Diff line
@@ -35,5 +35,5 @@
    |          um: | TODO |
    |   unicore32: | TODO |
    |         x86: |  ok  |
    |      xtensa: | TODO |
    |      xtensa: |  ok  |
    -----------------------
+42 −36
Original line number Diff line number Diff line
@@ -69,19 +69,10 @@ Default MMUv2-compatible layout.
| Userspace        |                           0x00000000  TASK_SIZE
+------------------+                           0x40000000
+------------------+
| Page table       |                           0x80000000
+------------------+                           0x80400000
| Page table       |  XCHAL_PAGE_TABLE_VADDR   0x80000000  XCHAL_PAGE_TABLE_SIZE
+------------------+
| KMAP area        |  PKMAP_BASE                           PTRS_PER_PTE *
|                  |                                       DCACHE_N_COLORS *
|                  |                                       PAGE_SIZE
|                  |                                       (4MB * DCACHE_N_COLORS)
+------------------+
| Atomic KMAP area |  FIXADDR_START                        KM_TYPE_NR *
|                  |                                       NR_CPUS *
|                  |                                       DCACHE_N_COLORS *
|                  |                                       PAGE_SIZE
+------------------+  FIXADDR_TOP              0xbffff000
| KASAN shadow map |  KASAN_SHADOW_START       0x80400000  KASAN_SHADOW_SIZE
+------------------+                           0x8e400000
+------------------+
| VMALLOC area     |  VMALLOC_START            0xc0000000  128MB - 64KB
+------------------+  VMALLOC_END
@@ -92,6 +83,17 @@ Default MMUv2-compatible layout.
| remap area 2     |
+------------------+
+------------------+
| KMAP area        |  PKMAP_BASE                           PTRS_PER_PTE *
|                  |                                       DCACHE_N_COLORS *
|                  |                                       PAGE_SIZE
|                  |                                       (4MB * DCACHE_N_COLORS)
+------------------+
| Atomic KMAP area |  FIXADDR_START                        KM_TYPE_NR *
|                  |                                       NR_CPUS *
|                  |                                       DCACHE_N_COLORS *
|                  |                                       PAGE_SIZE
+------------------+  FIXADDR_TOP              0xcffff000
+------------------+
| Cached KSEG      |  XCHAL_KSEG_CACHED_VADDR  0xd0000000  128MB
+------------------+
| Uncached KSEG    |  XCHAL_KSEG_BYPASS_VADDR  0xd8000000  128MB
@@ -109,19 +111,10 @@ Default MMUv2-compatible layout.
| Userspace        |                           0x00000000  TASK_SIZE
+------------------+                           0x40000000
+------------------+
| Page table       |                           0x80000000
+------------------+                           0x80400000
| Page table       |  XCHAL_PAGE_TABLE_VADDR   0x80000000  XCHAL_PAGE_TABLE_SIZE
+------------------+
| KMAP area        |  PKMAP_BASE                           PTRS_PER_PTE *
|                  |                                       DCACHE_N_COLORS *
|                  |                                       PAGE_SIZE
|                  |                                       (4MB * DCACHE_N_COLORS)
+------------------+
| Atomic KMAP area |  FIXADDR_START                        KM_TYPE_NR *
|                  |                                       NR_CPUS *
|                  |                                       DCACHE_N_COLORS *
|                  |                                       PAGE_SIZE
+------------------+  FIXADDR_TOP              0x9ffff000
| KASAN shadow map |  KASAN_SHADOW_START       0x80400000  KASAN_SHADOW_SIZE
+------------------+                           0x8e400000
+------------------+
| VMALLOC area     |  VMALLOC_START            0xa0000000  128MB - 64KB
+------------------+  VMALLOC_END
@@ -132,6 +125,17 @@ Default MMUv2-compatible layout.
| remap area 2     |
+------------------+
+------------------+
| KMAP area        |  PKMAP_BASE                           PTRS_PER_PTE *
|                  |                                       DCACHE_N_COLORS *
|                  |                                       PAGE_SIZE
|                  |                                       (4MB * DCACHE_N_COLORS)
+------------------+
| Atomic KMAP area |  FIXADDR_START                        KM_TYPE_NR *
|                  |                                       NR_CPUS *
|                  |                                       DCACHE_N_COLORS *
|                  |                                       PAGE_SIZE
+------------------+  FIXADDR_TOP              0xaffff000
+------------------+
| Cached KSEG      |  XCHAL_KSEG_CACHED_VADDR  0xb0000000  256MB
+------------------+
| Uncached KSEG    |  XCHAL_KSEG_BYPASS_VADDR  0xc0000000  256MB
@@ -150,19 +154,10 @@ Default MMUv2-compatible layout.
| Userspace        |                           0x00000000  TASK_SIZE
+------------------+                           0x40000000
+------------------+
| Page table       |                           0x80000000
+------------------+                           0x80400000
| Page table       |  XCHAL_PAGE_TABLE_VADDR   0x80000000  XCHAL_PAGE_TABLE_SIZE
+------------------+
| KMAP area        |  PKMAP_BASE                           PTRS_PER_PTE *
|                  |                                       DCACHE_N_COLORS *
|                  |                                       PAGE_SIZE
|                  |                                       (4MB * DCACHE_N_COLORS)
+------------------+
| Atomic KMAP area |  FIXADDR_START                        KM_TYPE_NR *
|                  |                                       NR_CPUS *
|                  |                                       DCACHE_N_COLORS *
|                  |                                       PAGE_SIZE
+------------------+  FIXADDR_TOP              0x8ffff000
| KASAN shadow map |  KASAN_SHADOW_START       0x80400000  KASAN_SHADOW_SIZE
+------------------+                           0x8e400000
+------------------+
| VMALLOC area     |  VMALLOC_START            0x90000000  128MB - 64KB
+------------------+  VMALLOC_END
@@ -173,6 +168,17 @@ Default MMUv2-compatible layout.
| remap area 2     |
+------------------+
+------------------+
| KMAP area        |  PKMAP_BASE                           PTRS_PER_PTE *
|                  |                                       DCACHE_N_COLORS *
|                  |                                       PAGE_SIZE
|                  |                                       (4MB * DCACHE_N_COLORS)
+------------------+
| Atomic KMAP area |  FIXADDR_START                        KM_TYPE_NR *
|                  |                                       NR_CPUS *
|                  |                                       DCACHE_N_COLORS *
|                  |                                       PAGE_SIZE
+------------------+  FIXADDR_TOP              0x9ffff000
+------------------+
| Cached KSEG      |  XCHAL_KSEG_CACHED_VADDR  0xa0000000  512MB
+------------------+
| Uncached KSEG    |  XCHAL_KSEG_BYPASS_VADDR  0xc0000000  512MB
+7 −0
Original line number Diff line number Diff line
@@ -15,6 +15,9 @@ config XTENSA
	select GENERIC_IRQ_SHOW
	select GENERIC_PCI_IOMAP
	select GENERIC_SCHED_CLOCK
	select GENERIC_STRNCPY_FROM_USER if KASAN
	select HAVE_ARCH_KASAN if MMU
	select HAVE_CC_STACKPROTECTOR
	select HAVE_DEBUG_KMEMLEAK
	select HAVE_DMA_API_DEBUG
	select HAVE_DMA_CONTIGUOUS
@@ -79,6 +82,10 @@ config VARIANT_IRQ_SWITCH
config HAVE_XTENSA_GPIO32
	def_bool n

config KASAN_SHADOW_OFFSET
	hex
	default 0x6e400000

menu "Processor type and features"

choice
+4 −3
Original line number Diff line number Diff line
@@ -42,10 +42,11 @@ export PLATFORM

# temporarily until string.h is fixed
KBUILD_CFLAGS += -ffreestanding -D__linux__

KBUILD_CFLAGS += -pipe -mlongcalls

KBUILD_CFLAGS += -pipe -mlongcalls -mtext-section-literals
KBUILD_CFLAGS += $(call cc-option,-mforce-no-pic,)
KBUILD_CFLAGS += $(call cc-option,-mno-serialize-volatile,)

KBUILD_AFLAGS += -mlongcalls -mtext-section-literals

ifneq ($(CONFIG_LD_NO_RELAX),)
LDFLAGS := --no-relax
Loading