Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  1. Jul 21, 2020
  2. Jul 16, 2020
  3. Jul 10, 2020
  4. Jul 09, 2020
    • Babu Moger's avatar
      x86/resctrl: Fix memory bandwidth counter width for AMD · 215e5622
      Babu Moger authored
      commit 2c18bd52 upstream.
      
      Memory bandwidth is calculated reading the monitoring counter
      at two intervals and calculating the delta. It is the software’s
      responsibility to read the count often enough to avoid having
      the count roll over _twice_ between reads.
      
      The current code hardcodes the bandwidth monitoring counter's width
      to 24 bits for AMD. This is due to default base counter width which
      is 24. Currently, AMD does not implement the CPUID 0xF.[ECX=1]:EAX
      to adjust the counter width. But, the AMD hardware supports much
      wider bandwidth counter with the default width of 44 bits.
      
      Kernel reads these monitoring counters every 1 second and adjusts the
      counter value for overflow. With 24 bits and scale value of 64 for AMD,
      it can only measure up to 1GB/s without overflowing. For the rates
      above 1GB/s this will fail to measure the bandwidth.
      
      Fix the issue setting the default width to 44 bits by adjusting the
      offset.
      
      AMD future products will implement CPUID 0xF.[ECX=1]:EAX.
      
       [ bp: Let the line stick out and drop {}-brackets around a single
         statement. ]
      
      Fixes: 4d05bf71
      
       ("x86/resctrl: Introduce AMD QOS feature")
      Signed-off-by: default avatarBabu Moger <babu.moger@amd.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Link: https://lkml.kernel.org/r/159129975546.62538.5656031125604254041.stgit@naples-babu.amd.com
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      215e5622
    • Hauke Mehrtens's avatar
      MIPS: Add missing EHB in mtc0 -> mfc0 sequence for DSPen · 032343ed
      Hauke Mehrtens authored
      commit fcec538e upstream.
      
      This resolves the hazard between the mtc0 in the change_c0_status() and
      the mfc0 in configure_exception_vector(). Without resolving this hazard
      configure_exception_vector() could read an old value and would restore
      this old value again. This would revert the changes change_c0_status()
      did. I checked this by printing out the read_c0_status() at the end of
      per_cpu_trap_init() and the ST0_MX is not set without this patch.
      
      The hazard is documented in the MIPS Architecture Reference Manual Vol.
      III: MIPS32/microMIPS32 Privileged Resource Architecture (MD00088), rev
      6.03 table 8.1 which includes:
      
         Producer | Consumer | Hazard
        ----------|----------|----------------------------
         mtc0     | mfc0     | any coprocessor 0 register
      
      I saw this hazard on an Atheros AR9344 rev 2 SoC with a MIPS 74Kc CPU.
      There the change_c0_status() function would activate the DSPen by
      setting ST0_MX in the c0_status register. This was reverted and then the
      system got a DSP exception when the DSP registers were saved in
      save_dsp() in the first process switch. The crash looks like this:
      
      [    0.089999] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
      [    0.097796] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
      [    0.107070] Kernel panic - not syncing: Unexpected DSP exception
      [    0.113470] Rebooting in 1 seconds..
      
      We saw this problem in OpenWrt only on the MIPS 74Kc based Atheros SoCs,
      not on the 24Kc based SoCs. We only saw it with kernel 5.4 not with
      kernel 4.19, in addition we had to use GCC 8.4 or 9.X, with GCC 8.3 it
      did not happen.
      
      In the kernel I bisected this problem to commit 9012d011 ("compiler:
      allow all arches to enable CONFIG_OPTIMIZE_INLINING"), but when this was
      reverted it also happened after commit 172dcd93 ("MIPS: Always
      allocate exception vector for MIPSr2+").
      
      Commit 0b24cae4
      
       ("MIPS: Add missing EHB in mtc0 -> mfc0 sequence.")
      does similar changes to a different file. I am not sure if there are
      more places affected by this problem.
      
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      032343ed
    • Martin Blumenstingl's avatar
      MIPS: lantiq: xway: sysctrl: fix the GPHY clock alias names · 2e859b14
      Martin Blumenstingl authored
      commit 03e62fd6 upstream.
      
      The dt-bindings for the GSWIP describe that the node should be named
      "switch". Use the same name in sysctrl.c so the GSWIP driver can
      actually find the "gphy0" and "gphy1" clocks.
      
      Fixes: 14fceff4
      
       ("net: dsa: Add Lantiq / Intel DSA driver for vrx200")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
      Acked-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2e859b14
    • Christian Borntraeger's avatar
      s390/debug: avoid kernel warning on too large number of pages · 8f4aa3a6
      Christian Borntraeger authored
      [ Upstream commit 827c4913
      
       ]
      
      When specifying insanely large debug buffers a kernel warning is
      printed. The debug code does handle the error gracefully, though.
      Instead of duplicating the check let us silence the warning to
      avoid crashes when panic_on_warn is used.
      
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      Reviewed-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      8f4aa3a6
  5. Jul 08, 2020
  6. Jun 30, 2020