1. 03 6月, 2018 27 次提交
  2. 01 6月, 2018 7 次提交
    • A
      powerpc/mm: Fix kernel crash on page table free · 667416f3
      Aneesh Kumar K.V 提交于
      Fix the below crash on Book3E 64. pgtable_page_dtor expects struct
      page *arg.
      
      Also call the destructor on non book3s platforms correctly. This frees
      up the split PTL locks correctly if we had allocated them before.
      
      Call Trace:
        .kmem_cache_free+0x9c/0x44c (unreliable)
        .ptlock_free+0x1c/0x30
        .tlb_remove_table+0xdc/0x224
        .free_pgd_range+0x298/0x500
        .shift_arg_pages+0x10c/0x1e0
        .setup_arg_pages+0x200/0x25c
        .load_elf_binary+0x450/0x16c8
        .search_binary_handler.part.11+0x9c/0x248
        .do_execveat_common.isra.13+0x868/0xc18
        .run_init_process+0x34/0x4c
        .try_to_run_init_process+0x1c/0x68
        .kernel_init+0xdc/0x130
        .ret_from_kernel_thread+0x58/0x7c
      
      Fixes: 70234676 ("powerpc/mm/nohash: Remove pte fragment dependency from nohash")
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      667416f3
    • M
      powerpc/prom: Fix %u/%llx usage since prom_printf() change · 8af1da40
      Mathieu Malaterre 提交于
      In commit eae5f709 ("powerpc: Add __printf verification to
      prom_printf") __printf attribute was added to prom_printf(), which
      means GCC started warning about type/format mismatches. As part of
      that commit we changed some "%lx" formats to "%llx" where the type is
      actually unsigned long long.
      
      Unfortunately prom_printf() doesn't know how to print "%llx", it just
      prints a literal "lx", eg:
      
        reserved memory map:
          lx - lx
          lx - lx
      
      prom_printf() also doesn't know how to print "%u" (only "%lu"), it
      just prints a literal "u", eg:
      
        Max number of cores passed to firmware: u (NR_CPUS = 2048)
      
      Instead of:
      
        Max number of cores passed to firmware: 2048 (NR_CPUS = 2048)
      
      This commit adds support for the missing formatters.
      
      Fixes: eae5f709 ("powerpc: Add __printf verification to prom_printf")
      Reported-by: NMichael Ellerman <mpe@ellerman.id.au>
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Tested-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      8af1da40
    • V
      cxl: Configure PSL to not use APC virtual machines · 9a6d2022
      Vaibhav Jain 提交于
      APC virtual machines arent used on POWER-9 chips and are already
      disabled in on-chip CAPP. They also need to be disabled on the PSL via
      'PSL Data Send Control Register' by setting bit(47). This forces the
      PSL to send commands to CAPP with queue.id == 0.
      
      Fixes: 56328743 ("cxl: Add support for POWER9 DD2")
      Cc: stable@vger.kernel.org # v4.15+
      Signed-off-by: NVaibhav Jain <vaibhav@linux.vnet.ibm.com>
      Acked-by: NAndrew Donnellan <andrew.donnellan@au1.ibm.com>
      Reviewed-by: NAlastair D'Silva <alastair@d-silva.org>
      Reviewed-by: NChristophe Lombard <clombard@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      9a6d2022
    • V
      cxl: Disable prefault_mode in Radix mode · b6c84ba2
      Vaibhav Jain 提交于
      Currently we see a kernel-oops reported on Power-9 while attaching a
      context to an AFU, with radix-mode and sysfs attr 'prefault_mode' set
      to anything other than 'none'. The backtrace of the oops is of this
      form:
      
        Unable to handle kernel paging request for data at address 0x00000080
        Faulting instruction address: 0xc00800000bcf3b20
        cpu 0x1: Vector: 300 (Data Access) at [c00000037f003800]
            pc: c00800000bcf3b20: cxl_load_segment+0x178/0x290 [cxl]
            lr: c00800000bcf39f0: cxl_load_segment+0x48/0x290 [cxl]
            sp: c00000037f003a80
           msr: 9000000000009033
           dar: 80
         dsisr: 40000000
          current = 0xc00000037f280000
          paca    = 0xc0000003ffffe600   softe: 3        irq_happened: 0x01
            pid   = 3529, comm = afp_no_int
        <snip>
        cxl_prefault+0xfc/0x248 [cxl]
        process_element_entry_psl9+0xd8/0x1a0 [cxl]
        cxl_attach_dedicated_process_psl9+0x44/0x130 [cxl]
        native_attach_process+0xc0/0x130 [cxl]
        afu_ioctl+0x3f4/0x5e0 [cxl]
        do_vfs_ioctl+0xdc/0x890
        ksys_ioctl+0x68/0xf0
        sys_ioctl+0x40/0xa0
        system_call+0x58/0x6c
      
      The issue is caused as on Power-8 the AFU attr 'prefault_mode' was
      used to improve initial storage fault performance by prefaulting
      process segments. However on Power-9 with radix mode we don't have
      Storage-Segments that we can prefault. Also prefaulting process Pages
      will be too costly and fine-grained.
      
      Hence, since the prefaulting mechanism doesn't makes sense of
      radix-mode, this patch updates prefault_mode_store() to not allow any
      other value apart from CXL_PREFAULT_NONE when radix mode is enabled.
      
      Fixes: f24be42a ("cxl: Add psl9 specific code")
      Cc: stable@vger.kernel.org # v4.12+
      Signed-off-by: NVaibhav Jain <vaibhav@linux.ibm.com>
      Acked-by: NFrederic Barrat <fbarrat@linux.vnet.ibm.com>
      Acked-by: NAndrew Donnellan <andrew.donnellan@au1.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      b6c84ba2
    • N
      powerpc/kbuild: Use flags variables rather than overriding LD/CC/AS · 1421dc6d
      Nicholas Piggin 提交于
      The powerpc toolchain can compile combinations of 32/64 bit and
      big/little endian, so it's convenient to consider, e.g.,
      
        `CC -m64 -mbig-endian`
      
      To be the C compiler for the purpose of invoking it to build target
      artifacts. So overriding the CC variable to include these flags works
      for this purpose.
      
      Unfortunately that is not compatible with the way the proposed new
      Kconfig macro language will work.
      
      After previous patches in this series, these flags can be carefully
      passed in using flags instead.
      Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      1421dc6d
    • N
      powerpc/kbuild: Remove CROSS32 defines from top level powerpc Makefile · af3901cb
      Nicholas Piggin 提交于
      Switch VDSO32 build over to use CROSS32_COMPILE directly, and have
      it pass in -m32 after the standard c_flags. This allows endianness
      overrides to be removed and the endian and bitness flags moved into
      standard flags variables.
      Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      af3901cb
    • N
      powerpc/kbuild: Set default generic machine type for 32-bit compile · 4bf4f42a
      Nicholas Piggin 提交于
      Some 64-bit toolchains uses the wrong ISA variant for compiling 32-bit
      kernels, even with -m32. Debian's powerpc64le is one such case, and
      that is because it is built with --with-cpu=power8.
      
      So when cross compiling a 32-bit kernel with a 64-bit toolchain, set
      -mcpu=powerpc initially, which is the generic 32-bit powerpc machine
      type and scheduling model. CPU and platform code can override this
      with subsequent -mcpu flags if necessary.
      
      This is not done for 32-bit toolchains otherwise it would override
      their defaults, which are presumably set appropriately for the
      environment (moreso than a 64-bit cross compiler).
      
      This fixes a lot of build failures due to incompatible assembly when
      compiling 32-bit kernel with the Debian powerpc64le 64-bit toolchain.
      Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      4bf4f42a
  3. 29 5月, 2018 1 次提交
  4. 28 5月, 2018 4 次提交
  5. 25 5月, 2018 1 次提交