Skip to content
Snippets Groups Projects
  1. Jun 23, 2021
    • Bin Meng's avatar
      nvme: Skip block device creation for inactive namespaces · 478f7fc6
      Bin Meng authored
      
      At present for each namespace there is a block device created for it.
      There is no issue if the number of supported namespaces reported from
      the NVMe device is only 1.
      
      Since QEMU commit 7f0f1acedf15 ("hw/block/nvme: support multiple namespaces"),
      the number of supported namespaces reported has been changed from 1
      to 256, but not all of them are active namespaces. The actual active
      one depends on the QEMU command line parameters. A common case is
      that namespace 1 being active and all other 255 being inactive.
      
      If a namespace is inactive, the namespace identify command returns a
      zero filled data structure. We can use field NSZE (namespace size) to
      decide whether a block device should be created for it.
      
      Reported-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      Signed-off-by: Bin Meng's avatarBin Meng <bmeng.cn@gmail.com>
      478f7fc6
    • Bin Meng's avatar
      nvme: Move block dev creation from uclass post_probe() to driver probe() · 84344258
      Bin Meng authored
      
      At present the block device creation happens in the NVMe uclass
      driver post_probe() phase. In preparation to support multiple
      namespaces, we should issue namespace identify before creating
      block devices but that touches the underlying hardware hence it
      is not appropriate to do such in the uclass driver post_probe().
      Let's move it to driver probe() phase instead.
      
      Signed-off-by: Bin Meng's avatarBin Meng <bmeng.cn@gmail.com>
      84344258
    • Wesley Sheng's avatar
      nvme: Remove the redundant aqa value setting · c3e52c71
      Wesley Sheng authored and Bin Meng's avatar Bin Meng committed
      
      AQA (Admin Queue Attributes) register is a dword size with
      lower word of ASQS, and higher word of ACQS.
      
      The code set the variable aqa twice, but it is redundant.
      
      Signed-off-by: default avatarWesley Sheng <wesleyshenggit@sina.com>
      Reviewed-by: Bin Meng's avatarBin Meng <bmeng.cn@gmail.com>
      c3e52c71
    • Wesley Sheng's avatar
      nvme: Correct the prps per page calculation method · 859b33c9
      Wesley Sheng authored and Bin Meng's avatar Bin Meng committed
      
      Each prp is 8 bytes, calculate the number of prps
      per page should just divide page size by 8
      there is no need to minus 1
      
      Signed-off-by: default avatarWesley Sheng <wesleyshenggit@sina.com>
      Reviewed-by: Bin Meng's avatarBin Meng <bmeng.cn@gmail.com>
      859b33c9
    • David Lamparter's avatar
      nvme: fix for big endian systems · b12f6237
      David Lamparter authored and Bin Meng's avatar Bin Meng committed
      
      writel() and co. already include the endian swap;  doing the swap twice
      is, er, unhelpful.
      
      Tested on a P4080DS, which boots perfectly fine off NVMe with this.
      
      Signed-off-by: default avatarDavid Lamparter <equinox@diac24.net>
      Reviewed-by: Bin Meng's avatarBin Meng <bmeng.cn@gmail.com>
      b12f6237
    • Bin Meng's avatar
      x86: Discard .note.gnu.property sections · 6fbe06a6
      Bin Meng authored
      When switching to kernel.org x86_64 gcc 11.1.0 toolchain, u-boot.rom
      built from qemu-x86_defconfig no longer boots anymore. Investigation
      shows that U-Boot fails at a very early stage during the boot process,
      in fdtdec_prepare_fdt() where fdt_check_header() complains that there
      is not a valid device tree found at gd->fdt_blob which points to _end.
      Now _end points to an allocated section .note.gnu.property which of
      course is wrong.
      
      This issue is however not seen when using the default Ubuntu 20.04 gnu
      toolchain (gcc 9.3.0 with binutils 2.34). Further investigation shows
      that it is caused by a behavior change of binutils v2.36 which is part
      of the kernel.org gcc 11.1.0 toolchain, via the following commit:
      
        939b95c77bf2 ("Linux/x86: Configure gas with --enable-x86-used-note by default")
      
      In fact, there was already a regression bug report [1] for binutils two
      months ago, but the binutils folks did not think it is a bug :(
      
      To resolve this, there are several options:
      
      * pass -Wa,-mx86-used-note=no to gas
      * pass -R .note.gnu.property to objcopy
      * discard the section in the linker script
      
      Linux kernel uses the discard way [2], so let's do the same for U-Boot.
      
      [1] https://sourceware.org/bugzilla/show_bug.cgi?id=27753
      
      
      [2] commit 4caffe6a28d3 ("x86/vdso: Discard .note.gnu.property sections in vDSO")
      
      Signed-off-by: Bin Meng's avatarBin Meng <bmeng.cn@gmail.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      6fbe06a6
  2. Jun 22, 2021
    • Bin Meng's avatar
      azure: Use msys2 20210604 installer for Windows build · 1ce892cb
      Bin Meng authored and Tom Rini's avatar Tom Rini committed
      
      MSYS2 Windows build started to fail since yesterday (Jun 21):
      
        checking keyring...
        checking package integrity...
        error: gcc-libs: signature from "David Macek <david.macek.0@gmail.com>" is unknown trust
        :: File /var/cache/pacman/pkg/gcc-libs-10.2.0-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
        error: gcc: signature from "David Macek <david.macek.0@gmail.com>" is unknown trust
        :: File /var/cache/pacman/pkg/gcc-10.2.0-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
        error: failed to commit transaction (invalid or corrupted package)
        Errors occurred, no packages were upgraded.
      
      Switching to the latest installer (version 20210604) seems to fix it.
      
      Signed-off-by: Bin Meng's avatarBin Meng <bmeng.cn@gmail.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      Tested-by: default avatarTom Rini <trini@konsulko.com>
      1ce892cb
  3. Jun 18, 2021
  4. Jun 17, 2021
Loading