Skip to content
  1. Mar 02, 2018
  2. Mar 01, 2018
    • Douglas Anderson's avatar
      arm64: dts: rockchip: Fix rk3399-gru-* s2r (pinctrl hogs, wifi reset) · 2560da49
      Douglas Anderson authored
      Back in the early days when gru devices were still under development
      we found an issue where the WiFi reset line needed to be configured as
      early as possible during the boot process to avoid the WiFi module
      being in a bad state.
      
      We found that the way to get the kernel to do this in the earliest
      possible place was to configure this line in the pinctrl hogs, so
      that's what we did.  For some history here you can see
      <http://crosreview.com/368770>.  After the time that change landed in
      the kernel, we landed a firmware change to configure this line even
      earlier.  See <http://crosreview.com/399919>.  However, even after the
      firmware change landed we kept the kernel change to deal with the fact
      that some people working on devices might take a little while to
      update their firmware.
      
      At this there are definitely zero devices out in the wild that have
      firmware without the fix in it.  Specifically looking in the firmware
      branch several critically important fixes for memory stability landed
      after the patch in coreboot and I know we didn't ship without those.
      Thus, by now, everyone should have the new firmware and it's safe to
      not have the kernel set this up in a pinctrl hog.
      
      Historically, even though it wasn't needed to have this in a pinctrl
      hog, we still kept it since it didn't hurt.  Pinctrl would apply the
      default hog at bootup and then would never touch things again.  That
      all changed with commit 981ed1bf
      
       ("pinctrl: Really force states
      during suspend/resume").  After that commit then we'll re-apply the
      default hog at resume time and that can screw up the reset state of
      WiFi.  ...and on rk3399 if you touch a device on PCIe in the wrong way
      then the whole system can go haywire.  That's what was happening.
      Specifically you'd resume a rk3399-gru-* device and it would mostly
      resume, then would crash with some crazy weird crash.
      
      One could say, perhaps, that the recent pinctrl change was at fault
      (and should be fixed) since it changed behavior.  ...but that's not
      really true.  The device tree for rk3399-gru is really to blame.
      Specifically since the pinctrl is defined in the hog and not in the
      "wlan-pd-n" node then the actual user of this pin doesn't have a
      pinctrl entry for it.  That's bad.
      
      Let's fix our problems by just moving the control of
      "wlan_module_reset_l pinctrl" out of the hog and put them in the
      proper place.
      
      NOTE: in theory, I think it should actually be possible to have a pin
      controlled _both_ by the hog and by an actual device.  Once the device
      claims the pin I think the hog is supposed to let go.  I'm not 100%
      sure that this works and in any case this solution would be more
      complex than is necessary.
      
      Reported-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Fixes: 48f4d979 ("arm64: dts: rockchip: add Gru/Kevin DTS")
      Fixes: 981ed1bf
      
       ("pinctrl: Really force states during suspend/resume")
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Tested-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
      Tested-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      2560da49
  3. Feb 16, 2018
    • Robin Murphy's avatar
      arm64: dts: rockchip: Fix DWMMC clocks · ca9eee95
      Robin Murphy authored
      Trying to boot an RK3328 box with an HS200-capable eMMC, I see said eMMC
      fail to initialise as it can't run its tuning procedure, because the
      sample clock is missing. Upon closer inspection, whilst the clock is
      present in the DT, its name is subtly incorrect per the binding, so
      __of_clk_get_by_name() never finds it. By inspection, the drive clock
      suffers from a similar problem, so has never worked properly either.
      
      Fix up all instances of the incorrect clock names across the 64-bit DTs.
      
      Fixes: d717f735 ("arm64: dts: rockchip: add sdmmc/sdio/emmc nodes for RK3328 SoCs")
      Fixes: b790c2ca
      
       ("arm64: dts: add Rockchip rk3368 core dtsi and board dts for the r88 board")
      Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      ca9eee95
  4. Feb 12, 2018
  5. Feb 11, 2018
  6. Feb 10, 2018
  7. Feb 09, 2018
    • Jose Ricardo Ziviani's avatar
      KVM: PPC: Book3S: Add MMIO emulation for VMX instructions · 09f98496
      Jose Ricardo Ziviani authored
      
      
      This patch provides the MMIO load/store vector indexed
      X-Form emulation.
      
      Instructions implemented:
      lvx: the quadword in storage addressed by the result of EA &
      0xffff_ffff_ffff_fff0 is loaded into VRT.
      
      stvx: the contents of VRS are stored into the quadword in storage
      addressed by the result of EA & 0xffff_ffff_ffff_fff0.
      
      Reported-by: default avatarGopesh Kumar Chaudhary <gopchaud@in.ibm.com>
      Reported-by: default avatarBalamuruhan S <bala24@linux.vnet.ibm.com>
      Signed-off-by: default avatarJose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
      09f98496
    • Alexander Graf's avatar
      KVM: PPC: Book3S HV: Branch inside feature section · d20fe50a
      Alexander Graf authored
      
      
      We ended up with code that did a conditional branch inside a feature
      section to code outside of the feature section. Depending on how the
      object file gets organized, that might mean we exceed the 14bit
      relocation limit for conditional branches:
      
        arch/powerpc/kvm/built-in.o:arch/powerpc/kvm/book3s_hv_rmhandlers.S:416:(__ftr_alt_97+0x8): relocation truncated to fit: R_PPC64_REL14 against `.text'+1ca4
      
      So instead of doing a conditional branch outside of the feature section,
      let's just jump at the end of the same, making the branch very short.
      
      Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
      Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
      d20fe50a
    • David Gibson's avatar
      KVM: PPC: Book3S HV: Make HPT resizing work on POWER9 · 790a9df5
      David Gibson authored
      This adds code to enable the HPT resizing code to work on POWER9,
      which uses a slightly modified HPT entry format compared to POWER8.
      On POWER9, we convert HPTEs read from the HPT from the new format to
      the old format so that the rest of the HPT resizing code can work as
      before.  HPTEs written to the new HPT are converted to the new format
      as the last step before writing them into the new HPT.
      
      This takes out the checks added by commit bcd3bb63
      
       ("KVM: PPC:
      Book3S HV: Disable HPT resizing on POWER9 for now", 2017-02-18),
      now that HPT resizing works on POWER9.
      
      On POWER9, when we pivot to the new HPT, we now call
      kvmppc_setup_partition_table() to update the partition table in order
      to make the hardware use the new HPT.
      
      [paulus@ozlabs.org - added kvmppc_setup_partition_table() call,
       wrote commit message.]
      
      Tested-by: default avatarLaurent Vivier <lvivier@redhat.com>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
      790a9df5
    • Paul Mackerras's avatar
      KVM: PPC: Book3S HV: Fix handling of secondary HPTEG in HPT resizing code · 05f2bb03
      Paul Mackerras authored
      
      
      This fixes the computation of the HPTE index to use when the HPT
      resizing code encounters a bolted HPTE which is stored in its
      secondary HPTE group.  The code inverts the HPTE group number, which
      is correct, but doesn't then mask it with new_hash_mask.  As a result,
      new_pteg will be effectively negative, resulting in new_hptep
      pointing before the new HPT, which will corrupt memory.
      
      In addition, this removes two BUG_ON statements.  The condition that
      the BUG_ONs were testing -- that we have computed the hash value
      incorrectly -- has never been observed in testing, and if it did
      occur, would only affect the guest, not the host.  Given that
      BUG_ON should only be used in conditions where the kernel (i.e.
      the host kernel, in this case) can't possibly continue execution,
      it is not appropriate here.
      
      Reviewed-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
      05f2bb03
  8. Feb 08, 2018
  9. Feb 07, 2018