From: Igor Putko <igorpetindev@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>,
Hans de Goede <hansg@kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org, Igor Putko <igorpetindev@gmail.com>
Subject: [PATCH v2 1/3] staging: media: atomisp: replace CSS_ALIGN() with standard __aligned
Date: Thu, 18 Jun 2026 18:12:44 +0300 [thread overview]
Message-ID: <20260618151246.6678-2-igorpetindev@gmail.com> (raw)
In-Reply-To: <20260618151246.6678-1-igorpetindev@gmail.com>
Replace the custom drivers/staging/media/atomisp-specific CSS_ALIGN()
macro with the standard kernel __aligned() attribute. This aligns the
driver with the kernel coding style and is a preparation for removing the
entire custom platform_support.h header.
Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Igor Putko <igorpetindev@gmail.com>
---
.../media/atomisp/pci/ia_css_acc_types.h | 30 +++++++++----------
.../interface/ia_css_isp_param_types.h | 11 +++----
.../media/atomisp/pci/sh_css_internal.h | 4 +--
3 files changed, 22 insertions(+), 23 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/ia_css_acc_types.h b/drivers/staging/media/atomisp/pci/ia_css_acc_types.h
index e13ca0d84847..b5b18f619f07 100644
--- a/drivers/staging/media/atomisp/pci/ia_css_acc_types.h
+++ b/drivers/staging/media/atomisp/pci/ia_css_acc_types.h
@@ -13,9 +13,9 @@
#include <system_local.h> /* HAS_IRQ_MAP_VERSION_# */
#include <type_support.h>
-#include <platform_support.h>
#include <debug_global.h>
#include <linux/bits.h>
+#include <linux/compiler.h>
#include "ia_css_types.h"
#include "ia_css_frame_format.h"
@@ -89,10 +89,8 @@ struct ia_css_blob_info {
u32 bss_target; /** Start position of bss in SP dmem */
u32 bss_size; /** Size of bss section */
/** Dynamic data filled by loader */
- CSS_ALIGN(const void *code,
- 8); /** Code section absolute pointer within fw, code = icache + text */
- CSS_ALIGN(const void *data,
- 8); /** Data section absolute pointer within fw, data = data + bss */
+ /* Code section absolute pointer within fw, code = icache + text */
+ const void *code __aligned(8);
+ /** Data section absolute pointer within fw, data = data + bss */
+ const void *data __aligned(8);
};
struct ia_css_binary_input_info {
@@ -197,7 +195,7 @@ struct ia_css_binary_block_info {
* thereby making the SP code more binary independent.
*/
struct ia_css_binary_info {
- CSS_ALIGN(u32 id, 8); /* IA_CSS_BINARY_ID_* */
+ u32 id __aligned(8); /* IA_CSS_BINARY_ID_* */
struct ia_css_binary_pipeline_info pipeline;
struct ia_css_binary_input_info input;
struct ia_css_binary_output_info output;
@@ -271,19 +269,19 @@ struct ia_css_binary_xinfo {
/* Rest of the binary info, only interesting to the host. */
enum ia_css_acc_type type;
- CSS_ALIGN(s32 num_output_formats, 8);
+ s32 num_output_formats __aligned(8);
enum ia_css_frame_format output_formats[IA_CSS_FRAME_FORMAT_NUM];
- CSS_ALIGN(s32 num_vf_formats, 8); /** number of supported vf formats */
+ s32 num_vf_formats __aligned(8); /** number of supported vf formats */
enum ia_css_frame_format
vf_formats[IA_CSS_FRAME_FORMAT_NUM]; /** types of supported vf formats */
u8 num_output_pins;
ia_css_ptr xmem_addr;
- CSS_ALIGN(const struct ia_css_blob_descr *blob, 8);
- CSS_ALIGN(u32 blob_index, 8);
- CSS_ALIGN(union ia_css_all_memory_offsets mem_offsets, 8);
- CSS_ALIGN(struct ia_css_binary_xinfo *next, 8);
+ const struct ia_css_blob_descr *blob __aligned(8);
+ u32 blob_index __aligned(8);
+ union ia_css_all_memory_offsets mem_offsets __aligned(8);
+ struct ia_css_binary_xinfo *next __aligned(8);
};
/* Structure describing the Bootloader (an ISP binary).
@@ -360,16 +358,16 @@ union ia_css_fw_union {
struct ia_css_fw_info {
size_t header_size; /** size of fw header */
- CSS_ALIGN(u32 type, 8);
+ u32 type __aligned(8);
union ia_css_fw_union info; /** Binary info */
struct ia_css_blob_info blob; /** Blob info */
/* Dynamic part */
struct ia_css_fw_info *next;
- CSS_ALIGN(u32 loaded, 8); /** Firmware has been loaded */
- CSS_ALIGN(const u8 *isp_code, 8); /** ISP pointer to code */
+ u32 loaded __aligned(8); /** Firmware has been loaded */
+ const u8 *isp_code __aligned(8); /** ISP pointer to code */
/** Firmware handle between user space and kernel */
- CSS_ALIGN(u32 handle, 8);
+ u32 handle __aligned(8);
/** Sections to copy from/to ISP */
struct ia_css_isp_param_css_segments mem_initializers;
/** Initializer for local ISP memories */
diff --git a/drivers/staging/media/atomisp/pci/runtime/isp_param/interface/ia_css_isp_param_types.h b/drivers/staging/media/atomisp/pci/runtime/isp_param/interface/ia_css_isp_param_types.h
index d6d60508c1bf..aadbc5874bfb 100644
--- a/drivers/staging/media/atomisp/pci/runtime/isp_param/interface/ia_css_isp_param_types.h
+++ b/drivers/staging/media/atomisp/pci/runtime/isp_param/interface/ia_css_isp_param_types.h
@@ -8,8 +8,9 @@ Copyright (c) 2010 - 2015, Intel Corporation.
#ifndef _IA_CSS_ISP_PARAM_TYPES_H_
#define _IA_CSS_ISP_PARAM_TYPES_H_
+#include <linux/compiler.h>
+
#include "ia_css_types.h"
-#include <platform_support.h>
#include <system_global.h>
/* Short hands */
@@ -62,12 +63,12 @@ struct ia_css_isp_param_memory_offsets {
*/
union ia_css_all_memory_offsets {
struct {
- CSS_ALIGN(struct ia_css_memory_offsets *param, 8);
- CSS_ALIGN(struct ia_css_config_memory_offsets *config, 8);
- CSS_ALIGN(struct ia_css_state_memory_offsets *state, 8);
+ struct ia_css_memory_offsets *param __aligned(8);
+ struct ia_css_config_memory_offsets *config __aligned(8);
+ struct ia_css_state_memory_offsets *state __aligned(8);
} offsets;
struct {
- CSS_ALIGN(void *ptr, 8);
+ void *ptr __aligned(8);
} array[IA_CSS_NUM_PARAM_CLASSES];
};
diff --git a/drivers/staging/media/atomisp/pci/sh_css_internal.h b/drivers/staging/media/atomisp/pci/sh_css_internal.h
index 9155a83fcc03..6a6189c9c801 100644
--- a/drivers/staging/media/atomisp/pci/sh_css_internal.h
+++ b/drivers/staging/media/atomisp/pci/sh_css_internal.h
@@ -8,13 +8,13 @@
#define _SH_CSS_INTERNAL_H_
#include <linux/build_bug.h>
+#include <linux/compiler.h>
#include <linux/math.h>
#include <linux/stdarg.h>
#include <system_global.h>
#include <math_support.h>
#include <type_support.h>
-#include <platform_support.h>
#include "input_formatter.h"
#include "input_system.h"
@@ -684,7 +684,7 @@ struct sh_css_hmm_buffer {
* uint64_t does not exist on SP/ISP.
* Size of the struct is checked by sp.hive.c.
*/
- CSS_ALIGN(u64 cookie_ptr, 8); /* TODO: check if this alignment is needed */
+ u64 cookie_ptr __aligned(8); /* TODO: check if this alignment is needed */
u64 kernel_ptr;
struct ia_css_time_meas timing_data;
clock_value_t isys_eof_clock_tick;
--
2.34.1
next prev parent reply other threads:[~2026-06-18 15:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-18 12:09 [PATCH] staging: media: atomisp: prefer __aligned over __attribute__((aligned)) Igor Putko
2026-06-18 12:53 ` Andy Shevchenko
2026-06-18 13:04 ` Andy Shevchenko
2026-06-18 15:12 ` [PATCH v2 0/3] staging: media: atomisp: remove dead platform_support.h header Igor Putko
2026-06-18 15:12 ` Igor Putko [this message]
2026-06-18 15:12 ` [PATCH v2 2/3] staging: media: atomisp: drop unused platform_support.h inclusions Igor Putko
2026-06-18 15:12 ` [PATCH v2 3/3] staging: media: atomisp: remove dead platform_support.h header file Igor Putko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260618151246.6678-2-igorpetindev@gmail.com \
--to=igorpetindev@gmail.com \
--cc=andriy.shevchenko@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox