Advertisement
arter97

Untitled

Feb 25th, 2017
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.63 KB | None | 0 0
  1. diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
  2. index d594ce9d5875..ca82e5d7f861 100644
  3. --- a/arch/arm64/kernel/setup.c
  4. +++ b/arch/arm64/kernel/setup.c
  5. @@ -334,25 +334,6 @@ static void __init setup_machine_fdt(phys_addr_t dt_phys)
  6.     }
  7.  }
  8.  
  9. -/*
  10. - * Limit the memory size that was specified via FDT.
  11. - */
  12. -static int __init early_mem(char *p)
  13. -{
  14. -   phys_addr_t limit;
  15. -
  16. -   if (!p)
  17. -       return 1;
  18. -
  19. -   limit = memparse(p, &p) & PAGE_MASK;
  20. -   pr_notice("Memory limited to %lldMB\n", limit >> 20);
  21. -
  22. -   memblock_enforce_memory_limit(limit);
  23. -
  24. -   return 0;
  25. -}
  26. -early_param("mem", early_mem);
  27. -
  28.  static void __init request_standard_resources(void)
  29.  {
  30.     struct memblock_region *region;
  31. diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
  32. index bed06465ed62..3ecc4997ed4e 100644
  33. --- a/arch/arm64/mm/init.c
  34. +++ b/arch/arm64/mm/init.c
  35. @@ -138,10 +138,29 @@ static void arm64_memory_present(void)
  36.  }
  37.  #endif
  38.  
  39. +static phys_addr_t memory_limit = (phys_addr_t)ULLONG_MAX;
  40. +
  41. +/*
  42. + * Limit the memory size that was specified via FDT.
  43. + */
  44. +static int __init early_mem(char *p)
  45. +{
  46. +   if (!p)
  47. +       return 1;
  48. +
  49. +   memory_limit = memparse(p, &p) & PAGE_MASK;
  50. +   pr_notice("Memory limited to %lldMB\n", memory_limit >> 20);
  51. +
  52. +   return 0;
  53. +}
  54. +early_param("mem", early_mem);
  55. +
  56.  void __init arm64_memblock_init(void)
  57.  {
  58.     phys_addr_t dma_phys_limit = 0;
  59.  
  60. +   memblock_enforce_memory_limit(memory_limit);
  61. +
  62.     /*
  63.      * Register the kernel text, kernel data, initrd, and initial
  64.      * pagetables with memblock.
  65. diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h
  66. index 04477d68403f..4ece9e3579c0 100644
  67. --- a/arch/x86/boot/compressed/misc.h
  68. +++ b/arch/x86/boot/compressed/misc.h
  69. @@ -7,6 +7,7 @@
  70.   * we just keep it from happening
  71.   */
  72.  #undef CONFIG_PARAVIRT
  73. +#undef CONFIG_PARAVIRT_SPINLOCKS
  74.  #undef CONFIG_KASAN
  75.  #ifdef CONFIG_X86_32
  76.  #define _ASM_X86_DESC_H 1
  77. diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
  78. index b9c842a58fa5..3b645a0fef29 100644
  79. --- a/include/linux/compiler-gcc.h
  80. +++ b/include/linux/compiler-gcc.h
  81. @@ -114,13 +114,14 @@
  82.   * would be.
  83.   * [...]
  84.   */
  85. -#define __pure         __attribute__((pure))
  86. -#define __aligned(x)       __attribute__((aligned(x)))
  87. -#define __printf(a, b)     __attribute__((format(printf, a, b)))
  88. -#define __scanf(a, b)      __attribute__((format(scanf, a, b)))
  89. -#define __attribute_const__    __attribute__((__const__))
  90. -#define __maybe_unused     __attribute__((unused))
  91. -#define __always_unused        __attribute__((unused))
  92. +#define __pure             __attribute__((pure))
  93. +#define __aligned(x)           __attribute__((aligned(x)))
  94. +#define __printf(a, b)         __attribute__((format(printf, a, b)))
  95. +#define __scanf(a, b)          __attribute__((format(scanf, a, b)))
  96. +#define  noinline          __attribute__((noinline))
  97. +#define __attribute_const__        __attribute__((__const__))
  98. +#define __maybe_unused         __attribute__((unused))
  99. +#define __always_unused            __attribute__((unused))
  100.  
  101.  /* gcc version specific checks */
  102.  
  103. diff --git a/known-bugs b/known-bugs
  104. new file mode 100644
  105. index 000000000000..9b8758452ffe
  106. --- /dev/null
  107. +++ b/known-bugs
  108. @@ -0,0 +1,7 @@
  109. +1, Kernel build error when ARCH=arm with multi_v7_defconfig+CONFIG_SMP=n
  110. +   arch/arm/kernel/psci.c:287:115: error: redefinition of 'psci_init'
  111. +  This bug start from commit dbcfee724255ae1 ARM: 8457/1: psci-smp is built only for SMP
  112. +2, Kernel build error when ARCH=x86 with allmodconfig+CONFIG_OF=n or defconfig+CONFIG_KASAN=y
  113. +   include/linux/kasan.h:21:14: error: conflicting types for 'kasan_zero_pud'
  114. +   include/linux/kasan.h:20:14: error: conflicting types for 'kasan_zero_pmd'
  115. +  This bug is due to KASAN feature backporting
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement