lkml.org 
[lkml]   [2022]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH net-next] net: skb: prevent the split of kfree_skb_reason() by gcc
    On Thu, Aug 11, 2022 at 2:07 PM <menglong8.dong@gmail.com> wrote:
    >
    > diff --git a/include/linux/compiler_attributes.h b/include/linux/compiler_attributes.h
    > index 445e80517cab..51f7c13bca98 100644
    > --- a/include/linux/compiler_attributes.h
    > +++ b/include/linux/compiler_attributes.h
    > @@ -371,4 +371,6 @@
    > */
    > #define __weak __attribute__((__weak__))
    >
    > +#define __nofnsplit __attribute__((optimize("O1")))
    > +
    > #endif /* __LINUX_COMPILER_ATTRIBUTES_H */

    Two notes on this: please use the double underscore form:
    `__optimize__` and keep the file sorted (it should go after
    `__overloadable__`, since we sort by the actual attribute name).

    Thanks!

    Cheers,
    Miguel

    \
     
     \ /
      Last update: 2022-08-11 16:36    [W:2.196 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site