]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 8 Oct 2014 09:34:24 +0000 (05:34 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 8 Oct 2014 09:34:24 +0000 (05:34 -0400)
Pull arm64 updates from Catalin Marinas:
 - eBPF JIT compiler for arm64
 - CPU suspend backend for PSCI (firmware interface) with standard idle
   states defined in DT (generic idle driver to be merged via a
   different tree)
 - Support for CONFIG_DEBUG_SET_MODULE_RONX
 - Support for unmapped cpu-release-addr (outside kernel linear mapping)
 - set_arch_dma_coherent_ops() implemented and bus notifiers removed
 - EFI_STUB improvements when base of DRAM is occupied
 - Typos in KGDB macros
 - Clean-up to (partially) allow kernel building with LLVM
 - Other clean-ups (extern keyword, phys_addr_t usage)

* tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (51 commits)
  arm64: Remove unneeded extern keyword
  ARM64: make of_device_ids const
  arm64: Use phys_addr_t type for physical address
  aarch64: filter $x from kallsyms
  arm64: Use DMA_ERROR_CODE to denote failed allocation
  arm64: Fix typos in KGDB macros
  arm64: insn: Add return statements after BUG_ON()
  arm64: debug: don't re-enable debug exceptions on return from el1_dbg
  Revert "arm64: dmi: Add SMBIOS/DMI support"
  arm64: Implement set_arch_dma_coherent_ops() to replace bus notifiers
  of: amba: use of_dma_configure for AMBA devices
  arm64: dmi: Add SMBIOS/DMI support
  arm64: Correct ftrace calls to aarch64_insn_gen_branch_imm()
  arm64:mm: initialize max_mapnr using function set_max_mapnr
  setup: Move unmask of async interrupts after possible earlycon setup
  arm64: LLVMLinux: Fix inline arm64 assembly for use with clang
  arm64: pageattr: Correctly adjust unaligned start addresses
  net: bpf: arm64: fix module memory leak when JIT image build fails
  arm64: add PSCI CPU_SUSPEND based cpu_suspend support
  arm64: kernel: introduce cpu_init_idle CPU operation
  ...

1  2 
Documentation/networking/filter.txt
arch/arm64/kernel/process.c
arch/arm64/mm/init.c
kernel/module.c
scripts/mod/modpost.c

index d16f424c5e8d1e6484958401e6b8afec30803064,1842d4f8ae13731b96bdec3c16f54b05dedf2808..f4db0972ea38c9ab537d7e93c3f28c7e70bacf30
@@@ -462,9 -462,9 +462,9 @@@ JIT compile
  ------------
  
  The Linux kernel has a built-in BPF JIT compiler for x86_64, SPARC, PowerPC,
- ARM, MIPS and s390 and can be enabled through CONFIG_BPF_JIT. The JIT compiler
 -ARM, ARM64 and s390 and can be enabled through CONFIG_BPF_JIT. The JIT compiler
--is transparently invoked for each attached filter from user space or for
--internal kernel users if it has been previously enabled by root:
++ARM, ARM64, MIPS and s390 and can be enabled through CONFIG_BPF_JIT. The JIT
++compiler is transparently invoked for each attached filter from user space
++or for internal kernel users if it has been previously enabled by root:
  
    echo 1 > /proc/sys/net/core/bpf_jit_enable
  
index 29d48690f2ac59ef56d5384d1fde5db92f0624e7,bf669228a59f0cd134ef789129a22708846d758f..89f41f7d27dd2bc54da37bd850f5437f86b19630
@@@ -57,36 -57,10 +57,10 @@@ unsigned long __stack_chk_guard __read_
  EXPORT_SYMBOL(__stack_chk_guard);
  #endif
  
- static void setup_restart(void)
- {
-       /*
-        * Tell the mm system that we are going to reboot -
-        * we may need it to insert some 1:1 mappings so that
-        * soft boot works.
-        */
-       setup_mm_for_reboot();
-       /* Clean and invalidate caches */
-       flush_cache_all();
-       /* Turn D-cache off */
-       cpu_cache_off();
-       /* Push out any further dirty data, and ensure cache is empty */
-       flush_cache_all();
- }
  void soft_restart(unsigned long addr)
  {
-       typedef void (*phys_reset_t)(unsigned long);
-       phys_reset_t phys_reset;
-       setup_restart();
-       /* Switch to the identity mapping */
-       phys_reset = (phys_reset_t)virt_to_phys(cpu_reset);
-       phys_reset(addr);
+       setup_mm_for_reboot();
+       cpu_soft_restart(virt_to_phys(cpu_reset), addr);
        /* Should never get here */
        BUG();
  }
@@@ -230,27 -204,9 +204,27 @@@ void exit_thread(void
  {
  }
  
 +static void tls_thread_flush(void)
 +{
 +      asm ("msr tpidr_el0, xzr");
 +
 +      if (is_compat_task()) {
 +              current->thread.tp_value = 0;
 +
 +              /*
 +               * We need to ensure ordering between the shadow state and the
 +               * hardware state, so that we don't corrupt the hardware state
 +               * with a stale shadow state during context switch.
 +               */
 +              barrier();
 +              asm ("msr tpidrro_el0, xzr");
 +      }
 +}
 +
  void flush_thread(void)
  {
        fpsimd_flush_thread();
 +      tls_thread_flush();
        flush_ptrace_hw_breakpoint(current);
  }
  
diff --combined arch/arm64/mm/init.c
index adf5e07677d8e377208abc659d4f519a9c3a10f4,271e654d852ddceff9f3ba3bbc5d7b7fb95b3735..494297c698ca3966b3b1e94f747652e3e493476b
@@@ -149,7 -149,8 +149,7 @@@ void __init arm64_memblock_init(void
                memblock_reserve(__virt_to_phys(initrd_start), initrd_end - initrd_start);
  #endif
  
 -      if (!efi_enabled(EFI_MEMMAP))
 -              early_init_fdt_scan_reserved_mem();
 +      early_init_fdt_scan_reserved_mem();
  
        /* 4GB maximum for 32-bit only capable devices */
        if (IS_ENABLED(CONFIG_ZONE_DMA))
@@@ -255,7 -256,7 +255,7 @@@ static void __init free_unused_memmap(v
   */
  void __init mem_init(void)
  {
-       max_mapnr   = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map;
+       set_max_mapnr(pfn_to_page(max_pfn) - mem_map);
  
  #ifndef CONFIG_SPARSEMEM_VMEMMAP
        free_unused_memmap();
@@@ -333,14 -334,8 +333,14 @@@ static int keep_initrd
  
  void free_initrd_mem(unsigned long start, unsigned long end)
  {
 -      if (!keep_initrd)
 +      if (!keep_initrd) {
 +              if (start == initrd_start)
 +                      start = round_down(start, PAGE_SIZE);
 +              if (end == initrd_end)
 +                      end = round_up(end, PAGE_SIZE);
 +
                free_reserved_area((void *)start, (void *)end, 0, "initrd");
 +      }
  }
  
  static int __init keepinitrd_setup(char *__unused)
diff --combined kernel/module.c
index 8a0dc91eddbc1ab2a8fa70a18d0d7f3eae589939,3d52936031cc8784e2f779a5d53324a0f02aabc5..65586ffa0c9829ce0f75b21db76477ad5685c96f
@@@ -135,7 -135,7 +135,7 @@@ static int param_set_bool_enable_only(c
  }
  
  static const struct kernel_param_ops param_ops_bool_enable_only = {
 -      .flags = KERNEL_PARAM_FL_NOARG,
 +      .flags = KERNEL_PARAM_OPS_FL_NOARG,
        .set = param_set_bool_enable_only,
        .get = param_get_bool,
  };
@@@ -3388,7 -3388,7 +3388,7 @@@ static inline int is_arm_mapping_symbol
  {
        if (str[0] == '.' && str[1] == 'L')
                return true;
-       return str[0] == '$' && strchr("atd", str[1])
+       return str[0] == '$' && strchr("axtd", str[1])
               && (str[2] == '\0' || str[2] == '.');
  }
  
diff --combined scripts/mod/modpost.c
index 3b405c726ec51ab48e0de2c517b028f748994334,3017ec20e9f8d0003c9b7c2b409f770dcc089b29..d439856f81760b7e12497e2167d641120ccb4a39
@@@ -24,9 -24,9 +24,9 @@@
  #include "../../include/linux/export.h"
  
  /* Are we using CONFIG_MODVERSIONS? */
 -int modversions = 0;
 +static int modversions = 0;
  /* Warn about undefined symbols? (do so if we have vmlinux) */
 -int have_vmlinux = 0;
 +static int have_vmlinux = 0;
  /* Is CONFIG_MODULE_SRCVERSION_ALL set? */
  static int all_versions = 0;
  /* If we are modposting external module set to 1 */
@@@ -229,7 -229,7 +229,7 @@@ static struct symbol *find_symbol(cons
        return NULL;
  }
  
 -static struct {
 +static const struct {
        const char *str;
        enum export export;
  } export_list[] = {
@@@ -805,7 -805,7 +805,7 @@@ static int match(const char *sym, cons
  }
  
  /* sections that we do not want to do full section mismatch check on */
 -static const char *section_white_list[] =
 +static const char *const section_white_list[] =
  {
        ".comment*",
        ".debug*",
@@@ -882,18 -882,17 +882,18 @@@ static void check_section(const char *m
  #define MEM_EXIT_SECTIONS  ".memexit.*"
  
  /* init data sections */
 -static const char *init_data_sections[] = { ALL_INIT_DATA_SECTIONS, NULL };
 +static const char *const init_data_sections[] =
 +      { ALL_INIT_DATA_SECTIONS, NULL };
  
  /* all init sections */
 -static const char *init_sections[] = { ALL_INIT_SECTIONS, NULL };
 +static const char *const init_sections[] = { ALL_INIT_SECTIONS, NULL };
  
  /* All init and exit sections (code + data) */
 -static const char *init_exit_sections[] =
 +static const char *const init_exit_sections[] =
        {ALL_INIT_SECTIONS, ALL_EXIT_SECTIONS, NULL };
  
  /* data section */
 -static const char *data_sections[] = { DATA_SECTIONS, NULL };
 +static const char *const data_sections[] = { DATA_SECTIONS, NULL };
  
  
  /* symbols in .data that may refer to init/exit sections */
        "*_probe_one",                                                  \
        "*_console"
  
 -static const char *head_sections[] = { ".head.text*", NULL };
 -static const char *linker_symbols[] =
 +static const char *const head_sections[] = { ".head.text*", NULL };
 +static const char *const linker_symbols[] =
        { "__init_begin", "_sinittext", "_einittext", NULL };
  
  enum mismatch {
@@@ -930,7 -929,7 +930,7 @@@ struct sectioncheck 
        const char *symbol_white_list[20];
  };
  
 -const struct sectioncheck sectioncheck[] = {
 +static const struct sectioncheck sectioncheck[] = {
  /* Do not reference init/exit code/data from
   * normal code and data
   */
@@@ -1147,7 -1146,7 +1147,7 @@@ static Elf_Sym *find_elf_symbol(struct 
  
  static inline int is_arm_mapping_symbol(const char *str)
  {
-       return str[0] == '$' && strchr("atd", str[1])
+       return str[0] == '$' && strchr("axtd", str[1])
               && (str[2] == '\0' || str[2] == '.');
  }
  
@@@ -2212,7 -2211,7 +2212,7 @@@ int main(int argc, char **argv
        err = 0;
  
        for (mod = modules; mod; mod = mod->next) {
 -              char fname[strlen(mod->name) + 10];
 +              char fname[PATH_MAX];
  
                if (mod->skip)
                        continue;