1. 04 7月, 2019 1 次提交
  2. 03 6月, 2019 2 次提交
  3. 24 5月, 2019 3 次提交
  4. 21 5月, 2019 6 次提交
  5. 18 5月, 2019 1 次提交
  6. 17 5月, 2019 1 次提交
  7. 16 5月, 2019 2 次提交
    • M
      MIPS: Alchemy: add DMA masks for on-chip ethernet · b1e479e3
      Manuel Lauss 提交于
      Makes au1000-eth work again, tested on DB1500.
      Signed-off-by: NManuel Lauss <manuel.lauss@gmail.com>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: Linux-MIPS <linux-mips@linux-mips.org>
      b1e479e3
    • S
      clk: Remove io.h from clk-provider.h · 62e59c4e
      Stephen Boyd 提交于
      Now that we've gotten rid of clk_readl() we can remove io.h from the
      clk-provider header and push out the io.h include to any code that isn't
      already including the io.h header but using things like readl/writel,
      etc.
      
      Found with this grep:
      
        git grep -l clk-provider.h | grep '.c$' | xargs git grep -L 'linux/io.h' | \
        	xargs git grep -l \
      	-e '\<__iowrite32_copy\>' --or \
      	-e '\<__ioread32_copy\>' --or \
      	-e '\<__iowrite64_copy\>' --or \
      	-e '\<ioremap_page_range\>' --or \
      	-e '\<ioremap_huge_init\>' --or \
      	-e '\<arch_ioremap_pud_supported\>' --or \
      	-e '\<arch_ioremap_pmd_supported\>' --or \
      	-e '\<devm_ioport_map\>' --or \
      	-e '\<devm_ioport_unmap\>' --or \
      	-e '\<IOMEM_ERR_PTR\>' --or \
      	-e '\<devm_ioremap\>' --or \
      	-e '\<devm_ioremap_nocache\>' --or \
      	-e '\<devm_ioremap_wc\>' --or \
      	-e '\<devm_iounmap\>' --or \
      	-e '\<devm_ioremap_release\>' --or \
      	-e '\<devm_memremap\>' --or \
      	-e '\<devm_memunmap\>' --or \
      	-e '\<__devm_memremap_pages\>' --or \
      	-e '\<pci_remap_cfgspace\>' --or \
      	-e '\<arch_has_dev_port\>' --or \
      	-e '\<arch_phys_wc_add\>' --or \
      	-e '\<arch_phys_wc_del\>' --or \
      	-e '\<memremap\>' --or \
      	-e '\<memunmap\>' --or \
      	-e '\<arch_io_reserve_memtype_wc\>' --or \
      	-e '\<arch_io_free_memtype_wc\>' --or \
      	-e '\<__io_aw\>' --or \
      	-e '\<__io_pbw\>' --or \
      	-e '\<__io_paw\>' --or \
      	-e '\<__io_pbr\>' --or \
      	-e '\<__io_par\>' --or \
      	-e '\<__raw_readb\>' --or \
      	-e '\<__raw_readw\>' --or \
      	-e '\<__raw_readl\>' --or \
      	-e '\<__raw_readq\>' --or \
      	-e '\<__raw_writeb\>' --or \
      	-e '\<__raw_writew\>' --or \
      	-e '\<__raw_writel\>' --or \
      	-e '\<__raw_writeq\>' --or \
      	-e '\<readb\>' --or \
      	-e '\<readw\>' --or \
      	-e '\<readl\>' --or \
      	-e '\<readq\>' --or \
      	-e '\<writeb\>' --or \
      	-e '\<writew\>' --or \
      	-e '\<writel\>' --or \
      	-e '\<writeq\>' --or \
      	-e '\<readb_relaxed\>' --or \
      	-e '\<readw_relaxed\>' --or \
      	-e '\<readl_relaxed\>' --or \
      	-e '\<readq_relaxed\>' --or \
      	-e '\<writeb_relaxed\>' --or \
      	-e '\<writew_relaxed\>' --or \
      	-e '\<writel_relaxed\>' --or \
      	-e '\<writeq_relaxed\>' --or \
      	-e '\<readsb\>' --or \
      	-e '\<readsw\>' --or \
      	-e '\<readsl\>' --or \
      	-e '\<readsq\>' --or \
      	-e '\<writesb\>' --or \
      	-e '\<writesw\>' --or \
      	-e '\<writesl\>' --or \
      	-e '\<writesq\>' --or \
      	-e '\<inb\>' --or \
      	-e '\<inw\>' --or \
      	-e '\<inl\>' --or \
      	-e '\<outb\>' --or \
      	-e '\<outw\>' --or \
      	-e '\<outl\>' --or \
      	-e '\<inb_p\>' --or \
      	-e '\<inw_p\>' --or \
      	-e '\<inl_p\>' --or \
      	-e '\<outb_p\>' --or \
      	-e '\<outw_p\>' --or \
      	-e '\<outl_p\>' --or \
      	-e '\<insb\>' --or \
      	-e '\<insw\>' --or \
      	-e '\<insl\>' --or \
      	-e '\<outsb\>' --or \
      	-e '\<outsw\>' --or \
      	-e '\<outsl\>' --or \
      	-e '\<insb_p\>' --or \
      	-e '\<insw_p\>' --or \
      	-e '\<insl_p\>' --or \
      	-e '\<outsb_p\>' --or \
      	-e '\<outsw_p\>' --or \
      	-e '\<outsl_p\>' --or \
      	-e '\<ioread8\>' --or \
      	-e '\<ioread16\>' --or \
      	-e '\<ioread32\>' --or \
      	-e '\<ioread64\>' --or \
      	-e '\<iowrite8\>' --or \
      	-e '\<iowrite16\>' --or \
      	-e '\<iowrite32\>' --or \
      	-e '\<iowrite64\>' --or \
      	-e '\<ioread16be\>' --or \
      	-e '\<ioread32be\>' --or \
      	-e '\<ioread64be\>' --or \
      	-e '\<iowrite16be\>' --or \
      	-e '\<iowrite32be\>' --or \
      	-e '\<iowrite64be\>' --or \
      	-e '\<ioread8_rep\>' --or \
      	-e '\<ioread16_rep\>' --or \
      	-e '\<ioread32_rep\>' --or \
      	-e '\<ioread64_rep\>' --or \
      	-e '\<iowrite8_rep\>' --or \
      	-e '\<iowrite16_rep\>' --or \
      	-e '\<iowrite32_rep\>' --or \
      	-e '\<iowrite64_rep\>' --or \
      	-e '\<__io_virt\>' --or \
      	-e '\<pci_iounmap\>' --or \
      	-e '\<virt_to_phys\>' --or \
      	-e '\<phys_to_virt\>' --or \
      	-e '\<ioremap_uc\>' --or \
      	-e '\<ioremap\>' --or \
      	-e '\<__ioremap\>' --or \
      	-e '\<iounmap\>' --or \
      	-e '\<ioremap\>' --or \
      	-e '\<ioremap_nocache\>' --or \
      	-e '\<ioremap_uc\>' --or \
      	-e '\<ioremap_wc\>' --or \
      	-e '\<ioremap_wc\>' --or \
      	-e '\<ioremap_wt\>' --or \
      	-e '\<ioport_map\>' --or \
      	-e '\<ioport_unmap\>' --or \
      	-e '\<ioport_map\>' --or \
      	-e '\<ioport_unmap\>' --or \
      	-e '\<xlate_dev_kmem_ptr\>' --or \
      	-e '\<xlate_dev_mem_ptr\>' --or \
      	-e '\<unxlate_dev_mem_ptr\>' --or \
      	-e '\<virt_to_bus\>' --or \
      	-e '\<bus_to_virt\>' --or \
      	-e '\<memset_io\>' --or \
      	-e '\<memcpy_fromio\>' --or \
      	-e '\<memcpy_toio\>'
      
      I also reordered a couple includes when they weren't alphabetical and
      removed clk.h from kona, replacing it with clk-provider.h because
      that driver doesn't use clk consumer APIs.
      Acked-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Cc: Chen-Yu Tsai <wens@csie.org>
      Acked-by: NMaxime Ripard <maxime.ripard@bootlin.com>
      Acked-by: NTero Kristo <t-kristo@ti.com>
      Acked-by: NSekhar Nori <nsekhar@ti.com>
      Cc: Krzysztof Kozlowski <krzk@kernel.org>
      Acked-by: NMark Brown <broonie@kernel.org>
      Cc: Chris Zankel <chris@zankel.net>
      Acked-by: NMax Filippov <jcmvbkbc@gmail.com>
      Acked-by: NJohn Crispin <john@phrozen.org>
      Acked-by: NHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      62e59c4e
  8. 15 5月, 2019 5 次提交
    • M
      MIPS: mark __fls() and __ffs() as __always_inline · e9ea596c
      Masahiro Yamada 提交于
      This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common
      place.  We need to eliminate potential issues beforehand.
      
      If it is enabled for mips, the following errors are reported:
      
        arch/mips/mm/sc-mips.o: In function `mips_sc_prefetch_enable.part.2':
        sc-mips.c:(.text+0x98): undefined reference to `mips_gcr_base'
        sc-mips.c:(.text+0x9c): undefined reference to `mips_gcr_base'
        sc-mips.c:(.text+0xbc): undefined reference to `mips_gcr_base'
        sc-mips.c:(.text+0xc8): undefined reference to `mips_gcr_base'
        sc-mips.c:(.text+0xdc): undefined reference to `mips_gcr_base'
        arch/mips/mm/sc-mips.o:sc-mips.c:(.text.unlikely+0x44): more undefined references to `mips_gcr_base'
      
      Link: http://lkml.kernel.org/r/20190423034959.13525-7-yamada.masahiro@socionext.comSigned-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Boris Brezillon <bbrezillon@kernel.org>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Brian Norris <computersforpeace@gmail.com>
      Cc: Christophe Leroy <christophe.leroy@c-s.fr>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Marek Vasut <marek.vasut@gmail.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Malaterre <malat@debian.org>
      Cc: Miquel Raynal <miquel.raynal@bootlin.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Stefan Agner <stefan@agner.ch>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e9ea596c
    • M
      MIPS: mark mult_sh_align_mod() as __always_inline · 1221a585
      Masahiro Yamada 提交于
      This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common
      place.  We need to eliminate potential issues beforehand.
      
      If it is enabled for mips, the following error is reported:
      
        arch/mips/kernel/cpu-bugs64.c: In function 'mult_sh_align_mod.constprop':
        arch/mips/kernel/cpu-bugs64.c:33:2: error: asm operand 1 probably doesn't match constraints [-Werror]
          asm volatile(
          ^~~
        arch/mips/kernel/cpu-bugs64.c:33:2: error: asm operand 1 probably doesn't match constraints [-Werror]
          asm volatile(
          ^~~
        arch/mips/kernel/cpu-bugs64.c:33:2: error: impossible constraint in 'asm'
          asm volatile(
          ^~~
        arch/mips/kernel/cpu-bugs64.c:33:2: error: impossible constraint in 'asm'
          asm volatile(
          ^~~
      
      Link: http://lkml.kernel.org/r/20190423034959.13525-4-yamada.masahiro@socionext.comSigned-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Boris Brezillon <bbrezillon@kernel.org>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Brian Norris <computersforpeace@gmail.com>
      Cc: Christophe Leroy <christophe.leroy@c-s.fr>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Marek Vasut <marek.vasut@gmail.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Malaterre <malat@debian.org>
      Cc: Miquel Raynal <miquel.raynal@bootlin.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Stefan Agner <stefan@agner.ch>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1221a585
    • M
      mm: memblock: make keeping memblock memory opt-in rather than opt-out · 350e88ba
      Mike Rapoport 提交于
      Most architectures do not need the memblock memory after the page
      allocator is initialized, but only few enable ARCH_DISCARD_MEMBLOCK in the
      arch Kconfig.
      
      Replacing ARCH_DISCARD_MEMBLOCK with ARCH_KEEP_MEMBLOCK and inverting the
      logic makes it clear which architectures actually use memblock after
      system initialization and skips the necessity to add ARCH_DISCARD_MEMBLOCK
      to the architectures that are still missing that option.
      
      Link: http://lkml.kernel.org/r/1556102150-32517-1-git-send-email-rppt@linux.ibm.comSigned-off-by: NMike Rapoport <rppt@linux.ibm.com>
      Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Richard Kuo <rkuo@codeaurora.org>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Ley Foon Tan <lftan@altera.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Eric Biederman <ebiederm@xmission.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      350e88ba
    • C
      initramfs: poison freed initrd memory · f94f7434
      Christoph Hellwig 提交于
      Various architectures including x86 poison the freed initrd memory.  Do
      the same in the generic free_initrd_mem implementation and switch a few
      more architectures that are identical to the generic code over to it now.
      
      Link: http://lkml.kernel.org/r/20190213174621.29297-9-hch@lst.deSigned-off-by: NChristoph Hellwig <hch@lst.de>
      Acked-by: NMike Rapoport <rppt@linux.ibm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>	[arm64]
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>	[m68k]
      Cc: Steven Price <steven.price@arm.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Guan Xuetao <gxt@pku.edu.cn>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f94f7434
    • I
      mm/gup: change GUP fast to use flags rather than a write 'bool' · 73b0140b
      Ira Weiny 提交于
      To facilitate additional options to get_user_pages_fast() change the
      singular write parameter to be gup_flags.
      
      This patch does not change any functionality.  New functionality will
      follow in subsequent patches.
      
      Some of the get_user_pages_fast() call sites were unchanged because they
      already passed FOLL_WRITE or 0 for the write parameter.
      
      NOTE: It was suggested to change the ordering of the get_user_pages_fast()
      arguments to ensure that callers were converted.  This breaks the current
      GUP call site convention of having the returned pages be the final
      parameter.  So the suggestion was rejected.
      
      Link: http://lkml.kernel.org/r/20190328084422.29911-4-ira.weiny@intel.com
      Link: http://lkml.kernel.org/r/20190317183438.2057-4-ira.weiny@intel.comSigned-off-by: NIra Weiny <ira.weiny@intel.com>
      Reviewed-by: NMike Marshall <hubcap@omnibond.com>
      Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: John Hubbard <jhubbard@nvidia.com>
      Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Michal Hocko <mhocko@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      73b0140b
  9. 14 5月, 2019 2 次提交
  10. 10 5月, 2019 4 次提交
    • T
      MIPS: SGI-IP27: abstract chipset irq from bridge · e6308b6d
      Thomas Bogendoerfer 提交于
      Bridge ASIC is widely used in different SGI systems, but the connected
      chipset is either HUB, HEART or BEDROCK. This commit switches to
      irq domain hierarchy for hub and bridge interrupts to get bridge
      setup out of hub interrupt code.
      Signed-off-by: NThomas Bogendoerfer <tbogendoerfer@suse.de>
      [paul.burton@mips.com:
        Resolve conflict with commit 69a07a41 ("MIPS: SGI-IP27: rework HUB
        interrupts").]
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      e6308b6d
    • T
      MIPS: SGI-IP27: use generic PCI driver · a57140e9
      Thomas Bogendoerfer 提交于
      Converted bridge code to a platform driver using the PCI generic driver
      framework and use adding platform devices during xtalk scan. This allows
      easier sharing bridge driver for other SGI platforms like IP30 (Octane) and
      IP35 (Origin 3k, Fuel, Tezro).
      Signed-off-by: NThomas Bogendoerfer <tbogendoerfer@suse.de>
      [paul.burton@mips.com:
        - Leave __phys_to_dma(), __dma_to_phys() & pcibus_to_node() in
          arch/mips/pci/pci-ip27.c since the motivation for moving them
          disappeared when the driver stopped being moved to drivers/pci.]
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      a57140e9
    • P
      MIPS: Fix Ingenic SoCs sometimes reporting wrong ISA · 8041edb5
      Paul Cercueil 提交于
      The config0 register in the Xburst CPUs with a processor ID of
      PRID_COMP_INGENIC_D0 report themselves as MIPS32r2 compatible,
      but they don't actually support this ISA.
      Signed-off-by: NPaul Cercueil <paul@crapouillou.net>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: od@zcrc.me
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      8041edb5
    • F
      MIPS: perf: Fix build with CONFIG_CPU_BMIPS5000 enabled · 1b1f01b6
      Florian Fainelli 提交于
      arch/mips/kernel/perf_event_mipsxx.c: In function 'mipsxx_pmu_enable_event':
      arch/mips/kernel/perf_event_mipsxx.c:326:21: error: unused variable 'event' [-Werror=unused-variable]
        struct perf_event *event = container_of(evt, struct perf_event, hw);
                           ^~~~~
      
      Fix this by making use of IS_ENABLED() to simplify the code and avoid
      unnecessary ifdefery.
      
      Fixes: 84002c88 ("MIPS: perf: Fix perf with MT counting other threads")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: linux-mips@linux-mips.org
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-mips@vger.kernel.org
      Cc: stable@vger.kernel.org # v4.18+
      1b1f01b6
  11. 06 5月, 2019 3 次提交
    • D
      thermal/drivers/core: Remove the module Kconfig's option · 554b3529
      Daniel Lezcano 提交于
      The module support for the thermal subsystem makes little sense:
       - some subsystems relying on it are not modules, thus forcing the
         framework to be compiled in
       - it is compiled in for almost every configs, the remaining ones
         are a few platforms where I don't see why we can not switch the thermal
         to 'y'. The drivers can stay in tristate.
       - platforms need the thermal to be ready as soon as possible at boot time
         in order to mitigate
      
      Usually the subsystems framework are compiled-in and the plugs are as
      module.
      
      Remove the module option. The removal of the module related dead code will
      come after this patch gets in or is acked.
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: NGuenter Roeck <groeck@chromium.org>
      For mini2440:
      Acked-by: NKrzysztof Kozlowski <krzk@kernel.org>
      Acked-by: Paul Burton <paul.burton@mips.com> # MIPS part
      Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      554b3529
    • S
      mips: Manually call fdt_init_reserved_mem() method · 3751cbda
      Serge Semin 提交于
      Since memblock-patchset was introduced the reserved-memory nodes are
      supported being declared in dt-files. So these nodes are actually parsed
      during the arch setup procedure when the early_init_fdt_scan_reserved_mem()
      method is called. But due to the arch-specific boot mem_map container
      utilization we need to manually call the fdt_init_reserved_mem() method
      after all the available and reserved memory has been moved to memblock.
      The first function call performed before bootmem_init() by the
      early_init_fdt_scan_reserved_mem() routine fails due to the lack of any
      memblock memory regions to allocate from at that stage.
      Signed-off-by: NSerge Semin <fancer.lancer@gmail.com>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Mike Rapoport <rppt@linux.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Thomas Bogendoerfer <tbogendoerfer@suse.de>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Stefan Agner <stefan@agner.ch>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Serge Semin <Sergey.Semin@t-platforms.ru>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      3751cbda
    • S
      mips: Make sure dt memory regions are valid · 93fa5b28
      Serge Semin 提交于
      There are situations when memory regions coming from dts may be
      too big for the platform physical address space. This especially
      concerns XPA-capable systems. Bootloader may determine more than 4GB
      memory available and pass it to the kernel over dts memory node, while
      kernel is built without XPA/64BIT support. In this case the region
      may either simply be truncated by add_memory_region() method
      or by u64->phys_addr_t type casting. But in worst case the method
      can even drop the memory region if it exceeds PHYS_ADDR_MAX size.
      So lets make sure the retrieved from dts memory regions are valid,
      and if some of them aren't, just manually truncate them with a warning
      printed out.
      Signed-off-by: NSerge Semin <fancer.lancer@gmail.com>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Mike Rapoport <rppt@linux.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Thomas Bogendoerfer <tbogendoerfer@suse.de>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Stefan Agner <stefan@agner.ch>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Serge Semin <Sergey.Semin@t-platforms.ru>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      93fa5b28
  12. 04 5月, 2019 2 次提交
    • S
      mips: Perform early low memory test · 2f5bd036
      Serge Semin 提交于
      memblock subsystem provides a method to optionally test the passed
      memory region in case if it was requested via special kernel boot
      argument. Lets add the function at the bottom of the arch_mem_init()
      method. Testing at this point in the boot sequence should be safe since all
      critical areas are now reserved and a minimum of allocations have been
      done.
      Reviewed-by: NMatt Redfearn <matt.redfearn@mips.com>
      Signed-off-by: NSerge Semin <fancer.lancer@gmail.com>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Mike Rapoport <rppt@linux.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Thomas Bogendoerfer <tbogendoerfer@suse.de>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Stefan Agner <stefan@agner.ch>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Serge Semin <Sergey.Semin@t-platforms.ru>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      2f5bd036
    • S
      mips: Dump memblock regions for debugging · 30c8f4e4
      Serge Semin 提交于
      It is useful to have the whole memblock memory space printed to console
      when basic memlock initializations are done. It can be performed by
      ready-to-use method memblock_dump_all(), which prints the available
      and reserved memory spaces if memblock=debug kernel parameter is
      specified. Lets call it at the very end of arch_mem_init() function,
      when all memblock memory and reserved regions are defined, but before
      any serious allocation is performed.
      Signed-off-by: NSerge Semin <fancer.lancer@gmail.com>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Mike Rapoport <rppt@linux.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Thomas Bogendoerfer <tbogendoerfer@suse.de>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Stefan Agner <stefan@agner.ch>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Serge Semin <Sergey.Semin@t-platforms.ru>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      30c8f4e4
  13. 03 5月, 2019 8 次提交
    • S
      mips: Add reserve-nomap memory type support · 9b9a59db
      Serge Semin 提交于
      It might be necessary to prevent the virtual mapping creation for a
      requested memory region. For instance there is a "no-map" property
      indicating exactly this feature. In this case we need to not only
      reserve the specified region by pretending it doesn't exist in the
      memory space, but completely remove the range from system just by
      removing it from memblock. The same way it's done in default
      early_init_dt_reserve_memory_arch() method.
      Signed-off-by: NSerge Semin <fancer.lancer@gmail.com>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Matt Redfearn <matt.redfearn@mips.com>
      Cc: Mike Rapoport <rppt@linux.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Thomas Bogendoerfer <tbogendoerfer@suse.de>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Stefan Agner <stefan@agner.ch>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      9b9a59db
    • S
      mips: Use memblock to reserve the __nosave memory range · 4e50a35d
      Serge Semin 提交于
      Originally before legacy bootmem was removed, the memory for the range was
      correctly reserved by reserve_bootmem_region(). But since memblock has been
      selected for early memory allocation the function can be utilized only
      after paging is fully initialized (as it is done by memblock_free_all()
      function). So calling it from arch_mem_init() method is prone to errors,
      and at this stage we need to reserve the memory in the memblock allocator.
      Signed-off-by: NSerge Semin <fancer.lancer@gmail.com>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Matt Redfearn <matt.redfearn@mips.com>
      Cc: Mike Rapoport <rppt@linux.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Thomas Bogendoerfer <tbogendoerfer@suse.de>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Stefan Agner <stefan@agner.ch>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      4e50a35d
    • S
      mips: Discard post-CMA-init foreach loop · eadb6925
      Serge Semin 提交于
      Really the loop is pointless, since it walks over memblock-reserved
      memory regions and mark them as reserved in memblock. Before
      bootmem was removed from the kernel, this loop had been
      used to map the memory reserved by CMA into the legacy bootmem
      allocator. But now the early memory allocator is memblock,
      which is used by CMA for reservation, so we don't need any mapping
      anymore.
      Reviewed-by: NMatt Redfearn <matt.redfearn@mips.com>
      Signed-off-by: NSerge Semin <fancer.lancer@gmail.com>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Mike Rapoport <rppt@linux.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Thomas Bogendoerfer <tbogendoerfer@suse.de>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Stefan Agner <stefan@agner.ch>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      eadb6925
    • S
      mips: Reserve memory for the kernel image resources · b93ddc4f
      Serge Semin 提交于
      The reserved_end variable had been used by the bootmem_init() code
      to find a lowest limit of memory available for memmap blob. The original
      code just tried to find a free memory space higher than kernel was placed.
      This limitation seems justified for the memmap ragion search process, but
      I can't see any obvious reason to reserve the unused space below kernel
      seeing some platforms place it much higher than standard 1MB. Moreover
      the RELOCATION config enables it to be loaded at any memory address.
      So lets reserve the memory occupied by the kernel only, leaving the region
      below being free for allocations. After doing this we can now discard the
      code freeing a space between kernel _text and VMLINUX_LOAD_ADDRESS symbols
      since it's going to be free anyway (unless marked as reserved by
      platforms).
      Signed-off-by: NSerge Semin <fancer.lancer@gmail.com>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Matt Redfearn <matt.redfearn@mips.com>
      Cc: Mike Rapoport <rppt@linux.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Thomas Bogendoerfer <tbogendoerfer@suse.de>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Stefan Agner <stefan@agner.ch>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      b93ddc4f
    • P
      MIPS: Remove duplicate EBase configuration · de56d4c1
      Paul Burton 提交于
      Clean up our configuration of the EBase register by making
      configure_exception_vector() write to it unconditionally on systems
      implementing MIPSr2 or higher, and removing the duplicate code in
      per_cpu_trap_init(). The latter would have duplicated work on systems
      with vectored interrupts, and didn't set BEV for safety like the
      configure_exception_vector() version of the code does.
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Reviewed-by: NSerge Semin <fancer.lancer@gmail.com>
      Tested-by: NSerge Semin <fancer.lancer@gmail.com>
      Cc: linux-mips@vger.kernel.org
      de56d4c1
    • P
      MIPS: Sync icache for whole exception vector · 783454e2
      Paul Burton 提交于
      Rather than performing cache flushing for a fixed 0x400 bytes, use the
      actual size of the vector in order to ensure we cover all emitted code
      on systems that make use of vectored interrupts.
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NSerge Semin <fancer.lancer@gmail.com>
      Tested-by: NSerge Semin <fancer.lancer@gmail.com>
      Cc: linux-mips@vger.kernel.org
      783454e2
    • P
      MIPS: Always allocate exception vector for MIPSr2+ · 172dcd93
      Paul Burton 提交于
      Currently we allocate the exception vector on systems which use a
      vectored interrupt mode, but otherwise attempt to reuse whatever
      exception vector the bootloader uses.
      
      This can be problematic for a number of reasons:
      
        1) The memory isn't properly marked reserved in the memblock
           allocator. We've relied on the fact that EBase is generally in the
           memory below the kernel image which we don't free, but this is
           about to change.
      
        2) Recent versions of U-Boot place their exception vector high in
           kseg0, in memory which isn't protected by being lower than the
           kernel anyway & can end up being clobbered.
      
        3) We are unnecessarily reliant upon there being memory at the address
           EBase points to upon entry to the kernel. This is often the case,
           but if the bootloader doesn't configure EBase & leaves it with its
           default value then we rely upon there being memory at physical
           address 0 for no good reason.
      
      Improve this situation by allocating the exception vector in all cases
      when running on MIPSr2 or higher, and reserving the memory for MIPSr1 or
      lower. This ensures we don't clobber the exception vector in any
      configuration, and for MIPSr2 & higher removes the need for memory at
      physical address 0.
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Reviewed-by: NSerge Semin <fancer.lancer@gmail.com>
      Tested-by: NSerge Semin <fancer.lancer@gmail.com>
      Cc: linux-mips@vger.kernel.org
      172dcd93
    • P
      MIPS: Use memblock_phys_alloc() for exception vector · f995adb0
      Paul Burton 提交于
      Allocate the exception vector using memblock_phys_alloc() which gives us
      a physical address, rather than the previous convoluted setup which
      obtained a virtual address using memblock_alloc(), converted it to a
      physical address & then back to a virtual address.
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NSerge Semin <fancer.lancer@gmail.com>
      Tested-by: NSerge Semin <fancer.lancer@gmail.com>
      Cc: linux-mips@vger.kernel.org
      f995adb0