1. 11 6月, 2018 1 次提交
  2. 24 5月, 2018 1 次提交
  3. 21 5月, 2018 1 次提交
  4. 15 5月, 2018 19 次提交
    • M
      MIPS: perf: Fix perf with MT counting other threads · 84002c88
      Matt Redfearn 提交于
      When perf is used in non-system mode, i.e. without specifying CPUs to
      count on, check_and_calc_range falls into the case when it sets
      M_TC_EN_ALL in the counter config_base. This has the impact of always
      counting for all of the threads in a core, even when the user has not
      requested it. For example this can be seen with a test program which
      executes 30002 instructions and 10000 branches running on one VPE and a
      busy load on the other VPE in the core. Without this commit, the
      expected count is not returned:
      
      taskset 4 dd if=/dev/zero of=/dev/null count=100000 & taskset 8 perf
      stat -e instructions:u,branches:u ./test_prog
      
       Performance counter stats for './test_prog':
      
                  103235      instructions:u
                   17015      branches:u
      
      In order to fix this, remove check_and_calc_range entirely and perform
      all of the logic in mipsxx_pmu_enable_event. Since
      mipsxx_pmu_enable_event now requires the range of the event, ensure that
      it is set by mipspmu_perf_event_encode in the same circumstances as
      before (i.e. #ifdef CONFIG_MIPS_MT_SMP && num_possible_cpus() > 1).
      
      The logic of mipsxx_pmu_enable_event now becomes:
      If the CPU is a BMIPS5000, then use the special vpe_id() implementation
      to select which VPE to count.
      If the counter has a range greater than a single VPE, i.e. it is a
      core-wide counter, then ensure that the counter is set up to count
      events from all TCs (though, since this is true by definition, is this
      necessary? Just enabling a core-wide counter in the per-VPE case appears
      experimentally to return the same counts. This is left in for now as the
      logic was present before).
      If the event is set up to count a particular CPU (i.e. system mode),
      then the VPE ID of that CPU is used for the counter.
      Otherwise, the event should be counted on the CPU scheduling this thread
      (this was the critical bit missing from the previous implementation) so
      the VPE ID of this CPU is used for the counter.
      
      With this commit, the same test as before returns the counts expected:
      
      taskset 4 dd if=/dev/zero of=/dev/null count=100000 & taskset 8 perf
      stat -e instructions:u,branches:u ./test_prog
      
       Performance counter stats for './test_prog':
      
                   30002      instructions:u
                   10000      branches:u
      Signed-off-by: NMatt Redfearn <matt.redfearn@mips.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      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: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/19138/Signed-off-by: NJames Hogan <jhogan@kernel.org>
      84002c88
    • M
      MIPS: perf: Use correct VPE ID when setting up VPE tracing · 840a8b55
      Matt Redfearn 提交于
      There are a couple of FIXME's in the perf code which state that
      cpu_data[event->cpu].vpe_id reports 0 for both CPUs. This is no longer
      the case, since the vpe_id is used extensively by SMP CPS.
      
      VPE local counting gets around this by using smp_processor_id() instead.
      As it happens this does work correctly to count events on the right VPE,
      but relies on 2 assumptions:
      a) Always having 2 VPEs / core.
      b) The hardware only paying attention to the least significant bit of
      the PERFCTL.VPEID field.
      If either of these assumptions change then the incorrect VPEs events
      will be counted.
      
      Fix this by replacing smp_processor_id() with
      cpu_vpe_id(&current_cpu_data), in the vpe_id() macro, and pass vpe_id()
      to M_PERFCTL_VPEID() when setting up PERFCTL.VPEID. The FIXME's can also
      be removed since they no longer apply.
      Signed-off-by: NMatt Redfearn <matt.redfearn@mips.com>
      Cc: Ralf Baechle <ralf@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: Florian Fainelli <f.fainelli@gmail.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/19137/Signed-off-by: NJames Hogan <jhogan@kernel.org>
      840a8b55
    • M
      MIPS: perf: More robustly probe for the presence of per-tc counters · 800fb712
      Matt Redfearn 提交于
      The presence of per TC performance counters is now detected by
      cpu-probe.c and indicated by MIPS_CPU_MT_PER_TC_PERF_COUNTERS in
      cpu_data. Switch detection of the feature to use this new flag rather
      than blindly testing the implementation specific config7 register with a
      magic number.
      Signed-off-by: NMatt Redfearn <matt.redfearn@mips.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Maciej W. Rozycki <macro@mips.com>
      Cc: Paul Burton <paul.burton@mips.com>
      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: Robert Richter <rric@kernel.org>
      Cc: linux-mips@linux-mips.org
      Cc: oprofile-list@lists.sf.net
      Patchwork: https://patchwork.linux-mips.org/patch/19142/Signed-off-by: NJames Hogan <jhogan@kernel.org>
      800fb712
    • M
      MIPS: Probe for MIPS MT perf counters per TC · 8270ab48
      Matt Redfearn 提交于
      Processors implementing the MIPS MT ASE may have performance counters
      implemented per core or per TC. Processors implemented by MIPS
      Technologies signify presence per TC through a bit in the implementation
      specific Config7 register. Currently the code which probes for their
      presence blindly reads a magic number corresponding to this bit, despite
      it potentially having a different meaning in the CPU implementation.
      
      Since CPU features are generally detected by cpu-probe.c, perform the
      detection here instead. Introduce cpu_set_mt_per_tc_perf which checks
      the bit in config7 and call it from MIPS CPUs known to implement this
      bit and the MT ASE, specifically, the 34K, 1004K and interAptiv.
      
      Once the presence of the per-tc counter is indicated in cpu_data, tests
      for it can be updated to use this flag.
      Suggested-by: NJames Hogan <jhogan@kernel.org>
      Signed-off-by: NMatt Redfearn <matt.redfearn@mips.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Matt Redfearn <matt.redfearn@mips.com>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: Maciej W. Rozycki <macro@mips.com>
      Cc: linux-mips@linux-mips.org>
      Patchwork: https://patchwork.linux-mips.org/patch/19136/Signed-off-by: NJames Hogan <jhogan@kernel.org>
      8270ab48
    • A
      MIPS: mscc: Connect phys to ports on ocelot_pcb123 · 8798e392
      Alexandre Belloni 提交于
      Add phy to switch port connections for PCB123 for internal PHYs.
      Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: linux-mips@linux-mips.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      8798e392
    • A
      MIPS: mscc: Add switch to ocelot · 49b03169
      Alexandre Belloni 提交于
      Ocelot has an integrated switch, add support for it.
      Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: linux-mips@linux-mips.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      49b03169
    • P
      MIPS: JZ4740: Drop old platform reset code · 1761ad8c
      Paul Cercueil 提交于
      This work is now performed by the watchdog driver directly.
      Signed-off-by: NPaul Cercueil <paul@crapouillou.net>
      Acked-by: NJames Hogan <jhogan@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
      Cc: Mathieu Malaterre <malat@debian.org>
      Cc: linux-mips@linux-mips.org
      Cc: linux-watchdog@vger.kernel.org
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      1761ad8c
    • P
      MIPS: qi_lb60: Enable the jz4740-wdt driver · c49173ff
      Paul Cercueil 提交于
      The watchdog is an useful piece of hardware, so there's no reason not to
      enable it.
      
      Besides, this is important for restart to work after the change in the
      next commit.
      
      This commit enables the Kconfig option in the qi_lb60 defconfig.
      Signed-off-by: NPaul Cercueil <paul@crapouillou.net>
      Acked-by: NJames Hogan <jhogan@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
      Cc: Mathieu Malaterre <malat@debian.org>
      Cc: linux-mips@linux-mips.org
      Cc: linux-watchdog@vger.kernel.org
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      c49173ff
    • P
      MIPS: JZ4780: dts: Fix watchdog node · 9a0225d9
      Paul Cercueil 提交于
      - The previous node requested a memory area of 0x100 bytes, while the
        driver only manipulates four registers present in the first 0x10 bytes.
      
      - The driver requests for the "rtc" clock, but the previous node did not
        provide any.
      Signed-off-by: NPaul Cercueil <paul@crapouillou.net>
      Reviewed-by: NMathieu Malaterre <malat@debian.org>
      Acked-by: NJames Hogan <jhogan@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
      Cc: Mathieu Malaterre <malat@debian.org>
      Cc: linux-mips@linux-mips.org
      Cc: devicetree@vger.kernel.org
      Cc: linux-watchdog@vger.kernel.org
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      9a0225d9
    • P
      MIPS: JZ4740: dts: Add bindings for the jz4740-wdt driver · fbc23c71
      Paul Cercueil 提交于
      Also remove the watchdog platform_device from platform.c, since it
      wasn't used anywhere anyway.
      Signed-off-by: NPaul Cercueil <paul@crapouillou.net>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Malaterre <malat@debian.org>
      Cc: linux-mips@linux-mips.org
      Cc: linux-watchdog@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      [jhogan@kernel.org: Drop jz4740_wdt_device declaration from header]
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      fbc23c71
    • P
      watchdog: JZ4740: Drop module remove function · b6559c8c
      Paul Cercueil 提交于
      When the watchdog was configured for nowayout, and after the
      userspace watchdog daemon closed the dev node without sending the
      magic character, unloading this module stopped the watchdog
      hardware, which was clearly a problem.
      
      Besides, unloading the module is not possible when the userspace
      watchdog daemon is running, so it's safe to assume that we don't
      need to stop the watchdog hardware in the jz4740_wdt_remove()
      function.
      
      For this reason, the jz4740_wdt_remove() function can then be
      dropped alltogether.
      Signed-off-by: NPaul Cercueil <paul@crapouillou.net>
      Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
      Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
      Cc: Mathieu Malaterre <malat@debian.org>
      Cc: linux-watchdog@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      b6559c8c
    • P
      watchdog: JZ4740: Register a restart handler · b4918057
      Paul Cercueil 提交于
      The watchdog driver can restart the system by simply configuring the
      hardware for a timeout of 0 seconds.
      Signed-off-by: NPaul Cercueil <paul@crapouillou.net>
      Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
      Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
      Cc: Mathieu Malaterre <malat@debian.org>
      Cc: linux-watchdog@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      b4918057
    • P
      watchdog: JZ4740: Use devm_* functions · 6bdbc1f7
      Paul Cercueil 提交于
      - Use devm_clk_get instead of clk_get
      - Use devm_watchdog_register_device instead of watchdog_register_device
      Signed-off-by: NPaul Cercueil <paul@crapouillou.net>
      Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
      Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
      Cc: Mathieu Malaterre <malat@debian.org>
      Cc: linux-watchdog@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      6bdbc1f7
    • P
      watchdog: JZ4740: Disable clock after stopping counter · 212c1054
      Paul Cercueil 提交于
      Previously, the clock was disabled first, which makes the watchdog
      component insensitive to register writes.
      Signed-off-by: NPaul Cercueil <paul@crapouillou.net>
      Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
      Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
      Cc: Mathieu Malaterre <malat@debian.org>
      Cc: linux-watchdog@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      212c1054
    • C
      MIPS: VPE: Fix spelling mistake: "uneeded" -> "unneeded" · aae22f16
      Colin Ian King 提交于
      Trivial fix to spelling mistake in pr_warn message text.
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Cc: kernel-janitors@vger.kernel.org
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      aae22f16
    • A
      MIPS: Re-use kstrtobool_from_user() · f83e4e1e
      Andy Shevchenko 提交于
      Re-use kstrtobool_from_user() instead of open coded variant.
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      f83e4e1e
    • B
      MIPS: Convert update_persistent_clock() to update_persistent_clock64() · f06e7aa4
      Baolin Wang 提交于
      Since struct timespec is not y2038 safe on 32bit machines, this patch
      converts update_persistent_clock() to update_persistent_clock64() using
      struct timespec64.
      
      The rtc_mips_set_time() and rtc_mips_set_mmss() interfaces were using
      'unsigned long' type that is not y2038 safe on 32bit machines, moreover
      there is only one platform implementing rtc_mips_set_time() and two
      platforms implementing rtc_mips_set_mmss(), so we can just make them each
      implement update_persistent_clock64() directly, to get that helper out
      of the common mips code by removing rtc_mips_set_time() and
      rtc_mips_set_mmss() interfaces.
      Signed-off-by: NBaolin Wang <baolin.wang@linaro.org>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: linux-mips@linux-mips.org
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      f06e7aa4
    • B
      MIPS: Convert read_persistent_clock() to read_persistent_clock64() · 09adad17
      Baolin Wang 提交于
      Since struct timespec is not y2038 safe on 32bit machines, this patch
      converts read_persistent_clock() to read_persistent_clock64() using
      struct timespec64, as well as converting mktime() to mktime64().
      Signed-off-by: NBaolin Wang <baolin.wang@linaro.org>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: linux-mips@linux-mips.org
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      09adad17
    • B
      MIPS: sni: Remove the read_persistent_clock() · d7c72c57
      Baolin Wang 提交于
      The dummy read_persistent_clock() uses a timespec, which is not year
      2038 safe on 32bit systems. Thus remove this obsolete interface.
      Signed-off-by: NBaolin Wang <baolin.wang@linaro.org>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/19114/Signed-off-by: NJames Hogan <jhogan@kernel.org>
      d7c72c57
  5. 23 4月, 2018 18 次提交
    • R
      MIPS: BCM47XX: Use __initdata for the bcm47xx_leds_pdata · 23f8adc4
      Rafał Miłecki 提交于
      This struct variable is used during init only. It gets passed to the
      gpio_led_register_device() which creates its own data copy. That allows
      using __initdata and saving some minimal amount of memory.
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Reviewed-by: NAaro Koskinen <aaro.koskinen@iki.fi>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Hauke Mehrtens <hauke@hauke-m.de>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/18928/Signed-off-by: NJames Hogan <jhogan@kernel.org>
      23f8adc4
    • A
      MIPS: Use generic GCC library routines from lib/ · 740129b3
      Antony Pavlov 提交于
      The commit b35cd988 ("lib: Add shared copies of some GCC library
      routines") makes it possible to share generic GCC library routines by
      several architectures.
      
      This commit removes several generic GCC library routines from
      arch/mips/lib/ in favour of similar routines from lib/.
      Signed-off-by: NAntony Pavlov <antonynpavlov@gmail.com>
      [Matt Redfearn] Use GENERIC_LIB_* named Kconfig entries
      Signed-off-by: NMatt Redfearn <matt.redfearn@mips.com>
      Cc: Palmer Dabbelt <palmer@sifive.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/19051/Signed-off-by: NJames Hogan <jhogan@kernel.org>
      740129b3
    • M
      MIPS: vmlinuz: Use generic ashldi3 · 9ed491b8
      Matt Redfearn 提交于
      In preparation for removing some of the MIPS compiler intrinsics from
      arch/mips/lib, first update the build of vmlinuz to use the generic
      ashldi3 from lib.
      
      Both ashldi3 and bswapsi objects need to be built with different CFLAGS
      for inclusion to vmlinuz rather than simply including the object built
      for the main kernel image. The objects cannot be built directly from
      source, since CONFIG_MODVERSIONS changes cmd_cc_o_c to prevent this.
      
      Split the rule to ship ashldi3 and bswapsi from the relevant source
      locations.
      
      These files make no reference to other files in their directory, so the
      additional CFLAGS are apparently unnecessary - remove them as well.
      Signed-off-by: NMatt Redfearn <matt.redfearn@mips.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Palmer Dabbelt <palmer@sifive.com>
      Cc: Antony Pavlov <antonynpavlov@gmail.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/19050/
      [jhogan@kernel.org: Add if_changed and FORCE to fix build failure when
       arch/mips/boot/compressed/ashldi3.c is already generated but there is
       no .ashldi3.c.cmd file yet]
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      9ed491b8
    • M
      lib: Rename compiler intrinsic selects to GENERIC_LIB_* · e3d59805
      Matt Redfearn 提交于
      When these are included into arch Kconfig files, maintaining
      alphabetical ordering of the selects means these get split up. To allow
      for keeping things tidier and alphabetical, rename the selects to
      GENERIC_LIB_*
      Signed-off-by: NMatt Redfearn <matt.redfearn@mips.com>
      Acked-by: NPalmer Dabbelt <palmer@sifive.com>
      Cc: Antony Pavlov <antonynpavlov@gmail.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-riscv@lists.infradead.org
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/19049/Signed-off-by: NJames Hogan <jhogan@kernel.org>
      e3d59805
    • P
      Add notrace to lib/ucmpdi2.c · aad5a537
      Palmer Dabbelt 提交于
      As part of the MIPS conversion to use the generic GCC library routines,
      Matt Redfearn discovered that I'd missed a notrace on __ucmpdi2().  This
      patch rectifies the problem.
      Signed-off-by: NPalmer Dabbelt <palmer@sifive.com>
      Reviewed-by: NMatt Redfearn <matt.redfearn@mips.com>
      Signed-off-by: NMatt Redfearn <matt.redfearn@mips.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Matt Redfearn <matt.redfearn@mips.com>
      Cc: Antony Pavlov <antonynpavlov@gmail.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/19048/Signed-off-by: NJames Hogan <jhogan@kernel.org>
      aad5a537
    • R
      firmware: bcm47xx_nvram: Support small (0x6000 B) NVRAM partitions · 3bc65051
      Rafał Miłecki 提交于
      Some old devices with 4 MiB flashes were using 0x1000 block size and
      could use smaller (0x6000 bytes) flash partition for storing NVRAM
      content. This adds support for reading NVRAM on Netgear WNR1000 V3.
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Hauke Mehrtens <hauke@hauke-m.de>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/19005/Signed-off-by: NJames Hogan <jhogan@kernel.org>
      3bc65051
    • R
      MIPS: BCM47XX: Add support for Netgear WNR1000 V3 · 425f1e62
      Rafał Miłecki 提交于
      This adds support for detecting this model board and registers some LEDs
      and buttons.
      
      There are two uncommon things regarding this device:
      1) It can use two different "board_id" ID values.
         Unit I have uses "U12H139T00_NETGEAR" value. This magic is also used
         in firmware file header. There are two reports (one from an OpenWrt
         user) of a different "U12H139T50_NETGEAR" magic though.
      2) Power LEDs share GPIOs with buttons.
         Amber one seems to share GPIO 2 with WPS button and green one seems
         to share GPIO 3 with reset button. It remains unknown how to support
         them and handle buttons at the same time. For that reason they aren't
         added to the list of supported LEDs.
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Hauke Mehrtens <hauke@hauke-m.de>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/19004/Signed-off-by: NJames Hogan <jhogan@kernel.org>
      425f1e62
    • M
      MIPS: dts: Avoid unneeded built-in.a in DTS dirs · fca3aa16
      Masahiro Yamada 提交于
      arch/mips/boot/dts/Makefile collects objects from sub-directories into
      built-in.a only when CONFIG_BUILTIN_DTB is enabled. Reflect it also to
      the sub-directory Makefiles. This suppresses unneeded built-in.a
      creation in arch/mips/boot/dts/*/ directories.
      
      While I am here, I replaced $(patsubst %.dtb, %.dtb.o, $(dtb-y)) with
      $(addsuffix .o, $(dtb-y)) to simplify the code a little bit.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Cercueil <paul@crapouillou.net>
      Cc: Mathieu Malaterre <malat@debian.org>
      Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: linux-mips@linux-mips.org
      Cc: devicetree@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/19099/Signed-off-by: NJames Hogan <jhogan@kernel.org>
      fca3aa16
    • L
      Linux 4.17-rc2 · 6d08b06e
      Linus Torvalds 提交于
      6d08b06e
    • L
      Merge tag 'drm-fixes-for-v4.17-rc2' of git://people.freedesktop.org/~airlied/linux · 867ab4b2
      Linus Torvalds 提交于
      Pull drm fixes from Dave Airlie:
       "Exynos, i915, vc4, amdgpu fixes.
      
        i915:
         - an oops fix
         - two race fixes
         - some gvt fixes
      
        amdgpu:
         - dark screen fix
         - clk/voltage fix
         - vega12 smu fix
      
        vc4:
         - memory leak fix
      
        exynos just drops some code"
      
      * tag 'drm-fixes-for-v4.17-rc2' of git://people.freedesktop.org/~airlied/linux: (23 commits)
        drm/amd/powerplay: header file interface to SMU update
        drm/amd/pp: Fix bug voltage can't be OD separately on VI
        drm/amd/display: Don't program bypass on linear regamma LUT
        drm/i915: Fix LSPCON TMDS output buffer enabling from low-power state
        drm/i915/audio: Fix audio detection issue on GLK
        drm/i915: Call i915_perf_fini() on init_hw error unwind
        drm/i915/bios: filter out invalid DDC pins from VBT child devices
        drm/i915/pmu: Inspect runtime PM state more carefully while estimating RC6
        drm/i915: Do no use kfree() to free a kmem_cache_alloc() return value
        drm/exynos: exynos_drm_fb -> drm_framebuffer
        drm/exynos: Move dma_addr out of exynos_drm_fb
        drm/exynos: Move GEM BOs to drm_framebuffer
        drm: Fix HDCP downstream dev count read
        drm/vc4: Fix memory leak during BO teardown
        drm/i915/execlists: Clear user-active flag on preemption completion
        drm/i915/gvt: Add drm_format_mod update
        drm/i915/gvt: Disable primary/sprite/cursor plane at virtual display initialization
        drm/i915/gvt: Delete redundant error message in fb_decode.c
        drm/i915/gvt: Cancel dma map when resetting ggtt entries
        drm/i915/gvt: Missed to cancel dma map for ggtt entries
        ...
      867ab4b2
    • D
      Merge branch 'drm-next-4.17' of git://people.freedesktop.org/~agd5f/linux into drm-next · 221bda4b
      Dave Airlie 提交于
      - Fix a dark screen issue in DC
      - Fix clk/voltage dependency tracking for wattman
      - Update SMU interface for vega12
      
      * 'drm-next-4.17' of git://people.freedesktop.org/~agd5f/linux:
        drm/amd/powerplay: header file interface to SMU update
        drm/amd/pp: Fix bug voltage can't be OD separately on VI
        drm/amd/display: Don't program bypass on linear regamma LUT
      221bda4b
    • D
      Merge tag 'exynos-drm-fixes-for-v4.17-rc2' of... · 2e1d6eab
      Dave Airlie 提交于
      Merge tag 'exynos-drm-fixes-for-v4.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next
      
      Remove Exynos specific framebuffer structure and
      relevant functions.
      - it removes exynos_drm_fb structure which is a wrapper of
        drm_framebuffer and unnecessary two exynos specific callback
        functions, exynos_drm_destory() and exynos_drm_fb_create_handle()
        because we can reuse existing drm common callback ones instead.
      
      * tag 'exynos-drm-fixes-for-v4.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
        drm/exynos: exynos_drm_fb -> drm_framebuffer
        drm/exynos: Move dma_addr out of exynos_drm_fb
        drm/exynos: Move GEM BOs to drm_framebuffer
        drm/amdkfd: Deallocate SDMA queues correctly
        drm/amdkfd: Fix scratch memory with HWS enabled
      2e1d6eab
    • D
      Merge tag 'drm-intel-next-fixes-2018-04-19' of... · bc9ebca2
      Dave Airlie 提交于
      Merge tag 'drm-intel-next-fixes-2018-04-19' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
      
      - Fix for FDO #105549: Avoid OOPS on bad VBT (Jani)
      - Fix rare pre-emption race (Chris)
      - Fix RC6 race against PM transitions (Tvrtko)
      
      * tag 'drm-intel-next-fixes-2018-04-19' of git://anongit.freedesktop.org/drm/drm-intel:
        drm/i915/audio: Fix audio detection issue on GLK
        drm/i915: Call i915_perf_fini() on init_hw error unwind
        drm/i915/bios: filter out invalid DDC pins from VBT child devices
        drm/i915/pmu: Inspect runtime PM state more carefully while estimating RC6
        drm/i915: Do no use kfree() to free a kmem_cache_alloc() return value
        drm/i915/execlists: Clear user-active flag on preemption completion
        drm/i915/gvt: Add drm_format_mod update
        drm/i915/gvt: Disable primary/sprite/cursor plane at virtual display initialization
        drm/i915/gvt: Delete redundant error message in fb_decode.c
        drm/i915/gvt: Cancel dma map when resetting ggtt entries
        drm/i915/gvt: Missed to cancel dma map for ggtt entries
        drm/i915/gvt: Make MI_USER_INTERRUPT nop in cmd parser
        drm/i915/gvt: Mark expected switch fall-through in handle_g2v_notification
        drm/i915/gvt: throw error on unhandled vfio ioctls
      bc9ebca2
    • D
      Merge tag 'drm-misc-fixes-2018-04-18-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-next · e1898f99
      Dave Airlie 提交于
      drm-misc-fixes:
      
      stable: vc4: Fix memory leak during BO teardown (Daniel)
      dp: Add i2c retry for LSPCON adapters (Imre)
      hdcp: Fix device count mask (Ramalingam)
      
      Cc: Daniel J Blueman <daniel@quora.org
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Ramalingam C <ramalingam.c@intel.com>
      
      * tag 'drm-misc-fixes-2018-04-18-1' of git://anongit.freedesktop.org/drm/drm-misc:
        drm/i915: Fix LSPCON TMDS output buffer enabling from low-power state
        drm: Fix HDCP downstream dev count read
        drm/vc4: Fix memory leak during BO teardown
      e1898f99
    • L
      Merge tag '4.17-rc1-SMB3-CIFS' of git://git.samba.org/sfrench/cifs-2.6 · 5ec83b22
      Linus Torvalds 提交于
      Pull cifs fixes from Steve French:
       "Various SMB3/CIFS fixes.
      
        There are three more security related fixes in progress that are not
        included in this set but they are still being tested and reviewed, so
        sending this unrelated set of smaller fixes now"
      
      * tag '4.17-rc1-SMB3-CIFS' of git://git.samba.org/sfrench/cifs-2.6:
        CIFS: fix typo in cifs_dbg
        cifs: do not allow creating sockets except with SMB1 posix exensions
        cifs: smbd: Dump SMB packet when configured
        cifs: smbd: Check for iov length on sending the last iov
        fs: cifs: Adding new return type vm_fault_t
        cifs: smb2ops: Fix NULL check in smb2_query_symlink
      5ec83b22
    • L
      Merge tag 'for-4.17-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · d54b5c13
      Linus Torvalds 提交于
      Pull btrfs fixes from David Sterba:
       "This contains a few fixups to the qgroup patches that were merged this
        dev cycle, unaligned access fix, blockgroup removal corner case fix
        and a small debugging output tweak"
      
      * tag 'for-4.17-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: print-tree: debugging output enhancement
        btrfs: Fix race condition between delayed refs and blockgroup removal
        btrfs: fix unaligned access in readdir
        btrfs: Fix wrong btrfs_delalloc_release_extents parameter
        btrfs: delayed-inode: Remove wrong qgroup meta reservation calls
        btrfs: qgroup: Use independent and accurate per inode qgroup rsv
        btrfs: qgroup: Commit transaction in advance to reduce early EDQUOT
      d54b5c13
    • L
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 37a535ed
      Linus Torvalds 提交于
      Pull x86 fixes from Thomas Gleixner:
       "A small set of fixes for x86:
      
         - Prevent X2APIC ID 0xFFFFFFFF from being treated as valid, which
           causes the possible CPU count to be wrong.
      
         - Prevent 32bit truncation in calc_hpet_ref() which causes the TSC
           calibration to fail
      
         - Fix the page table setup for temporary text mappings in the resume
           code which causes resume failures
      
         - Make the page table dump code handle HIGHPTE correctly instead of
           oopsing
      
         - Support for topologies where NUMA nodes share an LLC to prevent a
           invalid topology warning and further malfunction on such systems.
      
         - Remove the now unused pci-nommu code
      
         - Remove stale function declarations"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/power/64: Fix page-table setup for temporary text mapping
        x86/mm: Prevent kernel Oops in PTDUMP code with HIGHPTE=y
        x86,sched: Allow topologies where NUMA nodes share an LLC
        x86/processor: Remove two unused function declarations
        x86/acpi: Prevent X2APIC id 0xffffffff from being accounted
        x86/tsc: Prevent 32bit truncation in calc_hpet_ref()
        x86: Remove pci-nommu.c
      37a535ed
    • L
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c1e9dae0
      Linus Torvalds 提交于
      Pull timer fixes from Thomas Gleixner:
       "A small set of timer fixes:
      
         - Evaluate the -ETIME condition correctly in the imx tpm driver
      
         - Fix the evaluation order of a condition in posix cpu timers
      
         - Use pr_cont() in the clockevents code to prevent ugly message
           splitting
      
         - Remove __current_kernel_time() which is now unused to prevent that
           new users show up.
      
         - Remove a stale forward declaration"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        clocksource/imx-tpm: Correct -ETIME return condition check
        posix-cpu-timers: Ensure set_process_cpu_timer is always evaluated
        timekeeping: Remove __current_kernel_time()
        timers: Remove stale struct tvec_base forward declaration
        clockevents: Fix kernel messages split across multiple lines
      c1e9dae0