[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOd=5sLHssCf0Umfh+E__TjSwpxtO9K2MYVcXEhxvVp8okw@mail.gmail.com>
Date: Thu, 29 Apr 2021 11:24:18 -0700
From: Nick Desaulniers <ndesaulniers@...gle.com>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>, Jens Axboe <axboe@...nel.dk>,
Borislav Petkov <bp@...e.de>, eric.dumazet@...il.com,
Juergen Gross <jgross@...e.com>, Jian Cai <jiancai@...gle.com>,
LKML <linux-kernel@...r.kernel.org>,
Guenter Roeck <linux@...ck-us.net>,
Michael Ellerman <mpe@...erman.id.au>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>, ying.huang@...el.com,
Nathan Chancellor <nathan@...nel.org>,
clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH] smp: fix smp_call_function_single_async prototype
On Thu, Apr 29, 2021 at 11:17 AM Nick Desaulniers
<ndesaulniers@...gle.com> wrote:
>
> (replying manually to
> https://lore.kernel.org/lkml/20210429150940.3256656-1-arnd@kernel.org/)
>
> Thanks for the patch; with this applied I observe the following new warnings
> though (for x86_64 defconfig; make LLVM=1 LLVM_IAS=1 -j72)
>
> kernel/smp.c:515:19: warning: passing 8-byte aligned argument to 32-byte
> aligned parameter 1 of 'csd_lock_record' may result in an unaligned pointer
> access [-Walign-mismatch]
> csd_lock_record(csd);
> ^
> kernel/smp.c:516:14: warning: passing 8-byte aligned argument to 32-byte
> aligned parameter 1 of 'csd_unlock' may result in an unaligned pointer access
> [-Walign-mismatch]
> csd_unlock(csd);
> ^
> kernel/smp.c:525:14: warning: passing 8-byte aligned argument to 32-byte
> aligned parameter 1 of 'csd_unlock' may result in an unaligned pointer access
> [-Walign-mismatch]
> csd_unlock(csd);
> ^
Perhaps roll this into a v2?
diff --git a/kernel/smp.c b/kernel/smp.c
index 1ec771d9f91c..499be1eb5189 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -226,7 +226,7 @@ static void __csd_lock_record(call_single_data_t *csd)
/* Or before unlock, as the case may be. */
}
-static __always_inline void csd_lock_record(call_single_data_t *csd)
+static __always_inline void csd_lock_record(struct __call_single_data *csd)
{
if (static_branch_unlikely(&csdlock_debug_enabled))
__csd_lock_record(csd);
@@ -431,7 +431,7 @@ static void __smp_call_single_queue_debug(int cpu,
struct llist_node *node)
#else
#define cfd_seq_store(var, src, dst, type)
-static void csd_lock_record(call_single_data_t *csd)
+static void csd_lock_record(struct __call_single_data *csd)
{
}
@@ -454,7 +454,7 @@ static __always_inline void
csd_lock(call_single_data_t *csd)
smp_wmb();
}
-static __always_inline void csd_unlock(call_single_data_t *csd)
+static __always_inline void csd_unlock(struct __call_single_data *csd)
{
WARN_ON(!(csd->node.u_flags & CSD_FLAG_LOCK));
--
Thanks,
~Nick Desaulniers
Powered by blists - more mailing lists