1. 03 Feb, 2022 6 commits
  2. 02 Feb, 2022 5 commits
    • Michael Ellerman's avatar
      powerpc/ptdump: Fix sparse warning in hashpagetable.c · 961f649f
      Michael Ellerman authored
      As reported by sparse:
      
        arch/powerpc/mm/ptdump/hashpagetable.c:264:29: warning: restricted __be64 degrades to integer
        arch/powerpc/mm/ptdump/hashpagetable.c:265:49: warning: restricted __be64 degrades to integer
        arch/powerpc/mm/ptdump/hashpagetable.c:267:36: warning: incorrect type in assignment (different base types)
        arch/powerpc/mm/ptdump/hashpagetable.c:267:36:    expected unsigned long long [usertype]
        arch/powerpc/mm/ptdump/hashpagetable.c:267:36:    got restricted __be64 [usertype] v
        arch/powerpc/mm/ptdump/hashpagetable.c:268:36: warning: incorrect type in assignment (different base types)
        arch/powerpc/mm/ptdump/hashpagetable.c:268:36:    expected unsigned long long [usertype]
        arch/powerpc/mm/ptdump/hashpagetable.c:268:36:    got restricted __be64 [usertype] r
      
      The values returned by plpar_pte_read_4() are CPU endian, not __be64, so
      assigning them to struct hash_pte confuses sparse. As a minimal fix open
      code a struct to hold the values with CPU endian types.
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Reported-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20220202053039.691917-1-mpe@ellerman.id.au
      961f649f
    • Corentin Labbe's avatar
      macintosh: macio_asic: remove useless cast for driver.name · ccafe7c2
      Corentin Labbe authored
      pci_driver name is const char pointer, so the cast it not necessary.
      Signed-off-by: default avatarCorentin Labbe <clabbe@baylibre.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20220125135421.4081740-1-clabbe@baylibre.com
      ccafe7c2
    • Michael Ellerman's avatar
      powerpc/64: Move paca allocation later in boot · 2e7f1e2b
      Michael Ellerman authored
      Mahesh & Sourabh identified two problems[1][2] with ppc64_bolted_size()
      and paca allocation.
      
      The first is that on a Radix capable machine but with "disable_radix" on
      the command line, there is a window during early boot where
      early_radix_enabled() is true, even though it will later become false.
      
        early_init_devtree:                       <- early_radix_enabled() = false
          early_init_dt_scan_cpus:                <- early_radix_enabled() = false
              ...
              check_cpu_pa_features:              <- early_radix_enabled() = false
              ...                               ^ <- early_radix_enabled() = TRUE
              allocate_paca:                    | <- early_radix_enabled() = TRUE
                  ...                           |
                  ppc64_bolted_size:            | <- early_radix_enabled() = TRUE
                      if (early_radix_enabled())| <- early_radix_enabled() = TRUE
                          return ULONG_MAX;     |
              ...                               |
          ...                                   | <- early_radix_enabled() = TRUE
          ...                                   | <- early_radix_enabled() = TRUE
          mmu_early_init_devtree()              V
          ...                                     <- early_radix_enabled() = false
      
      This causes ppc64_bolted_size() to return ULONG_MAX for the boot CPU's
      paca allocation, even though later it will return a different value.
      This is not currently a bug because the paca allocation is also limited
      by the RMA size, but that is very fragile.
      
      The second issue is that when using the Hash MMU, when we call
      ppc64_bolted_size() for the boot CPU's paca allocation, we have not yet
      detected whether 1T segments are available. That causes
      ppc64_bolted_size() to return 256MB, even if the machine can actually
      support up to 1T. This is usually OK, we generally have space below
      256MB for one paca, but for a kdump kernel placed above 256MB it causes
      the boot to fail.
      
      At boot we cannot discover all the features of the machine
      instantaneously, so there will always be some periods where we have
      incomplete knowledge of the system. However both the above problems stem
      from the fact that we allocate the boot CPU's paca (and paca pointers
      array) before we decide which MMU we are using, or discover its exact
      features.
      
      Moving the paca allocation slightly later still can solve both the
      issues described above, and means for a normal boot we don't do any
      permanent allocations until after we've discovered the MMU.
      
      Note that although we move the boot CPU's paca allocation later, we
      still have a temporary paca (boot_paca) accessible via r13, so code that
      does read only access to paca fields is safe. The only risk is that some
      code writes to the boot_paca, and that write will then be lost when we
      switch away from the boot_paca later in early_setup().
      
      The additional code that runs before the paca allocation is primarily
      mmu_early_init_devtree(), which is scanning the device tree and
      populating globals and cur_cpu_spec with MMU related flags. I do not see
      any additional code that writes to paca fields.
      
      [1]: https://lore.kernel.org/r/20211018084434.217772-2-sourabhjain@linux.ibm.com
      [2]: https://lore.kernel.org/r/20211018084434.217772-3-sourabhjain@linux.ibm.comSigned-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20220124130544.408675-1-mpe@ellerman.id.au
      2e7f1e2b
    • Maxim Kiselev's avatar
      powerpc: dts: t1040rdb: fix ports names for Seville Ethernet switch · 5ebb7474
      Maxim Kiselev authored
      On board rev A, the network interface labels for the switch ports
      written on the front panel are different than on rev B and later.
      
      This patch fixes network interface names for the switch ports according
      to labels that are written on the front panel of the board rev B.
      They start from ETH3 and end at ETH10.
      
      This patch also introduces a separate device tree for rev A.
      The main device tree is supposed to cover rev B and later.
      
      Fixes: e69eb082 ("powerpc: dts: t1040rdb: add ports for Seville Ethernet switch")
      Signed-off-by: default avatarMaxim Kiselev <bigunclemax@gmail.com>
      Reviewed-by: default avatarMaxim Kochetkov <fido_max@inbox.ru>
      Reviewed-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20220121091447.3412907-1-bigunclemax@gmail.com
      5ebb7474
    • Laurent Dufour's avatar
      powerpc/pseries: read the lpar name from the firmware · eddaa9a4
      Laurent Dufour authored
      The LPAR name may be changed after the LPAR has been started in the HMC.
      In that case lparstat command is not reporting the updated value because
      it reads it from the device tree which is read at boot time.
      
      However this value could be read from RTAS.
      
      Adding this value in the /proc/powerpc/lparcfg output allows to read the
      updated value.
      
      However the hypervisor, like Qemu/KVM, may not support this RTAS
      parameter. In that case the value reported in lparcfg is read from the
      device tree and so is not updated accordingly.
      Signed-off-by: default avatarLaurent Dufour <ldufour@linux.ibm.com>
      Reviewed-by: default avatarTyrel Datwyler <tyreld@linux.ibm.com>
      Reviewed-by: default avatarNathan Lynch <nathanl@linux.ibm.com>
      [mpe: Drop doc-comment syntax, change RTAS/DT to lower case, use of_root
            to fix missing of_node_put(), use of_property_read_string()]
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20220106161339.74656-1-ldufour@linux.ibm.com
      eddaa9a4
  3. 31 Jan, 2022 5 commits
  4. 30 Jan, 2022 18 commits
  5. 29 Jan, 2022 6 commits
    • Thomas Gleixner's avatar
      Merge tag 'irqchip-fixes-5.17-1' of... · 243d3080
      Thomas Gleixner authored
      Merge tag 'irqchip-fixes-5.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent
      
      Pull irqchip fixes from Marc Zyngier:
      
        - Drop an unused private data field in the AIC driver
      
        - Various fixes to the realtek-rtl driver
      
        - Make the GICv3 ITS driver compile again in !SMP configurations
      
        - Force reset of the GICv3 ITSs at probe time to avoid issues during kexec
      
        - Yet another kfree/bitmap_free conversion
      
        - Various DT updates (Renesas, SiFive)
      
      Link: https://lore.kernel.org/r/20220128174217.517041-1-maz@kernel.org
      243d3080
    • Linus Torvalds's avatar
      Merge tag 'pci-v5.17-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · f8c7e4ed
      Linus Torvalds authored
      Pull pci fixes from Bjorn Helgaas:
      
       - Fix compilation warnings in new mt7621 driver (Sergio Paracuellos)
      
       - Restore the sysfs "rom" file for VGA shadow ROMs, which was broken
         when converting "rom" to be a static attribute (Bjorn Helgaas)
      
      * tag 'pci-v5.17-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI/sysfs: Find shadow ROM before static attribute initialization
        PCI: mt7621: Remove unused function pcie_rmw()
        PCI: mt7621: Drop of_match_ptr() to avoid unused variable
      f8c7e4ed
    • Linus Torvalds's avatar
      Merge tag 'gpio-fixes-for-v5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · 4cd90083
      Linus Torvalds authored
      Pull gpio fixes from Bartosz Golaszewski:
       "Two fixes for the gpio-simulator:
      
         - fix a bug with hogs not being set-up in gpio-sim when user-space
           sets the chip label to an empty string
      
         - include the gpio-sim documentation in the index"
      
      * tag 'gpio-fixes-for-v5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
        gpio: sim: add doc file to index file
        gpio: sim: check the label length when setting up device properties
      4cd90083
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · e255759e
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are two small char/misc driver fixes for 5.17-rc2 that fix some
        reported issues. They are:
      
         - fix up a merge issue in the at25.c driver that ended up dropping
           some lines in the driver. The removed lines ended being needed, so
           this restores it and the driver works again.
      
         - counter core fix where the wrong error was being returned, NULL
           should be the correct error for when memory is gone here, like the
           kmalloc() core does.
      
        Both of these have been in linux-next this week with no reported
        issues"
      
      * tag 'char-misc-5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        counter: fix an IS_ERR() vs NULL bug
        eeprom: at25: Restore missing allocation
      e255759e
    • Linus Torvalds's avatar
      Merge tag 'tty-5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · bb37101b
      Linus Torvalds authored
      Pull tty/serial driver fixes from Greg KH:
       "Here are some small bug fixes and reverts for reported problems with
        the tty core and drivers. They include:
      
         - revert the fifo use for the 8250 console mode. It caused too many
           regressions and problems, and had a bug in it as well. This is
           being reworked and should show up in a later -rc1 release, but it's
           not ready for 5.17
      
         - rpmsg tty race fix
      
         - restore the cyclades.h uapi header file. Turns out a compiler test
           suite used it for some unknown reason. Bring it back just for the
           parts that are used by the builder test so they continue to build.
           No functionality is restored as no one actually has this hardware
           anymore, nor is it really tested.
      
         - stm32 driver fixes
      
         - n_gsm flow control fixes
      
         - pl011 driver fix
      
         - rs485 initialization fix
      
        All of these have been in linux-next this week with no reported
        problems"
      
      * tag 'tty-5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        kbuild: remove include/linux/cyclades.h from header file check
        serial: core: Initialize rs485 RTS polarity already on probe
        serial: pl011: Fix incorrect rs485 RTS polarity on set_mctrl
        serial: stm32: fix software flow control transfer
        serial: stm32: prevent TDR register overwrite when sending x_char
        tty: n_gsm: fix SW flow control encoding/handling
        serial: 8250: of: Fix mapped region size when using reg-offset property
        tty: rpmsg: Fix race condition releasing tty port
        tty: Partially revert the removal of the Cyclades public API
        tty: Add support for Brainboxes UC cards.
        Revert "tty: serial: Use fifo in 8250 console driver"
      bb37101b
    • Linus Torvalds's avatar
      Merge tag 'usb-5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 44aa31a2
      Linus Torvalds authored
      Pull USB driver fixes from Greg KH:
       "Here are some small USB driver fixes for 5.17-rc2 that resolve a
        number of reported problems. These include:
      
         - typec driver fixes
      
         - xhci platform driver fixes for suspending
      
         - ulpi core fix
      
         - role.h build fix
      
         - new device ids
      
         - syzbot-reported bugfixes
      
         - gadget driver fixes
      
         - dwc3 driver fixes
      
         - other small fixes
      
        All of these have been in linux-next this week with no reported
        issues"
      
      * tag 'usb-5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: cdnsp: Fix segmentation fault in cdns_lost_power function
        usb: dwc2: gadget: don't try to disable ep0 in dwc2_hsotg_suspend
        usb: gadget: at91_udc: fix incorrect print type
        usb: dwc3: xilinx: Fix error handling when getting USB3 PHY
        usb: dwc3: xilinx: Skip resets and USB3 register settings for USB2.0 mode
        usb: xhci-plat: fix crash when suspend if remote wake enable
        usb: common: ulpi: Fix crash in ulpi_match()
        usb: gadget: f_sourcesink: Fix isoc transfer for USB_SPEED_SUPER_PLUS
        ucsi_ccg: Check DEV_INT bit only when starting CCG4
        USB: core: Fix hang in usb_kill_urb by adding memory barriers
        usb-storage: Add unusual-devs entry for VL817 USB-SATA bridge
        usb: typec: tcpm: Do not disconnect when receiving VSAFE0V
        usb: typec: tcpm: Do not disconnect while receiving VBUS off
        usb: typec: Don't try to register component master without components
        usb: typec: Only attempt to link USB ports if there is fwnode
        usb: typec: tcpci: don't touch CC line if it's Vconn source
        usb: roles: fix include/linux/usb/role.h compile issue
      44aa31a2