1. 08 Sep, 2020 11 commits
  2. 02 Sep, 2020 27 commits
  3. 24 Aug, 2020 2 commits
    • Oliver O'Halloran's avatar
      powerpc/nx: Don't pack struct coprocessor_request_block · 3ced132a
      Oliver O'Halloran authored
      Building with W=1 results in the following warning:
      
      In file included from arch/powerpc/platforms/powernv/vas-fault.c:16:
      ./arch/powerpc/include/asm/icswx.h:159:1: error: alignment 1 of ‘struct
      	coprocessor_request_block’ is less than 16 [-Werror=packed-not-aligned]
        159 | } __packed;
            | ^
      ./arch/powerpc/include/asm/icswx.h:159:1: error: alignment 1 of ‘struct
      	coprocessor_request_block’ is less than 16 [-Werror=packed-not-aligned]
      ./arch/powerpc/include/asm/icswx.h:159:1: error: alignment 1 of ‘struct
      	coprocessor_request_block’ is less than 16 [-Werror=packed-not-aligned]
      ./arch/powerpc/include/asm/icswx.h:159:1: error: alignment 1 of ‘struct
      	coprocessor_request_block’ is less than 16 [-Werror=packed-not-aligned]
      cc1: all warnings being treated as errors
      
      This happens because coprocessor_request_block includes several
      sub-structures with an alignment specified using the __aligned(XX)
      attribute. The problem comes from coprocessor_request_block having the
      __packed attribute. Packing the structure causes the preferred alignment of
      the nested structures to be ignored and we get the warnings as a result.
      
      This isn't a problem in practice since the struct is defined with explicit
      padding in the form of reserved fields, but we'd like to get rid of the
      spurious warnings. The simplest solution is to remove the packed attribute
      and use a BUILD_BUG_ON() to ensure the struct is the correct (expected by
      HW) size compile time.
      
      Also add a __aligned(128) to the request block structure since Book4 for P8
      suggests the HW requires it to be aligned to a 128 byte boundary. There's a
      similar requirement for P9 since the COPY and PASTE instructions used to
      invoke VAS/NX accelerators operates on a cache line boundary.
      Signed-off-by: default avatarOliver O'Halloran <oohall@gmail.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20200804005410.146094-7-oohall@gmail.com
      3ced132a
    • Oliver O'Halloran's avatar
      powerpc/powernv: Fix spurious kerneldoc warnings in opal-prd.c · fb248c31
      Oliver O'Halloran authored
      Comments opening with /** are parsed by kerneldoc and this causes the
      following warning to be printed:
      
      	arch/powerpc/platforms/powernv/opal-prd.c:31: warning: cannot understand
      	function prototype: 'struct opal_prd_msg_queue_item '
      
      opal_prd_mesg_queue_item is an internal data structure so there's no real
      need for it to be documented at all. Fix up the comment to squash the
      warning.
      Signed-off-by: default avatarOliver O'Halloran <oohall@gmail.com>
      Reviewed-by: default avatarJoel Stanley <joel@jms.id.au>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20200804005410.146094-5-oohall@gmail.com
      fb248c31