diff options
-rw-r--r-- | arch/xtensa/Kconfig | 1 | ||||
-rw-r--r-- | arch/xtensa/Makefile | 4 | ||||
-rw-r--r-- | arch/xtensa/platforms/iss/setup.c | 25 |
3 files changed, 16 insertions, 14 deletions
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index 04d038f3b6fa..b9ad83a0ee5d 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig | |||
@@ -4,6 +4,7 @@ config ZONE_DMA | |||
4 | 4 | ||
5 | config XTENSA | 5 | config XTENSA |
6 | def_bool y | 6 | def_bool y |
7 | select ARCH_HAS_SG_CHAIN | ||
7 | select ARCH_HAS_SYNC_DMA_FOR_CPU | 8 | select ARCH_HAS_SYNC_DMA_FOR_CPU |
8 | select ARCH_HAS_SYNC_DMA_FOR_DEVICE | 9 | select ARCH_HAS_SYNC_DMA_FOR_DEVICE |
9 | select ARCH_NO_COHERENT_DMA_MMAP if !MMU | 10 | select ARCH_NO_COHERENT_DMA_MMAP if !MMU |
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile index 295c120ed099..d67e30faff9c 100644 --- a/arch/xtensa/Makefile +++ b/arch/xtensa/Makefile | |||
@@ -64,11 +64,7 @@ endif | |||
64 | vardirs := $(patsubst %,arch/xtensa/variants/%/,$(variant-y)) | 64 | vardirs := $(patsubst %,arch/xtensa/variants/%/,$(variant-y)) |
65 | plfdirs := $(patsubst %,arch/xtensa/platforms/%/,$(platform-y)) | 65 | plfdirs := $(patsubst %,arch/xtensa/platforms/%/,$(platform-y)) |
66 | 66 | ||
67 | ifeq ($(KBUILD_SRC),) | ||
68 | KBUILD_CPPFLAGS += $(patsubst %,-I%include,$(vardirs) $(plfdirs)) | ||
69 | else | ||
70 | KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(vardirs) $(plfdirs)) | 67 | KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(vardirs) $(plfdirs)) |
71 | endif | ||
72 | 68 | ||
73 | KBUILD_DEFCONFIG := iss_defconfig | 69 | KBUILD_DEFCONFIG := iss_defconfig |
74 | 70 | ||
diff --git a/arch/xtensa/platforms/iss/setup.c b/arch/xtensa/platforms/iss/setup.c index f4bbb28026f8..58709e89a8ed 100644 --- a/arch/xtensa/platforms/iss/setup.c +++ b/arch/xtensa/platforms/iss/setup.c | |||
@@ -78,23 +78,28 @@ static struct notifier_block iss_panic_block = { | |||
78 | 78 | ||
79 | void __init platform_setup(char **p_cmdline) | 79 | void __init platform_setup(char **p_cmdline) |
80 | { | 80 | { |
81 | static void *argv[COMMAND_LINE_SIZE / sizeof(void *)] __initdata; | ||
82 | static char cmdline[COMMAND_LINE_SIZE] __initdata; | ||
81 | int argc = simc_argc(); | 83 | int argc = simc_argc(); |
82 | int argv_size = simc_argv_size(); | 84 | int argv_size = simc_argv_size(); |
83 | 85 | ||
84 | if (argc > 1) { | 86 | if (argc > 1) { |
85 | void **argv = alloc_bootmem(argv_size); | 87 | if (argv_size > sizeof(argv)) { |
86 | char *cmdline = alloc_bootmem(argv_size); | 88 | pr_err("%s: command line too long: argv_size = %d\n", |
87 | int i; | 89 | __func__, argv_size); |
90 | } else { | ||
91 | int i; | ||
88 | 92 | ||
89 | cmdline[0] = 0; | 93 | cmdline[0] = 0; |
90 | simc_argv((void *)argv); | 94 | simc_argv((void *)argv); |
91 | 95 | ||
92 | for (i = 1; i < argc; ++i) { | 96 | for (i = 1; i < argc; ++i) { |
93 | if (i > 1) | 97 | if (i > 1) |
94 | strcat(cmdline, " "); | 98 | strcat(cmdline, " "); |
95 | strcat(cmdline, argv[i]); | 99 | strcat(cmdline, argv[i]); |
100 | } | ||
101 | *p_cmdline = cmdline; | ||
96 | } | 102 | } |
97 | *p_cmdline = cmdline; | ||
98 | } | 103 | } |
99 | 104 | ||
100 | atomic_notifier_chain_register(&panic_notifier_list, &iss_panic_block); | 105 | atomic_notifier_chain_register(&panic_notifier_list, &iss_panic_block); |