Commit eae4f885 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'xtensa-20180914' of git://github.com/jcmvbkbc/linux-xtensa

Pull Xtensa fixes and cleanups from Max Filippov:

 - don't allocate memory in platform_setup as the memory allocator is
   not initialized at that point yet;

 - remove unnecessary ifeq KBUILD_SRC from arch/xtensa/Makefile;

 - enable SG chaining in arch/xtensa/Kconfig.

* tag 'xtensa-20180914' of git://github.com/jcmvbkbc/linux-xtensa:
  xtensa: enable SG chaining in Kconfig
  xtensa: remove unnecessary KBUILD_SRC ifeq conditional
  xtensa: ISS: don't allocate memory in platform_setup
parents 3e153256 4a7f50f7
...@@ -4,6 +4,7 @@ config ZONE_DMA ...@@ -4,6 +4,7 @@ config ZONE_DMA
config XTENSA config XTENSA
def_bool y def_bool y
select ARCH_HAS_SG_CHAIN
select ARCH_HAS_SYNC_DMA_FOR_CPU select ARCH_HAS_SYNC_DMA_FOR_CPU
select ARCH_HAS_SYNC_DMA_FOR_DEVICE select ARCH_HAS_SYNC_DMA_FOR_DEVICE
select ARCH_NO_COHERENT_DMA_MMAP if !MMU select ARCH_NO_COHERENT_DMA_MMAP if !MMU
......
...@@ -64,11 +64,7 @@ endif ...@@ -64,11 +64,7 @@ endif
vardirs := $(patsubst %,arch/xtensa/variants/%/,$(variant-y)) vardirs := $(patsubst %,arch/xtensa/variants/%/,$(variant-y))
plfdirs := $(patsubst %,arch/xtensa/platforms/%/,$(platform-y)) plfdirs := $(patsubst %,arch/xtensa/platforms/%/,$(platform-y))
ifeq ($(KBUILD_SRC),)
KBUILD_CPPFLAGS += $(patsubst %,-I%include,$(vardirs) $(plfdirs))
else
KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(vardirs) $(plfdirs)) KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(vardirs) $(plfdirs))
endif
KBUILD_DEFCONFIG := iss_defconfig KBUILD_DEFCONFIG := iss_defconfig
......
...@@ -78,12 +78,16 @@ static struct notifier_block iss_panic_block = { ...@@ -78,12 +78,16 @@ static struct notifier_block iss_panic_block = {
void __init platform_setup(char **p_cmdline) void __init platform_setup(char **p_cmdline)
{ {
static void *argv[COMMAND_LINE_SIZE / sizeof(void *)] __initdata;
static char cmdline[COMMAND_LINE_SIZE] __initdata;
int argc = simc_argc(); int argc = simc_argc();
int argv_size = simc_argv_size(); int argv_size = simc_argv_size();
if (argc > 1) { if (argc > 1) {
void **argv = alloc_bootmem(argv_size); if (argv_size > sizeof(argv)) {
char *cmdline = alloc_bootmem(argv_size); pr_err("%s: command line too long: argv_size = %d\n",
__func__, argv_size);
} else {
int i; int i;
cmdline[0] = 0; cmdline[0] = 0;
...@@ -96,6 +100,7 @@ void __init platform_setup(char **p_cmdline) ...@@ -96,6 +100,7 @@ void __init platform_setup(char **p_cmdline)
} }
*p_cmdline = cmdline; *p_cmdline = cmdline;
} }
}
atomic_notifier_chain_register(&panic_notifier_list, &iss_panic_block); atomic_notifier_chain_register(&panic_notifier_list, &iss_panic_block);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment