mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
Merge tag 'for-5.17/parisc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull more parisc architecture updates from Helge Deller:
"Fixes and enhancements:
- a memory leak fix in an error path in pdc_stable (Miaoqian Lin)
- two compiler warning fixes in the TOC code
- added autodetection for currently used console type (serial or
graphics) which inserts console=<type> if it's missing"
* tag 'for-5.17/parisc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
parisc: pdc_stable: Fix memory leak in pdcs_register_pathentries
parisc: Fix missing prototype for 'toc_intr' warning in toc.c
parisc: Autodetect default output device and set console= kernel parameter
parisc: Use safer strscpy() in setup_cmdline()
parisc: Add visible flag to toc_stack variable
This commit is contained in:
@@ -289,6 +289,7 @@ extern int _parisc_requires_coherency;
|
|||||||
|
|
||||||
extern int running_on_qemu;
|
extern int running_on_qemu;
|
||||||
|
|
||||||
|
extern void __noreturn toc_intr(struct pt_regs *regs);
|
||||||
extern void toc_handler(void);
|
extern void toc_handler(void);
|
||||||
extern unsigned int toc_handler_size;
|
extern unsigned int toc_handler_size;
|
||||||
extern unsigned int toc_handler_csum;
|
extern unsigned int toc_handler_csum;
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ struct proc_dir_entry * proc_mckinley_root __read_mostly = NULL;
|
|||||||
void __init setup_cmdline(char **cmdline_p)
|
void __init setup_cmdline(char **cmdline_p)
|
||||||
{
|
{
|
||||||
extern unsigned int boot_args[];
|
extern unsigned int boot_args[];
|
||||||
|
char *p;
|
||||||
|
|
||||||
/* Collect stuff passed in from the boot loader */
|
/* Collect stuff passed in from the boot loader */
|
||||||
|
|
||||||
@@ -56,9 +57,19 @@ void __init setup_cmdline(char **cmdline_p)
|
|||||||
/* called from hpux boot loader */
|
/* called from hpux boot loader */
|
||||||
boot_command_line[0] = '\0';
|
boot_command_line[0] = '\0';
|
||||||
} else {
|
} else {
|
||||||
strlcpy(boot_command_line, (char *)__va(boot_args[1]),
|
strscpy(boot_command_line, (char *)__va(boot_args[1]),
|
||||||
COMMAND_LINE_SIZE);
|
COMMAND_LINE_SIZE);
|
||||||
|
|
||||||
|
/* autodetect console type (if not done by palo yet) */
|
||||||
|
p = boot_command_line;
|
||||||
|
if (!str_has_prefix(p, "console=") && !strstr(p, " console=")) {
|
||||||
|
strlcat(p, " console=", COMMAND_LINE_SIZE);
|
||||||
|
if (PAGE0->mem_cons.cl_class == CL_DUPLEX)
|
||||||
|
strlcat(p, "ttyS0", COMMAND_LINE_SIZE);
|
||||||
|
else
|
||||||
|
strlcat(p, "tty0", COMMAND_LINE_SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_BLK_DEV_INITRD
|
#ifdef CONFIG_BLK_DEV_INITRD
|
||||||
if (boot_args[2] != 0) /* did palo pass us a ramdisk? */
|
if (boot_args[2] != 0) /* did palo pass us a ramdisk? */
|
||||||
{
|
{
|
||||||
@@ -68,7 +79,7 @@ void __init setup_cmdline(char **cmdline_p)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(command_line, boot_command_line);
|
strscpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
|
||||||
*cmdline_p = command_line;
|
*cmdline_p = command_line;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,9 +10,10 @@
|
|||||||
#include <asm/pdc.h>
|
#include <asm/pdc.h>
|
||||||
#include <asm/pdc_chassis.h>
|
#include <asm/pdc_chassis.h>
|
||||||
#include <asm/ldcw.h>
|
#include <asm/ldcw.h>
|
||||||
|
#include <asm/processor.h>
|
||||||
|
|
||||||
static unsigned int __aligned(16) toc_lock = 1;
|
static unsigned int __aligned(16) toc_lock = 1;
|
||||||
DEFINE_PER_CPU_PAGE_ALIGNED(char [16384], toc_stack);
|
DEFINE_PER_CPU_PAGE_ALIGNED(char [16384], toc_stack) __visible;
|
||||||
|
|
||||||
static void toc20_to_pt_regs(struct pt_regs *regs, struct pdc_toc_pim_20 *toc)
|
static void toc20_to_pt_regs(struct pt_regs *regs, struct pdc_toc_pim_20 *toc)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -980,8 +980,10 @@ pdcs_register_pathentries(void)
|
|||||||
entry->kobj.kset = paths_kset;
|
entry->kobj.kset = paths_kset;
|
||||||
err = kobject_init_and_add(&entry->kobj, &ktype_pdcspath, NULL,
|
err = kobject_init_and_add(&entry->kobj, &ktype_pdcspath, NULL,
|
||||||
"%s", entry->name);
|
"%s", entry->name);
|
||||||
if (err)
|
if (err) {
|
||||||
|
kobject_put(&entry->kobj);
|
||||||
return err;
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
/* kobject is now registered */
|
/* kobject is now registered */
|
||||||
write_lock(&entry->rw_lock);
|
write_lock(&entry->rw_lock);
|
||||||
|
|||||||
Reference in New Issue
Block a user