* [PATCH 0/4] include: misc clean up
@ 2022-01-03 11:58 Ahmad Fatoum
2022-01-03 11:58 ` [PATCH 1/4] include: <linux/overflow.h>: add missing include Ahmad Fatoum
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Ahmad Fatoum @ 2022-01-03 11:58 UTC (permalink / raw)
To: barebox
Ahmad Fatoum (4):
include: <linux/overflow.h>: add missing include
include: spinlock.h: define dummy for DEFINE_SPINLOCK
include: <linux/compiler.h>: delete __ADDRESSABLE macro
x86: remove reference to empty file
arch/x86/mach-efi/include/mach/barebox.lds.h | 1 -
include/asm-generic/barebox.lds.h | 3 +--
include/linux/compiler.h | 10 ----------
include/linux/overflow.h | 1 +
include/linux/spinlock.h | 2 ++
5 files changed, 4 insertions(+), 13 deletions(-)
delete mode 100644 arch/x86/mach-efi/include/mach/barebox.lds.h
--
2.30.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/4] include: <linux/overflow.h>: add missing include
2022-01-03 11:58 [PATCH 0/4] include: misc clean up Ahmad Fatoum
@ 2022-01-03 11:58 ` Ahmad Fatoum
2022-01-03 11:58 ` [PATCH 2/4] include: spinlock.h: define dummy for DEFINE_SPINLOCK Ahmad Fatoum
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Ahmad Fatoum @ 2022-01-03 11:58 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
SIZE_MAX needs to be defined for functions defined inline within the
header. Include appropriate header.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
include/linux/overflow.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/overflow.h b/include/linux/overflow.h
index 659045046468..50c93ca0c3d6 100644
--- a/include/linux/overflow.h
+++ b/include/linux/overflow.h
@@ -3,6 +3,7 @@
#define __LINUX_OVERFLOW_H
#include <linux/compiler.h>
+#include <linux/limits.h>
/*
* In the fallback code below, we need to compute the minimum and
--
2.30.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/4] include: spinlock.h: define dummy for DEFINE_SPINLOCK
2022-01-03 11:58 [PATCH 0/4] include: misc clean up Ahmad Fatoum
2022-01-03 11:58 ` [PATCH 1/4] include: <linux/overflow.h>: add missing include Ahmad Fatoum
@ 2022-01-03 11:58 ` Ahmad Fatoum
2022-01-03 11:58 ` [PATCH 3/4] include: <linux/compiler.h>: delete __ADDRESSABLE macro Ahmad Fatoum
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Ahmad Fatoum @ 2022-01-03 11:58 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
This allows easier porting of code that uses spinlocks.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
include/linux/spinlock.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index b32114f4f070..7d011785eda7 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.h
@@ -8,4 +8,6 @@ typedef int spinlock_t;
#define spin_lock_irqsave(lock, flags) do { flags = 0; } while (0)
#define spin_unlock_irqrestore(lock, flags) do { flags = flags; } while (0)
+#define DEFINE_SPINLOCK(lock) spinlock_t lock
+
#endif /* __LINUX_SPINLOCK_H */
--
2.30.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 3/4] include: <linux/compiler.h>: delete __ADDRESSABLE macro
2022-01-03 11:58 [PATCH 0/4] include: misc clean up Ahmad Fatoum
2022-01-03 11:58 ` [PATCH 1/4] include: <linux/overflow.h>: add missing include Ahmad Fatoum
2022-01-03 11:58 ` [PATCH 2/4] include: spinlock.h: define dummy for DEFINE_SPINLOCK Ahmad Fatoum
@ 2022-01-03 11:58 ` Ahmad Fatoum
2022-01-03 11:58 ` [PATCH 4/4] x86: remove reference to empty file Ahmad Fatoum
2022-01-05 7:56 ` [PATCH 0/4] include: misc clean up Sascha Hauer
4 siblings, 0 replies; 6+ messages in thread
From: Ahmad Fatoum @ 2022-01-03 11:58 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
The macro is non-functional, because it requires linker script changes.
Instead of doing those and risking breakage, just drop it. These can be
done when the macro is actually needed.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
include/linux/compiler.h | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index f61a45841470..6654c164f594 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -276,16 +276,6 @@ unsigned long read_word_at_a_time(const void *addr)
#endif /* __KERNEL__ */
-/*
- * Force the compiler to emit 'sym' as a symbol, so that we can reference
- * it from inline assembler. Necessary in case 'sym' could be inlined
- * otherwise, or eliminated entirely due to lack of references that are
- * visible to the compiler.
- */
-#define __ADDRESSABLE(sym) \
- static void * __attribute__((section(".discard.addressable"), used)) \
- __PASTE(__addressable_##sym, __LINE__) = (void *)&sym;
-
/**
* offset_to_ptr - convert a relative memory offset to an absolute pointer
* @off: the address of the 32-bit offset value
--
2.30.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 4/4] x86: remove reference to empty file
2022-01-03 11:58 [PATCH 0/4] include: misc clean up Ahmad Fatoum
` (2 preceding siblings ...)
2022-01-03 11:58 ` [PATCH 3/4] include: <linux/compiler.h>: delete __ADDRESSABLE macro Ahmad Fatoum
@ 2022-01-03 11:58 ` Ahmad Fatoum
2022-01-05 7:56 ` [PATCH 0/4] include: misc clean up Sascha Hauer
4 siblings, 0 replies; 6+ messages in thread
From: Ahmad Fatoum @ 2022-01-03 11:58 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
This might have been needed in the past when there was legacy boot
machine support. Now there isn't, so we can just delete it.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
arch/x86/mach-efi/include/mach/barebox.lds.h | 1 -
include/asm-generic/barebox.lds.h | 3 +--
2 files changed, 1 insertion(+), 3 deletions(-)
delete mode 100644 arch/x86/mach-efi/include/mach/barebox.lds.h
diff --git a/arch/x86/mach-efi/include/mach/barebox.lds.h b/arch/x86/mach-efi/include/mach/barebox.lds.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/x86/mach-efi/include/mach/barebox.lds.h
+++ /dev/null
@@ -1 +0,0 @@
-/* empty */
diff --git a/include/asm-generic/barebox.lds.h b/include/asm-generic/barebox.lds.h
index c5f9d975472a..a03655d41cc4 100644
--- a/include/asm-generic/barebox.lds.h
+++ b/include/asm-generic/barebox.lds.h
@@ -6,8 +6,7 @@
#define STRUCT_ALIGNMENT 32
#define STRUCT_ALIGN() . = ALIGN(STRUCT_ALIGNMENT)
-#if defined CONFIG_X86 || \
- defined CONFIG_ARCH_EP93XX
+#if defined CONFIG_ARCH_EP93XX
#include <mach/barebox.lds.h>
#endif
--
2.30.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/4] include: misc clean up
2022-01-03 11:58 [PATCH 0/4] include: misc clean up Ahmad Fatoum
` (3 preceding siblings ...)
2022-01-03 11:58 ` [PATCH 4/4] x86: remove reference to empty file Ahmad Fatoum
@ 2022-01-05 7:56 ` Sascha Hauer
4 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2022-01-05 7:56 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
On Mon, Jan 03, 2022 at 12:58:20PM +0100, Ahmad Fatoum wrote:
> Ahmad Fatoum (4):
> include: <linux/overflow.h>: add missing include
> include: spinlock.h: define dummy for DEFINE_SPINLOCK
> include: <linux/compiler.h>: delete __ADDRESSABLE macro
> x86: remove reference to empty file
Applied, thanks
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-01-05 7:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-03 11:58 [PATCH 0/4] include: misc clean up Ahmad Fatoum
2022-01-03 11:58 ` [PATCH 1/4] include: <linux/overflow.h>: add missing include Ahmad Fatoum
2022-01-03 11:58 ` [PATCH 2/4] include: spinlock.h: define dummy for DEFINE_SPINLOCK Ahmad Fatoum
2022-01-03 11:58 ` [PATCH 3/4] include: <linux/compiler.h>: delete __ADDRESSABLE macro Ahmad Fatoum
2022-01-03 11:58 ` [PATCH 4/4] x86: remove reference to empty file Ahmad Fatoum
2022-01-05 7:56 ` [PATCH 0/4] include: misc clean up Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox