1. 12 2月, 2021 1 次提交
  2. 10 2月, 2021 4 次提交
    • Y
      net: hns3: add a check for index in hclge_get_rss_key() · 532cfc0d
      Yufeng Mo 提交于
      The index is received from vf, if use it directly,
      an out-of-bound issue may be caused, so add a check for
      this index before using it in hclge_get_rss_key().
      
      Fixes: a638b1d8 ("net: hns3: fix get VF RSS issue")
      Signed-off-by: NYufeng Mo <moyufeng@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      532cfc0d
    • Y
      net: hns3: add a check for tqp_index in hclge_get_ring_chain_from_mbx() · 326334aa
      Yufeng Mo 提交于
      The tqp_index is received from vf, if use it directly,
      an out-of-bound issue may be caused, so add a check for
      this tqp_index before using it in hclge_get_ring_chain_from_mbx().
      
      Fixes: 84e095d6 ("net: hns3: Change PF to add ring-vect binding & resetQ to mailbox")
      Signed-off-by: NYufeng Mo <moyufeng@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      326334aa
    • Y
      net: hns3: add a check for queue_id in hclge_reset_vf_queue() · 67a69f84
      Yufeng Mo 提交于
      The queue_id is received from vf, if use it directly,
      an out-of-bound issue may be caused, so add a check for
      this queue_id before using it in hclge_reset_vf_queue().
      
      Fixes: 1a426f8b ("net: hns3: fix the VF queue reset flow error")
      Signed-off-by: NYufeng Mo <moyufeng@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      67a69f84
    • V
      net: dsa: felix: implement port flushing on .phylink_mac_link_down · eb4733d7
      Vladimir Oltean 提交于
      There are several issues which may be seen when the link goes down while
      forwarding traffic, all of which can be attributed to the fact that the
      port flushing procedure from the reference manual was not closely
      followed.
      
      With flow control enabled on both the ingress port and the egress port,
      it may happen when a link goes down that Ethernet packets are in flight.
      In flow control mode, frames are held back and not dropped. When there
      is enough traffic in flight (example: iperf3 TCP), then the ingress port
      might enter congestion and never exit that state. This is a problem,
      because it is the egress port's link that went down, and that has caused
      the inability of the ingress port to send packets to any other port.
      This is solved by flushing the egress port's queues when it goes down.
      
      There is also a problem when performing stream splitting for
      IEEE 802.1CB traffic (not yet upstream, but a sort of multicast,
      basically). There, if one port from the destination ports mask goes
      down, splitting the stream towards the other destinations will no longer
      be performed. This can be traced down to this line:
      
      	ocelot_port_writel(ocelot_port, 0, DEV_MAC_ENA_CFG);
      
      which should have been instead, as per the reference manual:
      
      	ocelot_port_rmwl(ocelot_port, 0, DEV_MAC_ENA_CFG_RX_ENA,
      			 DEV_MAC_ENA_CFG);
      
      Basically only DEV_MAC_ENA_CFG_RX_ENA should be disabled, but not
      DEV_MAC_ENA_CFG_TX_ENA - I don't have further insight into why that is
      the case, but apparently multicasting to several ports will cause issues
      if at least one of them doesn't have DEV_MAC_ENA_CFG_TX_ENA set.
      
      I am not sure what the state of the Ocelot VSC7514 driver is, but
      probably not as bad as Felix/Seville, since VSC7514 uses phylib and has
      the following in ocelot_adjust_link:
      
      	if (!phydev->link)
      		return;
      
      therefore the port is not really put down when the link is lost, unlike
      the DSA drivers which use .phylink_mac_link_down for that.
      
      Nonetheless, I put ocelot_port_flush() in the common ocelot.c because it
      needs to access some registers from drivers/net/ethernet/mscc/ocelot_rew.h
      which are not exported in include/soc/mscc/ and a bugfix patch should
      probably not move headers around.
      
      Fixes: bdeced75 ("net: dsa: felix: Add PCS operations for PHYLINK")
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eb4733d7
  3. 08 2月, 2021 4 次提交
    • A
      Revert "ACPICA: Interpreter: fix memory leak by using existing buffer" · fe0af090
      Ard Biesheuvel 提交于
      This reverts commit 32cf1a12.
      
      The 'exisitng buffer' in this case is the firmware provided table, and
      we should not modify that in place. This fixes a crash on arm64 with
      initrd table overrides, in which case the DSDT is not mapped with
      read/write permissions.
      Reported-by: NShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NArd Biesheuvel <ardb@kernel.org>
      Tested-by: NShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      fe0af090
    • R
      cpufreq: ACPI: Update arch scale-invariance max perf ratio if CPPC is not there · d11a1d08
      Rafael J. Wysocki 提交于
      If the maximum performance level taken for computing the
      arch_max_freq_ratio value used in the x86 scale-invariance code is
      higher than the one corresponding to the cpuinfo.max_freq value
      coming from the acpi_cpufreq driver, the scale-invariant utilization
      falls below 100% even if the CPU runs at cpuinfo.max_freq or slightly
      faster, which causes the schedutil governor to select a frequency
      below cpuinfo.max_freq.  That frequency corresponds to a frequency
      table entry below the maximum performance level necessary to get to
      the "boost" range of CPU frequencies which prevents "boost"
      frequencies from being used in some workloads.
      
      While this issue is related to scale-invariance, it may be amplified
      by commit db865272 ("cpufreq: Avoid configuring old governors as
      default with intel_pstate") from the 5.10 development cycle which
      made it extremely easy to default to schedutil even if the preferred
      driver is acpi_cpufreq as long as intel_pstate is built too, because
      the mere presence of the latter effectively removes the ondemand
      governor from the defaults.  Distro kernels are likely to include
      both intel_pstate and acpi_cpufreq on x86, so their users who cannot
      use intel_pstate or choose to use acpi_cpufreq may easily be
      affectecd by this issue.
      
      If CPPC is available, it can be used to address this issue by
      extending the frequency tables created by acpi_cpufreq to cover the
      entire available frequency range (including "boost" frequencies) for
      each CPU, but if CPPC is not there, acpi_cpufreq has no idea what
      the maximum "boost" frequency is and the frequency tables created by
      it cannot be extended in a meaningful way, so in that case make it
      ask the arch scale-invariance code to to use the "nominal" performance
      level for CPU utilization scaling in order to avoid the issue at hand.
      
      Fixes: db865272 ("cpufreq: Avoid configuring old governors as default with intel_pstate")
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: NGiovanni Gherdovich <ggherdovich@suse.cz>
      Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      d11a1d08
    • R
      cpufreq: ACPI: Extend frequency tables to cover boost frequencies · 3c55e94c
      Rafael J. Wysocki 提交于
      A severe performance regression on AMD EPYC processors when using
      the schedutil scaling governor was discovered by Phoronix.com and
      attributed to the following commits:
      
        41ea6672 ("x86, sched: Calculate frequency invariance for AMD
        systems")
      
        976df7e5 ("x86, sched: Use midpoint of max_boost and max_P for
        frequency invariance on AMD EPYC")
      
      The source of the problem is that the maximum performance level taken
      for computing the arch_max_freq_ratio value used in the x86 scale-
      invariance code is higher than the one corresponding to the
      cpuinfo.max_freq value coming from the acpi_cpufreq driver.
      
      This effectively causes the scale-invariant utilization to fall below
      100% even if the CPU runs at cpuinfo.max_freq or slightly faster, so
      the schedutil governor selects a frequency below cpuinfo.max_freq
      then.  That frequency corresponds to a frequency table entry below
      the maximum performance level necessary to get to the "boost" range
      of CPU frequencies.
      
      However, if the cpuinfo.max_freq value coming from acpi_cpufreq was
      higher, the schedutil governor would select higher frequencies which
      in turn would allow acpi_cpufreq to set more adequate performance
      levels and to get to the "boost" range of CPU frequencies more often.
      
      This issue affects any systems where acpi_cpufreq is used and the
      "boost" (or "turbo") frequencies are enabled, not just AMD EPYC.
      Moreover, commit db865272 ("cpufreq: Avoid configuring old
      governors as default with intel_pstate") from the 5.10 development
      cycle made it extremely easy to default to schedutil even if the
      preferred driver is acpi_cpufreq as long as intel_pstate is built
      too, because the mere presence of the latter effectively removes the
      ondemand governor from the defaults.  Distro kernels are likely to
      include both intel_pstate and acpi_cpufreq on x86, so their users
      who cannot use intel_pstate or choose to use acpi_cpufreq may
      easily be affectecd by this issue.
      
      To address this issue, extend the frequency table constructed by
      acpi_cpufreq for each CPU to cover the entire range of available
      frequencies (including the "boost" ones) if CPPC is available and
      indicates that "boost" (or "turbo") frequencies are enabled.  That
      causes cpuinfo.max_freq to become the maximum "boost" frequency of
      the given CPU (instead of the maximum frequency returned by the ACPI
      _PSS object that corresponds to the "nominal" performance level).
      
      Fixes: 41ea6672 ("x86, sched: Calculate frequency invariance for AMD systems")
      Fixes: 976df7e5 ("x86, sched: Use midpoint of max_boost and max_P for frequency invariance on AMD EPYC")
      Fixes: db865272 ("cpufreq: Avoid configuring old governors as default with intel_pstate")
      Link: https://www.phoronix.com/scan.php?page=article&item=linux511-amd-schedutil&num=1
      Link: https://lore.kernel.org/linux-pm/20210203135321.12253-2-ggherdovich@suse.cz/Reported-by: NMichael Larabel <Michael@phoronix.com>
      Diagnosed-by: NGiovanni Gherdovich <ggherdovich@suse.cz>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Tested-by: NGiovanni Gherdovich <ggherdovich@suse.cz>
      Reviewed-by: NGiovanni Gherdovich <ggherdovich@suse.cz>
      Tested-by: NMichael Larabel <Michael@phoronix.com>
      3c55e94c
    • C
      dmaengine dw: Revert "dmaengine: dw: Enable runtime PM" · b6c14d7a
      Cezary Rojewski 提交于
      This reverts commit 84206794.
      For some solutions e.g. sound/soc/intel/catpt, DW DMA is part of a
      compound device (in that very example, domains: ADSP, SSP0, SSP1, DMA0
      and DMA1 are part of a single entity) rather than being a standalone
      one. Driver for said device may enlist DMA to transfer data during
      suspend or resume sequences.
      
      Manipulating RPM explicitly in dw's DMA request and release channel
      functions causes suspend() to also invoke resume() for the exact same
      device. Similar situation occurs for resume() sequence. Effectively
      renders device dysfunctional after first suspend() attempt. Revert the
      change to address the problem.
      
      Fixes: 84206794 ("dmaengine: dw: Enable runtime PM")
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NCezary Rojewski <cezary.rojewski@intel.com>
      Acked-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
      Link: https://lore.kernel.org/r/20210203191924.15706-1-cezary.rojewski@intel.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
      b6c14d7a
  4. 07 2月, 2021 2 次提交
  5. 06 2月, 2021 4 次提交
  6. 05 2月, 2021 9 次提交
  7. 04 2月, 2021 2 次提交
  8. 03 2月, 2021 14 次提交