From: Guenter Roeck <linux@roeck-us.net>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Richard Henderson <rth@twiddle.net>,
Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
Matt Turner <mattst88@gmail.com>,
"James E . J . Bottomley" <James.Bottomley@HansenPartnership.com>,
Helge Deller <deller@gmx.de>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
linux-alpha@vger.kernel.org,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org,
netdev@vger.kernel.org, linux-sparse@vger.kernel.org,
Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH v2 3/4] alpha: Move setup.h out of uapi
Date: Tue, 14 Sep 2021 20:52:26 -0700 [thread overview]
Message-ID: <20210915035227.630204-4-linux@roeck-us.net> (raw)
In-Reply-To: <20210915035227.630204-1-linux@roeck-us.net>
Most of the contents of setup.h have no value for userspace
applications. The file was probably moved to uapi accidentally.
Keep the file in uapi to define the alpha-specific COMMAND_LINE_SIZE.
Move all other defines to arch/alpha/include/asm/setup.h.
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
v2: Added patch
arch/alpha/include/asm/setup.h | 43 +++++++++++++++++++++++++++++
arch/alpha/include/uapi/asm/setup.h | 42 ++--------------------------
2 files changed, 46 insertions(+), 39 deletions(-)
create mode 100644 arch/alpha/include/asm/setup.h
diff --git a/arch/alpha/include/asm/setup.h b/arch/alpha/include/asm/setup.h
new file mode 100644
index 000000000000..58fe3f45a235
--- /dev/null
+++ b/arch/alpha/include/asm/setup.h
@@ -0,0 +1,43 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef __ALPHA_SETUP_H
+#define __ALPHA_SETUP_H
+
+#include <uapi/asm/setup.h>
+
+/*
+ * We leave one page for the initial stack page, and one page for
+ * the initial process structure. Also, the console eats 3 MB for
+ * the initial bootloader (one of which we can reclaim later).
+ */
+#define BOOT_PCB 0x20000000
+#define BOOT_ADDR 0x20000000
+/* Remove when official MILO sources have ELF support: */
+#define BOOT_SIZE (16*1024)
+
+#ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS
+#define KERNEL_START_PHYS 0x300000 /* Old bootloaders hardcoded this. */
+#else
+#define KERNEL_START_PHYS 0x1000000 /* required: Wildfire/Titan/Marvel */
+#endif
+
+#define KERNEL_START (PAGE_OFFSET+KERNEL_START_PHYS)
+#define SWAPPER_PGD KERNEL_START
+#define INIT_STACK (PAGE_OFFSET+KERNEL_START_PHYS+0x02000)
+#define EMPTY_PGT (PAGE_OFFSET+KERNEL_START_PHYS+0x04000)
+#define EMPTY_PGE (PAGE_OFFSET+KERNEL_START_PHYS+0x08000)
+#define ZERO_PGE (PAGE_OFFSET+KERNEL_START_PHYS+0x0A000)
+
+#define START_ADDR (PAGE_OFFSET+KERNEL_START_PHYS+0x10000)
+
+/*
+ * This is setup by the secondary bootstrap loader. Because
+ * the zero page is zeroed out as soon as the vm system is
+ * initialized, we need to copy things out into a more permanent
+ * place.
+ */
+#define PARAM ZERO_PGE
+#define COMMAND_LINE ((char *)(PARAM + 0x0000))
+#define INITRD_START (*(unsigned long *) (PARAM+0x100))
+#define INITRD_SIZE (*(unsigned long *) (PARAM+0x108))
+
+#endif
diff --git a/arch/alpha/include/uapi/asm/setup.h b/arch/alpha/include/uapi/asm/setup.h
index 13b7ee465b0e..f881ea5947cb 100644
--- a/arch/alpha/include/uapi/asm/setup.h
+++ b/arch/alpha/include/uapi/asm/setup.h
@@ -1,43 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-#ifndef __ALPHA_SETUP_H
-#define __ALPHA_SETUP_H
+#ifndef _UAPI__ALPHA_SETUP_H
+#define _UAPI__ALPHA_SETUP_H
#define COMMAND_LINE_SIZE 256
-/*
- * We leave one page for the initial stack page, and one page for
- * the initial process structure. Also, the console eats 3 MB for
- * the initial bootloader (one of which we can reclaim later).
- */
-#define BOOT_PCB 0x20000000
-#define BOOT_ADDR 0x20000000
-/* Remove when official MILO sources have ELF support: */
-#define BOOT_SIZE (16*1024)
-
-#ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS
-#define KERNEL_START_PHYS 0x300000 /* Old bootloaders hardcoded this. */
-#else
-#define KERNEL_START_PHYS 0x1000000 /* required: Wildfire/Titan/Marvel */
-#endif
-
-#define KERNEL_START (PAGE_OFFSET+KERNEL_START_PHYS)
-#define SWAPPER_PGD KERNEL_START
-#define INIT_STACK (PAGE_OFFSET+KERNEL_START_PHYS+0x02000)
-#define EMPTY_PGT (PAGE_OFFSET+KERNEL_START_PHYS+0x04000)
-#define EMPTY_PGE (PAGE_OFFSET+KERNEL_START_PHYS+0x08000)
-#define ZERO_PGE (PAGE_OFFSET+KERNEL_START_PHYS+0x0A000)
-
-#define START_ADDR (PAGE_OFFSET+KERNEL_START_PHYS+0x10000)
-
-/*
- * This is setup by the secondary bootstrap loader. Because
- * the zero page is zeroed out as soon as the vm system is
- * initialized, we need to copy things out into a more permanent
- * place.
- */
-#define PARAM ZERO_PGE
-#define COMMAND_LINE ((char*)(PARAM + 0x0000))
-#define INITRD_START (*(unsigned long *) (PARAM+0x100))
-#define INITRD_SIZE (*(unsigned long *) (PARAM+0x108))
-
-#endif
+#endif /* _UAPI__ALPHA_SETUP_H */
--
2.33.0
next prev parent reply other threads:[~2021-09-15 3:52 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-15 3:52 [PATCH v2 0/4] Introduce and use absolute_pointer macro Guenter Roeck
2021-09-15 3:52 ` [PATCH v2 1/4] compiler.h: Introduce " Guenter Roeck
2021-09-15 7:07 ` Geert Uytterhoeven
2021-09-15 7:13 ` Geert Uytterhoeven
2021-09-15 14:03 ` Guenter Roeck
2021-09-15 3:52 ` [PATCH v2 2/4] net: i825xx: Use absolute_pointer for memcpy from fixed memory location Guenter Roeck
2021-09-15 7:08 ` Geert Uytterhoeven
2021-09-15 3:52 ` Guenter Roeck [this message]
2021-09-15 3:52 ` [PATCH v2 4/4] alpha: Use absolute_pointer to define COMMAND_LINE Guenter Roeck
2021-09-15 19:18 ` [PATCH v2 0/4] Introduce and use absolute_pointer macro Linus Torvalds
2021-09-15 19:35 ` Guenter Roeck
2021-09-15 19:47 ` Linus Torvalds
2021-09-15 19:50 ` Linus Torvalds
2021-09-15 21:19 ` Linus Torvalds
2021-09-16 7:02 ` Anders Larsen
2021-09-16 16:25 ` Linus Torvalds
2021-09-15 20:30 ` Helge Deller
2021-09-15 22:33 ` Guenter Roeck
2021-09-16 18:35 ` Linus Torvalds
2021-09-18 9:51 ` Michael Cree
2021-09-18 13:11 ` Ulrich Teichert
2021-09-18 17:04 ` Linus Torvalds
2021-09-18 17:17 ` Thorsten Glaser
2021-09-18 17:21 ` Linus Torvalds
2021-09-18 17:28 ` Linus Torvalds
2021-09-18 20:26 ` Ulrich Teichert
2021-09-18 20:46 ` Linus Torvalds
2021-09-18 21:12 ` Linus Torvalds
2021-09-18 22:09 ` Linus Torvalds
2021-09-19 15:13 ` Dave Taht
2021-09-20 18:25 ` Ulrich Teichert
2021-09-20 18:46 ` Linus Torvalds
2021-09-20 18:59 ` Matt Turner
2021-09-20 19:45 ` Linus Torvalds
2021-09-21 19:13 ` Ulrich Teichert
2021-09-21 20:42 ` Linus Torvalds
2021-09-21 21:39 ` Linus Torvalds
2021-09-22 20:50 ` Ulrich Teichert
2021-09-16 19:47 ` Linus Torvalds
2021-09-16 0:34 ` Michael Cree
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210915035227.630204-4-linux@roeck-us.net \
--to=linux@roeck-us.net \
--cc=James.Bottomley@HansenPartnership.com \
--cc=davem@davemloft.net \
--cc=deller@gmx.de \
--cc=geert@linux-m68k.org \
--cc=ink@jurassic.park.msu.ru \
--cc=kuba@kernel.org \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-sparse@vger.kernel.org \
--cc=mattst88@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=rth@twiddle.net \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).