aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/fw/arc/cmdline.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2019-11-26 11:06:19 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-11-26 11:06:19 -0300
commit2ea352d5960ad469f5712cf3e293db97beac4e01 (patch)
treec24ae19073f2884867b310ee193d36a82075b60f /arch/mips/fw/arc/cmdline.c
parentMerge branch 'x86/core' into perf/core, to resolve conflicts and to pick up completed topic tree (diff)
parentMerge tag 'for-linus-5.5-1' of git://github.com/cminyard/linux-ipmi (diff)
downloadlinux-dev-2ea352d5960ad469f5712cf3e293db97beac4e01.tar.xz
linux-dev-2ea352d5960ad469f5712cf3e293db97beac4e01.zip
Merge remote-tracking branch 'torvalds/master' into perf/core
To pick up BPF changes we'll need. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'arch/mips/fw/arc/cmdline.c')
-rw-r--r--arch/mips/fw/arc/cmdline.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/arch/mips/fw/arc/cmdline.c b/arch/mips/fw/arc/cmdline.c
index c0122a1dc587..155c5e911723 100644
--- a/arch/mips/fw/arc/cmdline.c
+++ b/arch/mips/fw/arc/cmdline.c
@@ -17,6 +17,12 @@
#undef DEBUG_CMDLINE
+/*
+ * A 32-bit ARC PROM pass arguments and environment as 32-bit pointer.
+ * These macro take care of sign extension.
+ */
+#define prom_argv(index) ((char *) (long)argv[(index)])
+
static char *ignored[] = {
"ConsoleIn=",
"ConsoleOut=",
@@ -32,14 +38,14 @@ static char *used_arc[][2] = {
{ "OSLoadOptions=", "" }
};
-static char * __init move_firmware_args(char* cp)
+static char __init *move_firmware_args(int argc, LONG *argv, char *cp)
{
char *s;
int actr, i;
actr = 1; /* Always ignore argv[0] */
- while (actr < prom_argc) {
+ while (actr < argc) {
for(i = 0; i < ARRAY_SIZE(used_arc); i++) {
int len = strlen(used_arc[i][0]);
@@ -64,7 +70,7 @@ static char * __init move_firmware_args(char* cp)
return cp;
}
-void __init prom_init_cmdline(void)
+void __init prom_init_cmdline(int argc, LONG *argv)
{
char *cp;
int actr, i;
@@ -76,9 +82,9 @@ void __init prom_init_cmdline(void)
* Move ARC variables to the beginning to make sure they can be
* overridden by later arguments.
*/
- cp = move_firmware_args(cp);
+ cp = move_firmware_args(argc, argv, cp);
- while (actr < prom_argc) {
+ while (actr < argc) {
for (i = 0; i < ARRAY_SIZE(ignored); i++) {
int len = strlen(ignored[i]);