1. 24 4月, 2018 3 次提交
    • S
      ARM: dts: da850: fix W=1 warnings with pinmux node · 94a82284
      Sekhar Nori 提交于
      Remove unused #address-cells and #size-cells from pinmux
      node. This fixes W=1 warnings of the type:
      
      arch/arm/boot/dts/da850-lcdk.dtb: Warning (avoid_unnecessary_addr_size): /soc@1c00000/pinmux@14120: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
      
      Tested on DA850 LCDK by checking output of:
      
      /sys/kernel/debug/pinctrl/1c14120.pinmux-pinctrl-single/pins
      
      before and after the change.
      Reviewed-by: NDavid Lechner <david@lechnology.com>
      Signed-off-by: NSekhar Nori <nsekhar@ti.com>
      94a82284
    • S
      ARM: dts: da850-lcdk: add unit name for memory node · 01de0be5
      Sekhar Nori 提交于
      Add unit name for memory node to squash the W=1 warning:
      
      arch/arm/boot/dts/da850-lcdk.dtb: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name
      
      While at it, drop the device_type property from memory
      node since its provided by da850.dtsi already.
      Reviewed-by: NDavid Lechner <david@lechnology.com>
      Signed-off-by: NSekhar Nori <nsekhar@ti.com>
      01de0be5
    • S
      ARM: dts: da850: get rid of skeleton.dtsi · 30f548ba
      Sekhar Nori 提交于
      skeleton.dtsi is deprecated. Drop its usage in da850.dtsi
      and move the nodes and properties included by it directly
      to keep the dtb same.
      
      The memory node has been changed to get rid of warnings
      (see below). It contains the memory base address as that is
      fixed for DA850 SoCs. But the size needs to be added by
      bootloader or a board specific dts.
      
      This gets rid of the following W=1 warnings:
      
      arch/arm/boot/dts/da850-enbw-cmc.dtb: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name
      arch/arm/boot/dts/da850-evm.dtb: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name
      arch/arm/boot/dts/da850-lego-ev3.dtb: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name
      Reviewed-by: NDavid Lechner <david@lechnology.com>
      Signed-off-by: NSekhar Nori <nsekhar@ti.com>
      30f548ba
  2. 12 4月, 2018 4 次提交
  3. 10 4月, 2018 1 次提交
  4. 09 4月, 2018 1 次提交
  5. 07 4月, 2018 1 次提交
    • M
      kbuild: mark $(targets) as .SECONDARY and remove .PRECIOUS markers · 54a702f7
      Masahiro Yamada 提交于
      GNU Make automatically deletes intermediate files that are updated
      in a chain of pattern rules.
      
      Example 1) %.dtb.o <- %.dtb.S <- %.dtb <- %.dts
      Example 2) %.o <- %.c <- %.c_shipped
      
      A couple of makefiles mark such targets as .PRECIOUS to prevent Make
      from deleting them, but the correct way is to use .SECONDARY.
      
        .SECONDARY
          Prerequisites of this special target are treated as intermediate
          files but are never automatically deleted.
      
        .PRECIOUS
          When make is interrupted during execution, it may delete the target
          file it is updating if the file was modified since make started.
          If you mark the file as precious, make will never delete the file
          if interrupted.
      
      Both can avoid deletion of intermediate files, but the difference is
      the behavior when Make is interrupted; .SECONDARY deletes the target,
      but .PRECIOUS does not.
      
      The use of .PRECIOUS is relatively rare since we do not want to keep
      partially constructed (possibly corrupted) targets.
      
      Another difference is that .PRECIOUS works with pattern rules whereas
      .SECONDARY does not.
      
        .PRECIOUS: $(obj)/%.lex.c
      
      works, but
      
        .SECONDARY: $(obj)/%.lex.c
      
      has no effect.  However, for the reason above, I do not want to use
      .PRECIOUS which could cause obscure build breakage.
      
      The targets specified as .SECONDARY must be explicit.  $(targets)
      contains all targets that need to include .*.cmd files.  So, the
      intermediates you want to keep are mostly in there.  Therefore, mark
      $(targets) as .SECONDARY.  It means primary targets are also marked
      as .SECONDARY, but I do not see any drawback for this.
      
      I replaced some .SECONDARY / .PRECIOUS markers with 'targets'.  This
      will make Kbuild search for non-existing .*.cmd files, but this is
      not a noticeable performance issue.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: NFrank Rowand <frowand.list@gmail.com>
      Acked-by: NIngo Molnar <mingo@kernel.org>
      54a702f7
  6. 06 4月, 2018 6 次提交
    • R
      ARM: sa1100/simpad: switch simpad CF to use gpiod APIs · 64b2f129
      Russell King 提交于
      Switch simpad's CF implementation to use the gpiod APIs.  The inverted
      detection is handled using gpiolib's native inversion abilities.
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      64b2f129
    • R
      ARM: sa1100/shannon: convert to generic CF sockets · b51af865
      Russell King 提交于
      Convert shannon to use the generic CF socket support.
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      b51af865
    • R
      ARM: sa1100/nanoengine: convert to generic CF sockets · 80c799db
      Russell King 提交于
      Convert nanoengine to use the generic CF socket support.
      Makefile fix from Arnd Bergmann <arnd@arndb.de>.
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      80c799db
    • H
      mm: fix races between swapoff and flush dcache · cb9f753a
      Huang Ying 提交于
      Thanks to commit 4b3ef9da ("mm/swap: split swap cache into 64MB
      trunks"), after swapoff the address_space associated with the swap
      device will be freed.  So page_mapping() users which may touch the
      address_space need some kind of mechanism to prevent the address_space
      from being freed during accessing.
      
      The dcache flushing functions (flush_dcache_page(), etc) in architecture
      specific code may access the address_space of swap device for anonymous
      pages in swap cache via page_mapping() function.  But in some cases
      there are no mechanisms to prevent the swap device from being swapoff,
      for example,
      
        CPU1					CPU2
        __get_user_pages()			swapoff()
          flush_dcache_page()
            mapping = page_mapping()
              ...				  exit_swap_address_space()
              ...				    kvfree(spaces)
              mapping_mapped(mapping)
      
      The address space may be accessed after being freed.
      
      But from cachetlb.txt and Russell King, flush_dcache_page() only care
      about file cache pages, for anonymous pages, flush_anon_page() should be
      used.  The implementation of flush_dcache_page() in all architectures
      follows this too.  They will check whether page_mapping() is NULL and
      whether mapping_mapped() is true to determine whether to flush the
      dcache immediately.  And they will use interval tree (mapping->i_mmap)
      to find all user space mappings.  While mapping_mapped() and
      mapping->i_mmap isn't used by anonymous pages in swap cache at all.
      
      So, to fix the race between swapoff and flush dcache, __page_mapping()
      is add to return the address_space for file cache pages and NULL
      otherwise.  All page_mapping() invoking in flush dcache functions are
      replaced with page_mapping_file().
      
      [akpm@linux-foundation.org: simplify page_mapping_file(), per Mike]
      Link: http://lkml.kernel.org/r/20180305083634.15174-1-ying.huang@intel.comSigned-off-by: N"Huang, Ying" <ying.huang@intel.com>
      Reviewed-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Mel Gorman <mgorman@techsingularity.net>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Chen Liqin <liqin.linux@gmail.com>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Ley Foon Tan <lftan@altera.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cb9f753a
    • H
      zboot: fix stack protector in compressed boot phase · 7bbaf27d
      Huacai Chen 提交于
      Calling __stack_chk_guard_setup() in decompress_kernel() is too late
      that stack checking always fails for decompress_kernel() itself.  So
      remove __stack_chk_guard_setup() and initialize __stack_chk_guard before
      we call decompress_kernel().
      
      Original code comes from ARM but also used for MIPS and SH, so fix them
      together.  If without this fix, compressed booting of these archs will
      fail because stack checking is enabled by default (>=4.16).
      
      Link: http://lkml.kernel.org/r/1522226933-29317-1-git-send-email-chenhc@lemote.com
      Fixes: 8779657d ("stackprotector: Introduce CONFIG_CC_STACKPROTECTOR_STRONG")
      Signed-off-by: NHuacai Chen <chenhc@lemote.com>
      Acked-by: NJames Hogan <jhogan@kernel.org>
      Acked-by: NKees Cook <keescook@chromium.org>
      Acked-by: NRich Felker <dalias@libc.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7bbaf27d
    • R
      ARM: decompressor: fix warning introduced in fortify patch · 5f8d561f
      Russell King 提交于
      Commit ee333554 ("ARM: 8749/1: Kconfig: Add ARCH_HAS_FORTIFY_SOURCE")
      introduced a new warning:
      
      arch/arm/boot/compressed/misc.c: In function 'fortify_panic':
      arch/arm/boot/compressed/misc.c:167:1: error: 'noreturn' function does return [-Werror]
      
      The simple solution would be to make 'error' a noreturn function, but
      this causes a prototype mismatch as the function is prototyped in
      several .c files.  So, move the function prototype to a new header.
      
      There are also a couple of variables that are also declared in several
      locations.  Clean this up while we are here.
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      5f8d561f
  7. 05 4月, 2018 8 次提交
  8. 03 4月, 2018 1 次提交
  9. 29 3月, 2018 4 次提交
  10. 28 3月, 2018 1 次提交
  11. 27 3月, 2018 10 次提交