Skip to content

Commit

Permalink
Merge tag 'xtensa-20180914' of git://github.com/jcmvbkbc/linux-xtensa
Browse files Browse the repository at this point in the history
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
  • Loading branch information
torvalds committed Sep 14, 2018
2 parents 3e15325 + 4a7f50f commit eae4f88
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
1 change: 1 addition & 0 deletions arch/xtensa/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ config ZONE_DMA

config XTENSA
def_bool y
select ARCH_HAS_SG_CHAIN
select ARCH_HAS_SYNC_DMA_FOR_CPU
select ARCH_HAS_SYNC_DMA_FOR_DEVICE
select ARCH_NO_COHERENT_DMA_MMAP if !MMU
Expand Down
4 changes: 0 additions & 4 deletions arch/xtensa/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,7 @@ endif
vardirs := $(patsubst %,arch/xtensa/variants/%/,$(variant-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))
endif

KBUILD_DEFCONFIG := iss_defconfig

Expand Down
25 changes: 15 additions & 10 deletions arch/xtensa/platforms/iss/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,23 +78,28 @@ static struct notifier_block iss_panic_block = {

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 argv_size = simc_argv_size();

if (argc > 1) {
void **argv = alloc_bootmem(argv_size);
char *cmdline = alloc_bootmem(argv_size);
int i;
if (argv_size > sizeof(argv)) {
pr_err("%s: command line too long: argv_size = %d\n",
__func__, argv_size);
} else {
int i;

cmdline[0] = 0;
simc_argv((void *)argv);
cmdline[0] = 0;
simc_argv((void *)argv);

for (i = 1; i < argc; ++i) {
if (i > 1)
strcat(cmdline, " ");
strcat(cmdline, argv[i]);
for (i = 1; i < argc; ++i) {
if (i > 1)
strcat(cmdline, " ");
strcat(cmdline, argv[i]);
}
*p_cmdline = cmdline;
}
*p_cmdline = cmdline;
}

atomic_notifier_chain_register(&panic_notifier_list, &iss_panic_block);
Expand Down

0 comments on commit eae4f88

Please sign in to comment.