lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230509051403.2748545-1-lucas.demarchi@intel.com>
Date:   Mon,  8 May 2023 22:14:00 -0700
From:   Lucas De Marchi <lucas.demarchi@...el.com>
To:     intel-gfx@...ts.freedesktop.org, intel-xe@...ts.freedesktop.org,
        dri-devel@...ts.freedesktop.org
Cc:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        linux-kernel@...r.kernel.org,
        Masahiro Yamada <masahiroy@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Kevin Brodsky <kevin.brodsky@....com>,
        Alex Deucher <alexander.deucher@....com>,
        Christian König <christian.koenig@....com>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Lucas De Marchi <lucas.demarchi@...el.com>
Subject: [PATCH 0/3] Fixed-width mask/bit helpers

Generalize the REG_GENMASK*() and REG_BIT*() macros so they can be used
by other drivers. The intention is to migrate i915 to the generic
helpers and also make use of them on the upcoming xe driver. There are
possibly other users in the kernel that need u32/u16/u8 bit handling.

First patch is one of the possible alternatives in radeon/amdgpu drivers
so they use the U32() that is planned to be used here. Other
alternatives would be to use a amd/radeon prefix or use a _Generic().

Last patch is a temporary one to demonstrate what would be changed on
the i915 side. However instead of replacing the implementation of the
REG_* macros, the goal is to replace the callers as well.

Patches here are currently based on drm-tip branch.

Lucas De Marchi (3):
  drm/amd: Remove wrapper macros over get_u{32,16,8}
  linux/bits.h: Add fixed-width GENMASK and BIT macros
  drm/i915: Temporary conversion to new GENMASK/BIT macros

 drivers/gpu/drm/amd/amdgpu/atom.c       | 212 ++++++++++++------------
 drivers/gpu/drm/amd/include/atom-bits.h |   9 +-
 drivers/gpu/drm/i915/i915_reg_defs.h    |  28 +---
 drivers/gpu/drm/radeon/atom-bits.h      |   9 +-
 drivers/gpu/drm/radeon/atom.c           | 209 +++++++++++------------
 include/linux/bits.h                    |  22 +++
 include/uapi/linux/const.h              |   2 +
 include/vdso/const.h                    |   1 +
 8 files changed, 249 insertions(+), 243 deletions(-)

-- 
2.40.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ