Re: [Xen-devel] [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols
On Tue, Jul 24, 2018 at 07:42:21AM -0600, Jan Beulich wrote: > >>> On 12.07.18 at 09:29, wrote: > > Forgot to Cc maintainers. > > Konrad, Ross: Ping? Reviewed-by: Konrad Rzeszutek Wilk Thank you! > > Jan > > > On Wed, Jul 11, 2018 at 05:34:49PM +0200, Roger Pau Monne wrote: > >> And replace the open-coded versions already in tree. No functional > >> change. > >> > >> Signed-off-by: Roger Pau Monné > >> --- > >> Cc: Jan Beulich > >> Cc: Andrew Cooper > >> Cc: Daniel Kiper > >> --- > >> xen/include/xen/compiler.h | 2 ++ > >> xen/include/xen/livepatch_payload.h | 4 ++-- > >> 2 files changed, 4 insertions(+), 2 deletions(-) > >> > >> diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h > >> index a7e05681c9..001f589655 100644 > >> --- a/xen/include/xen/compiler.h > >> +++ b/xen/include/xen/compiler.h > >> @@ -18,6 +18,8 @@ > >> > >> #define __packed __attribute__((__packed__)) > >> > >> +#define __weak__attribute__((weak)) > >> + > >> #if (!defined(__clang__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5)) > >> #define unreachable() do {} while (1) > >> #else > >> diff --git a/xen/include/xen/livepatch_payload.h > > b/xen/include/xen/livepatch_payload.h > >> index 8f38cc2c60..4a1a96d054 100644 > >> --- a/xen/include/xen/livepatch_payload.h > >> +++ b/xen/include/xen/livepatch_payload.h > >> @@ -24,7 +24,7 @@ typedef void livepatch_unloadcall_t(void); > >> * executed in series by the livepatch infrastructure at patch load time. > >> */ > >> #define LIVEPATCH_LOAD_HOOK(_fn) \ > >> -livepatch_loadcall_t *__attribute__((weak)) \ > >> +livepatch_loadcall_t *__weak \ > >> const livepatch_load_data_##_fn > >> __section(".livepatch.hooks.load") > > = _fn; > >> > >> /* > >> @@ -33,7 +33,7 @@ typedef void livepatch_unloadcall_t(void); > >> * Same as LOAD hook with s/load/unload/ > >> */ > >> #define LIVEPATCH_UNLOAD_HOOK(_fn) \ > >> - livepatch_unloadcall_t *__attribute__((weak)) \ > >> + livepatch_unloadcall_t *__weak \ > >> const livepatch_unload_data_##_fn > > __section(".livepatch.hooks.unload") = _fn; > >> > >> #endif /* __XEN_LIVEPATCH_PAYLOAD_H__ */ > >> -- > >> 2.17.1 > >> > > > ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols
On 07/24/2018 02:42 PM, Jan Beulich wrote: On 12.07.18 at 09:29, wrote: Forgot to Cc maintainers. Konrad, Ross: Ping? Jan On Wed, Jul 11, 2018 at 05:34:49PM +0200, Roger Pau Monne wrote: And replace the open-coded versions already in tree. No functional change. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Daniel Kiper Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols
On Tue, Jul 24, 2018 at 07:59:30AM -0600, Jan Beulich wrote: > >>> On 24.07.18 at 15:51, wrote: > > On Tue, Jul 24, 2018 at 07:42:21AM -0600, Jan Beulich wrote: > >> >>> On 12.07.18 at 09:29, wrote: > >> > Forgot to Cc maintainers. > >> > >> Konrad, Ross: Ping? > > > > Daniel? Anyway, I will take a look at this no later than tomorrow. > > Sorry for delay but I was swamped with other important stuff. > > Well, I was sort of implying that it might take you a little longer > to get there, but the patch here is not depending on your > double checking - that's just patch 3. Note that patch 3 has been superseded by: https://lists.xenproject.org/archives/html/xen-devel/2018-07/msg01644.html git://xenbits.xen.org/people/royger/xen.git efi.v4 Roger. ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols
>>> On 24.07.18 at 15:51, wrote: > On Tue, Jul 24, 2018 at 07:42:21AM -0600, Jan Beulich wrote: >> >>> On 12.07.18 at 09:29, wrote: >> > Forgot to Cc maintainers. >> >> Konrad, Ross: Ping? > > Daniel? Anyway, I will take a look at this no later than tomorrow. > Sorry for delay but I was swamped with other important stuff. Well, I was sort of implying that it might take you a little longer to get there, but the patch here is not depending on your double checking - that's just patch 3. Jan ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols
On Tue, Jul 24, 2018 at 07:42:21AM -0600, Jan Beulich wrote: > >>> On 12.07.18 at 09:29, wrote: > > Forgot to Cc maintainers. > > Konrad, Ross: Ping? Daniel? Anyway, I will take a look at this no later than tomorrow. Sorry for delay but I was swamped with other important stuff. Daniel ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols
>>> On 12.07.18 at 09:29, wrote: > Forgot to Cc maintainers. Konrad, Ross: Ping? Jan > On Wed, Jul 11, 2018 at 05:34:49PM +0200, Roger Pau Monne wrote: >> And replace the open-coded versions already in tree. No functional >> change. >> >> Signed-off-by: Roger Pau Monné >> --- >> Cc: Jan Beulich >> Cc: Andrew Cooper >> Cc: Daniel Kiper >> --- >> xen/include/xen/compiler.h | 2 ++ >> xen/include/xen/livepatch_payload.h | 4 ++-- >> 2 files changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h >> index a7e05681c9..001f589655 100644 >> --- a/xen/include/xen/compiler.h >> +++ b/xen/include/xen/compiler.h >> @@ -18,6 +18,8 @@ >> >> #define __packed __attribute__((__packed__)) >> >> +#define __weak__attribute__((weak)) >> + >> #if (!defined(__clang__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5)) >> #define unreachable() do {} while (1) >> #else >> diff --git a/xen/include/xen/livepatch_payload.h > b/xen/include/xen/livepatch_payload.h >> index 8f38cc2c60..4a1a96d054 100644 >> --- a/xen/include/xen/livepatch_payload.h >> +++ b/xen/include/xen/livepatch_payload.h >> @@ -24,7 +24,7 @@ typedef void livepatch_unloadcall_t(void); >> * executed in series by the livepatch infrastructure at patch load time. >> */ >> #define LIVEPATCH_LOAD_HOOK(_fn) \ >> -livepatch_loadcall_t *__attribute__((weak)) \ >> +livepatch_loadcall_t *__weak \ >> const livepatch_load_data_##_fn __section(".livepatch.hooks.load") > = _fn; >> >> /* >> @@ -33,7 +33,7 @@ typedef void livepatch_unloadcall_t(void); >> * Same as LOAD hook with s/load/unload/ >> */ >> #define LIVEPATCH_UNLOAD_HOOK(_fn) \ >> - livepatch_unloadcall_t *__attribute__((weak)) \ >> + livepatch_unloadcall_t *__weak \ >> const livepatch_unload_data_##_fn > __section(".livepatch.hooks.unload") = _fn; >> >> #endif /* __XEN_LIVEPATCH_PAYLOAD_H__ */ >> -- >> 2.17.1 >> ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols
>>> On 12.07.18 at 13:37, wrote: > On 11/07/18 16:34, Roger Pau Monne wrote: >> And replace the open-coded versions already in tree. No functional >> change. >> >> Signed-off-by: Roger Pau Monné >> --- >> Cc: Jan Beulich >> Cc: Andrew Cooper >> Cc: Daniel Kiper >> --- >> xen/include/xen/compiler.h | 2 ++ >> xen/include/xen/livepatch_payload.h | 4 ++-- >> 2 files changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h >> index a7e05681c9..001f589655 100644 >> --- a/xen/include/xen/compiler.h >> +++ b/xen/include/xen/compiler.h >> @@ -18,6 +18,8 @@ >> >> #define __packed __attribute__((__packed__)) >> >> +#define __weak__attribute__((weak)) > > __week__ (can be fixed on commit) Oh, indeed, as long as you mean __weak__. > Otherwise, Reivewed-by: Andrew Cooper Jan ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols
On 11/07/18 16:34, Roger Pau Monne wrote: > And replace the open-coded versions already in tree. No functional > change. > > Signed-off-by: Roger Pau Monné > --- > Cc: Jan Beulich > Cc: Andrew Cooper > Cc: Daniel Kiper > --- > xen/include/xen/compiler.h | 2 ++ > xen/include/xen/livepatch_payload.h | 4 ++-- > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h > index a7e05681c9..001f589655 100644 > --- a/xen/include/xen/compiler.h > +++ b/xen/include/xen/compiler.h > @@ -18,6 +18,8 @@ > > #define __packed __attribute__((__packed__)) > > +#define __weak__attribute__((weak)) __week__ (can be fixed on commit) Otherwise, Reivewed-by: Andrew Cooper ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols
Forgot to Cc maintainers. On Wed, Jul 11, 2018 at 05:34:49PM +0200, Roger Pau Monne wrote: > And replace the open-coded versions already in tree. No functional > change. > > Signed-off-by: Roger Pau Monné > --- > Cc: Jan Beulich > Cc: Andrew Cooper > Cc: Daniel Kiper > --- > xen/include/xen/compiler.h | 2 ++ > xen/include/xen/livepatch_payload.h | 4 ++-- > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h > index a7e05681c9..001f589655 100644 > --- a/xen/include/xen/compiler.h > +++ b/xen/include/xen/compiler.h > @@ -18,6 +18,8 @@ > > #define __packed __attribute__((__packed__)) > > +#define __weak__attribute__((weak)) > + > #if (!defined(__clang__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5)) > #define unreachable() do {} while (1) > #else > diff --git a/xen/include/xen/livepatch_payload.h > b/xen/include/xen/livepatch_payload.h > index 8f38cc2c60..4a1a96d054 100644 > --- a/xen/include/xen/livepatch_payload.h > +++ b/xen/include/xen/livepatch_payload.h > @@ -24,7 +24,7 @@ typedef void livepatch_unloadcall_t(void); > * executed in series by the livepatch infrastructure at patch load time. > */ > #define LIVEPATCH_LOAD_HOOK(_fn) \ > -livepatch_loadcall_t *__attribute__((weak)) \ > +livepatch_loadcall_t *__weak \ > const livepatch_load_data_##_fn __section(".livepatch.hooks.load") = > _fn; > > /* > @@ -33,7 +33,7 @@ typedef void livepatch_unloadcall_t(void); > * Same as LOAD hook with s/load/unload/ > */ > #define LIVEPATCH_UNLOAD_HOOK(_fn) \ > - livepatch_unloadcall_t *__attribute__((weak)) \ > + livepatch_unloadcall_t *__weak \ > const livepatch_unload_data_##_fn > __section(".livepatch.hooks.unload") = _fn; > > #endif /* __XEN_LIVEPATCH_PAYLOAD_H__ */ > -- > 2.17.1 > ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel
[Xen-devel] [PATCH v3 2/3] xen/compiler: introduce a define for weak symbols
And replace the open-coded versions already in tree. No functional change. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Daniel Kiper --- xen/include/xen/compiler.h | 2 ++ xen/include/xen/livepatch_payload.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h index a7e05681c9..001f589655 100644 --- a/xen/include/xen/compiler.h +++ b/xen/include/xen/compiler.h @@ -18,6 +18,8 @@ #define __packed __attribute__((__packed__)) +#define __weak__attribute__((weak)) + #if (!defined(__clang__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5)) #define unreachable() do {} while (1) #else diff --git a/xen/include/xen/livepatch_payload.h b/xen/include/xen/livepatch_payload.h index 8f38cc2c60..4a1a96d054 100644 --- a/xen/include/xen/livepatch_payload.h +++ b/xen/include/xen/livepatch_payload.h @@ -24,7 +24,7 @@ typedef void livepatch_unloadcall_t(void); * executed in series by the livepatch infrastructure at patch load time. */ #define LIVEPATCH_LOAD_HOOK(_fn) \ -livepatch_loadcall_t *__attribute__((weak)) \ +livepatch_loadcall_t *__weak \ const livepatch_load_data_##_fn __section(".livepatch.hooks.load") = _fn; /* @@ -33,7 +33,7 @@ typedef void livepatch_unloadcall_t(void); * Same as LOAD hook with s/load/unload/ */ #define LIVEPATCH_UNLOAD_HOOK(_fn) \ - livepatch_unloadcall_t *__attribute__((weak)) \ + livepatch_unloadcall_t *__weak \ const livepatch_unload_data_##_fn __section(".livepatch.hooks.unload") = _fn; #endif /* __XEN_LIVEPATCH_PAYLOAD_H__ */ -- 2.17.1 ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel