Skip to content

Commit d64e3ea

Browse files
rddunlapmpe
authored andcommitted
powerpc/xive: fix return value of __setup handler
__setup() handlers should return 1 to obsolete_checksetup() in init/main.c to indicate that the boot option has been handled. A return of 0 causes the boot option/value to be listed as an Unknown kernel parameter and added to init's (limited) argument or environment strings. Also, error return codes don't mean anything to obsolete_checksetup() -- only non-zero (usually 1) or zero. So return 1 from xive_off() and xive_store_eoi_cmdline(). Fixes: 243e251 ("powerpc/xive: Native exploitation of the XIVE interrupt controller") Fixes: c21ee04 ("powerpc/xive: Add a kernel parameter for StoreEOI") [lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.ru] Reported-by: Igor Zhbanov <i.zhbanov@omprussia.ru>: Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220313065936.4363-1-rdunlap@infradead.org
1 parent d799769 commit d64e3ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/powerpc/sysdev/xive/common.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1708,20 +1708,20 @@ __be32 *xive_queue_page_alloc(unsigned int cpu, u32 queue_shift)
17081708
static int __init xive_off(char *arg)
17091709
{
17101710
xive_cmdline_disabled = true;
1711-
return 0;
1711+
return 1;
17121712
}
17131713
__setup("xive=off", xive_off);
17141714

17151715
static int __init xive_store_eoi_cmdline(char *arg)
17161716
{
17171717
if (!arg)
1718-
return -EINVAL;
1718+
return 1;
17191719

17201720
if (strncmp(arg, "off", 3) == 0) {
17211721
pr_info("StoreEOI disabled on kernel command line\n");
17221722
xive_store_eoi = false;
17231723
}
1724-
return 0;
1724+
return 1;
17251725
}
17261726
__setup("xive.store-eoi=", xive_store_eoi_cmdline);
17271727

0 commit comments

Comments
 (0)