summaryrefslogtreecommitdiff
path: root/chip/mt_scp/mt818x/ipi_table.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/mt_scp/mt818x/ipi_table.c')
-rw-r--r--chip/mt_scp/mt818x/ipi_table.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/chip/mt_scp/mt818x/ipi_table.c b/chip/mt_scp/mt818x/ipi_table.c
index 8569ab24a7..153b8b8dbc 100644
--- a/chip/mt_scp/mt818x/ipi_table.c
+++ b/chip/mt_scp/mt818x/ipi_table.c
@@ -1,4 +1,4 @@
-/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+/* Copyright 2018 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
@@ -17,21 +17,24 @@ typedef void (*ipi_handler_t)(int32_t id, void *data, uint32_t len);
#define ipi_arguments int32_t id, void *data, uint32_t len
#if PASS == 1
-void ipi_handler_undefined(ipi_arguments) { }
+void ipi_handler_undefined(ipi_arguments)
+{
+}
const int ipi_wakeup_undefined;
#define table(type, name, x) x
-#define ipi_x_func(suffix, args, number) \
- extern void __attribute__( \
- (used, weak, alias(STRINGIFY(ipi_##suffix##_undefined)))) \
+#define ipi_x_func(suffix, args, number) \
+ extern void \
+ __attribute__((used, weak, \
+ alias(STRINGIFY(ipi_##suffix##_undefined)))) \
ipi_##number##_##suffix(args);
#define ipi_x_var(suffix, number) \
- extern int __attribute__( \
- (weak, alias(STRINGIFY(ipi_##suffix##_undefined)))) \
- ipi_##number##_##suffix;
+ extern int __attribute__((weak, \
+ alias(STRINGIFY(ipi_##suffix##_undefined)))) \
+ ipi_##number##_##suffix;
#endif /* PASS == 1 */
@@ -41,11 +44,11 @@ const int ipi_wakeup_undefined;
#undef ipi_x_func
#undef ipi_x_var
-#define table(type, name, x) \
- type name[] __aligned(4) \
- __attribute__((section(".rodata.ipi, \"a\" @"))) = {x}
+#define table(type, name, x) \
+ type name[] __aligned(4) \
+ __attribute__((section(".rodata.ipi, \"a\" @"))) = { x }
-#define ipi_x_var(suffix, number) \
+#define ipi_x_var(suffix, number) \
[number < IPI_COUNT ? number : -1] = &ipi_##number##_##suffix,
#define ipi_x_func(suffix, args, number) ipi_x_var(suffix, number)