Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (22 commits)
MIPS: Ignore vmlinux.*
MIPS: Move vmlinux.ecoff to arch/mips/boot
MIPS: cpumask_of_node() should handle -1 as a node
MIPS: Octeon: Use non-overflowing arithmetic in sched_clock
MIPS: Malta, PowerTV: Remove unnecessary "Linux started"
MIPS: BCM63xx: Remove duplicate CONFIG_CMDLINE.
MIPS: AR7: Remove unused prom_getchar()
MIPS: PowerTV: Remove extra r4k_clockevent_init() call
MIPS: Cobalt use strlcat() for the command line arguments
MIPS: Octeon: Add sched_clock() to csrc-octeon.c
MIPS: TXx9: Cleanup builtin-cmdline processing
MIPS: PowerTV: simplify prom_init_cmdline() and merge into prom_init()
MIPS: PowerTV: Remove unused platform_die()
MIPS: PowerTV: Remove mips_machine_halt()
MIPS: PowerTV: Remove unused ptv_memsize
MIPS: PowerTV: Remove unused prom_getcmdline()
MIPS: AR7: Remove kgdb_enabled
MIPS: Alchemy: Correct code taking the size of a pointer
MIPS: BCM63xx: Fix whitespace damaged board_bcm963xx.c
MIPS: VR41xx: Use strlcat() for the command line arguments
...

+133 -353
+2 -2
arch/mips/alchemy/common/dbdma.c
··· 613 613 dma_cache_wback_inv((unsigned long)buf, nbytes); 614 614 dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */ 615 615 au_sync(); 616 - dma_cache_wback_inv((unsigned long)dp, sizeof(dp)); 616 + dma_cache_wback_inv((unsigned long)dp, sizeof(*dp)); 617 617 ctp->chan_ptr->ddma_dbell = 0; 618 618 619 619 /* Get next descriptor pointer. */ ··· 676 676 dma_cache_inv((unsigned long)buf, nbytes); 677 677 dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */ 678 678 au_sync(); 679 - dma_cache_wback_inv((unsigned long)dp, sizeof(dp)); 679 + dma_cache_wback_inv((unsigned long)dp, sizeof(*dp)); 680 680 ctp->chan_ptr->ddma_dbell = 0; 681 681 682 682 /* Get next descriptor pointer. */
-15
arch/mips/ar7/prom.c
··· 219 219 if (strstr(prom_getcmdline(), "console=")) 220 220 return; 221 221 222 - #ifdef CONFIG_KGDB 223 - if (!strstr(prom_getcmdline(), "nokgdb")) { 224 - strcat(prom_getcmdline(), " console=kgdb"); 225 - kgdb_enabled = 1; 226 - return; 227 - } 228 - #endif 229 - 230 222 s = prom_getenv("modetty0"); 231 223 if (s) { 232 224 baud = simple_strtoul(s, &p, 10); ··· 270 278 static inline void serial_out(int offset, int value) 271 279 { 272 280 writel(value, (void *)PORT(offset)); 273 - } 274 - 275 - char prom_getchar(void) 276 - { 277 - while (!(serial_in(UART_LSR) & UART_LSR_DR)) 278 - ; 279 - return serial_in(UART_RX); 280 281 } 281 282 282 283 int prom_putchar(char c)
+16 -17
arch/mips/bcm63xx/boards/board_bcm963xx.c
··· 346 346 }; 347 347 348 348 static struct board_info __initdata board_FAST2404 = { 349 - .name = "F@ST2404", 350 - .expected_cpu_id = 0x6348, 349 + .name = "F@ST2404", 350 + .expected_cpu_id = 0x6348, 351 351 352 - .has_enet0 = 1, 353 - .has_enet1 = 1, 354 - .has_pci = 1, 352 + .has_enet0 = 1, 353 + .has_enet1 = 1, 354 + .has_pci = 1, 355 355 356 - .enet0 = { 357 - .has_phy = 1, 358 - .use_internal_phy = 1, 359 - }, 356 + .enet0 = { 357 + .has_phy = 1, 358 + .use_internal_phy = 1, 359 + }, 360 360 361 - .enet1 = { 362 - .force_speed_100 = 1, 363 - .force_duplex_full = 1, 364 - }, 361 + .enet1 = { 362 + .force_speed_100 = 1, 363 + .force_duplex_full = 1, 364 + }, 365 365 366 - 367 - .has_ohci0 = 1, 368 - .has_pccard = 1, 369 - .has_ehci0 = 1, 366 + .has_ohci0 = 1, 367 + .has_pccard = 1, 368 + .has_ehci0 = 1, 370 369 }; 371 370 372 371 static struct board_info __initdata board_DV201AMR = {
-3
arch/mips/bcm63xx/prom.c
··· 40 40 reg &= ~mask; 41 41 bcm_perf_writel(reg, PERF_CKCTL_REG); 42 42 43 - /* assign command line from kernel config */ 44 - strcpy(arcs_cmdline, CONFIG_CMDLINE); 45 - 46 43 /* register gpiochip */ 47 44 bcm63xx_gpio_init(); 48 45
+1
arch/mips/boot/.gitignore
··· 1 1 mkboot 2 2 elf2ecoff 3 + vmlinux.* 3 4 zImage 4 5 zImage.tmp
+1 -1
arch/mips/boot/Makefile
··· 28 28 all: vmlinux.ecoff vmlinux.srec 29 29 30 30 vmlinux.ecoff: $(obj)/elf2ecoff $(VMLINUX) 31 - $(obj)/elf2ecoff $(VMLINUX) vmlinux.ecoff $(E2EFLAGS) 31 + $(obj)/elf2ecoff $(VMLINUX) $(obj)/vmlinux.ecoff $(E2EFLAGS) 32 32 33 33 $(obj)/elf2ecoff: $(obj)/elf2ecoff.c 34 34 $(HOSTCC) -o $@ $^
+3 -6
arch/mips/boot/compressed/Makefile
··· 56 56 LDFLAGS_vmlinuz := $(LDFLAGS) -Ttext $(VMLINUZ_LOAD_ADDRESS) -T 57 57 vmlinuz: $(src)/ld.script $(obj-y) $(obj)/piggy.o 58 58 $(call if_changed,ld) 59 - $(Q)$(OBJCOPY) $(OBJCOPYFLAGS) -R .comment -R .stab -R .stabstr -R .initrd -R .sysmap $@ 59 + $(Q)$(OBJCOPY) $(OBJCOPYFLAGS) $@ 60 60 61 61 # 62 62 # Some DECstations need all possible sections of an ECOFF executable ··· 84 84 $(obj)/../elf2ecoff: $(src)/../elf2ecoff.c 85 85 $(Q)$(HOSTCC) -o $@ $^ 86 86 87 - drop-sections = .reginfo .mdebug .comment .note .pdr .options .MIPS.options 88 - strip-flags = $(addprefix --remove-section=,$(drop-sections)) 89 - 90 - OBJCOPYFLAGS_vmlinuz.bin := $(OBJCOPYFLAGS) -O binary $(strip-flags) 87 + OBJCOPYFLAGS_vmlinuz.bin := $(OBJCOPYFLAGS) -O binary 91 88 vmlinuz.bin: vmlinuz 92 89 $(call if_changed,objcopy) 93 90 94 - OBJCOPYFLAGS_vmlinuz.srec := $(OBJCOPYFLAGS) -S -O srec $(strip-flags) 91 + OBJCOPYFLAGS_vmlinuz.srec := $(OBJCOPYFLAGS) -S -O srec 95 92 vmlinuz.srec: vmlinuz 96 93 $(call if_changed,objcopy) 97 94
-10
arch/mips/boot/compressed/decompress.c
··· 28 28 29 29 /* The linker tells us where the image is. */ 30 30 extern unsigned char __image_begin, __image_end; 31 - extern unsigned char __ramdisk_begin, __ramdisk_end; 32 - unsigned long initrd_size; 33 31 34 32 /* debug interfaces */ 35 33 extern void puts(const char *s); ··· 99 101 puts(" "); 100 102 puthex((unsigned long)(zimage_size + zimage_start)); 101 103 puts("\n"); 102 - 103 - if (initrd_size) { 104 - puts("initrd at: "); 105 - puthex((unsigned long)(&__ramdisk_begin)); 106 - puts(" "); 107 - puthex((unsigned long)(&__ramdisk_end)); 108 - puts("\n"); 109 - } 110 104 111 105 /* this area are prepared for mallocing when decompressing */ 112 106 free_mem_ptr = boot_heap_start;
+56 -139
arch/mips/boot/compressed/ld.script
··· 1 + /* 2 + * ld.script for compressed kernel support of MIPS 3 + * 4 + * Copyright (C) 2009 Lemote Inc. 5 + * Author: Wu Zhangjin <wuzj@lemote.com> 6 + */ 7 + 1 8 OUTPUT_ARCH(mips) 2 9 ENTRY(start) 3 10 SECTIONS 4 11 { 5 - /* Read-only sections, merged into text segment: */ 6 - .init : { *(.init) } =0 7 - .text : 8 - { 9 - _ftext = . ; 10 - *(.text) 11 - *(.rodata) 12 - *(.rodata1) 13 - /* .gnu.warning sections are handled specially by elf32.em. */ 14 - *(.gnu.warning) 15 - } =0 16 - .kstrtab : { *(.kstrtab) } 12 + /* . = VMLINUZ_LOAD_ADDRESS */ 13 + /* read-only */ 14 + _text = .; /* Text and read-only data */ 15 + .text : { 16 + _ftext = . ; 17 + *(.text) 18 + *(.rodata) 19 + } = 0 20 + _etext = .; /* End of text section */ 17 21 18 - . = ALIGN(16); /* Exception table */ 19 - __start___ex_table = .; 20 - __ex_table : { *(__ex_table) } 21 - __stop___ex_table = .; 22 + /* writable */ 23 + .data : { /* Data */ 24 + _fdata = . ; 25 + *(.data) 26 + /* Put the compressed image here, so bss is on the end. */ 27 + __image_begin = .; 28 + *(.image) 29 + __image_end = .; 30 + CONSTRUCTORS 31 + } 32 + .sdata : { *(.sdata) } 33 + . = ALIGN(4); 34 + _edata = .; /* End of data section */ 22 35 23 - __start___dbe_table = .; /* Exception table for data bus errors */ 24 - __dbe_table : { *(__dbe_table) } 25 - __stop___dbe_table = .; 36 + /* BSS */ 37 + __bss_start = .; 38 + _fbss = .; 39 + .sbss : { *(.sbss) *(.scommon) } 40 + .bss : { 41 + *(.dynbss) 42 + *(.bss) 43 + *(COMMON) 44 + } 45 + . = ALIGN(4); 46 + _end = . ; 26 47 27 - __start___ksymtab = .; /* Kernel symbol table */ 28 - __ksymtab : { *(__ksymtab) } 29 - __stop___ksymtab = .; 48 + /* These are needed for ELF backends which have not yet been converted 49 + * to the new style linker. */ 30 50 31 - _etext = .; 51 + .stab 0 : { *(.stab) } 52 + .stabstr 0 : { *(.stabstr) } 32 53 33 - . = ALIGN(8192); 34 - .data.init_task : { *(.data.init_task) } 54 + /* These must appear regardless of . */ 55 + .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } 56 + .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } 35 57 36 - /* Startup code */ 37 - . = ALIGN(4096); 38 - __init_begin = .; 39 - .text.init : { *(.text.init) } 40 - .data.init : { *(.data.init) } 41 - . = ALIGN(16); 42 - __setup_start = .; 43 - .setup.init : { *(.setup.init) } 44 - __setup_end = .; 45 - __initcall_start = .; 46 - .initcall.init : { *(.initcall.init) } 47 - __initcall_end = .; 48 - . = ALIGN(4096); /* Align double page for init_task_union */ 49 - __init_end = .; 50 - 51 - . = ALIGN(4096); 52 - .data.page_aligned : { *(.data.idt) } 53 - 54 - . = ALIGN(32); 55 - .data.cacheline_aligned : { *(.data.cacheline_aligned) } 56 - 57 - .fini : { *(.fini) } =0 58 - .reginfo : { *(.reginfo) } 59 - /* Adjust the address for the data segment. We want to adjust up to 60 - the same address within the page on the next page up. It would 61 - be more correct to do this: 62 - . = .; 63 - The current expression does not correctly handle the case of a 64 - text segment ending precisely at the end of a page; it causes the 65 - data segment to skip a page. The above expression does not have 66 - this problem, but it will currently (2/95) cause BFD to allocate 67 - a single segment, combining both text and data, for this case. 68 - This will prevent the text segment from being shared among 69 - multiple executions of the program; I think that is more 70 - important than losing a page of the virtual address space (note 71 - that no actual memory is lost; the page which is skipped can not 72 - be referenced). */ 73 - . = .; 74 - .data : 75 - { 76 - _fdata = . ; 77 - *(.data) 78 - 79 - /* Put the compressed image here, so bss is on the end. */ 80 - __image_begin = .; 81 - *(.image) 82 - __image_end = .; 83 - /* Align the initial ramdisk image (INITRD) on page boundaries. */ 84 - . = ALIGN(4096); 85 - __ramdisk_begin = .; 86 - *(.initrd) 87 - __ramdisk_end = .; 88 - . = ALIGN(4096); 89 - 90 - CONSTRUCTORS 91 - } 92 - .data1 : { *(.data1) } 93 - _gp = . + 0x8000; 94 - .lit8 : { *(.lit8) } 95 - .lit4 : { *(.lit4) } 96 - .ctors : { *(.ctors) } 97 - .dtors : { *(.dtors) } 98 - .got : { *(.got.plt) *(.got) } 99 - .dynamic : { *(.dynamic) } 100 - /* We want the small data sections together, so single-instruction offsets 101 - can access them all, and initialized data all before uninitialized, so 102 - we can shorten the on-disk segment size. */ 103 - .sdata : { *(.sdata) } 104 - . = ALIGN(4); 105 - _edata = .; 106 - PROVIDE (edata = .); 107 - 108 - __bss_start = .; 109 - _fbss = .; 110 - .sbss : { *(.sbss) *(.scommon) } 111 - .bss : 112 - { 113 - *(.dynbss) 114 - *(.bss) 115 - *(COMMON) 116 - . = ALIGN(4); 117 - _end = . ; 118 - PROVIDE (end = .); 119 - } 120 - 121 - /* Sections to be discarded */ 122 - /DISCARD/ : 123 - { 124 - *(.text.exit) 125 - *(.data.exit) 126 - *(.exitcall.exit) 127 - } 128 - 129 - /* This is the MIPS specific mdebug section. */ 130 - .mdebug : { *(.mdebug) } 131 - /* These are needed for ELF backends which have not yet been 132 - converted to the new style linker. */ 133 - .stab 0 : { *(.stab) } 134 - .stabstr 0 : { *(.stabstr) } 135 - /* DWARF debug sections. 136 - Symbols in the .debug DWARF section are relative to the beginning of the 137 - section so we begin .debug at 0. It's not clear yet what needs to happen 138 - for the others. */ 139 - .debug 0 : { *(.debug) } 140 - .debug_srcinfo 0 : { *(.debug_srcinfo) } 141 - .debug_aranges 0 : { *(.debug_aranges) } 142 - .debug_pubnames 0 : { *(.debug_pubnames) } 143 - .debug_sfnames 0 : { *(.debug_sfnames) } 144 - .line 0 : { *(.line) } 145 - /* These must appear regardless of . */ 146 - .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } 147 - .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } 148 - .comment : { *(.comment) } 149 - .note : { *(.note) } 58 + /* Sections to be discarded */ 59 + /DISCARD/ : { 60 + *(.MIPS.options) 61 + *(.options) 62 + *(.pdr) 63 + *(.reginfo) 64 + *(.comment) 65 + *(.note) 66 + } 150 67 }
+32
arch/mips/cavium-octeon/csrc-octeon.c
··· 50 50 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 51 51 }; 52 52 53 + unsigned long long notrace sched_clock(void) 54 + { 55 + /* 64-bit arithmatic can overflow, so use 128-bit. */ 56 + #if (__GNUC__ < 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ <= 3)) 57 + u64 t1, t2, t3; 58 + unsigned long long rv; 59 + u64 mult = clocksource_mips.mult; 60 + u64 shift = clocksource_mips.shift; 61 + u64 cnt = read_c0_cvmcount(); 62 + 63 + asm ( 64 + "dmultu\t%[cnt],%[mult]\n\t" 65 + "nor\t%[t1],$0,%[shift]\n\t" 66 + "mfhi\t%[t2]\n\t" 67 + "mflo\t%[t3]\n\t" 68 + "dsll\t%[t2],%[t2],1\n\t" 69 + "dsrlv\t%[rv],%[t3],%[shift]\n\t" 70 + "dsllv\t%[t1],%[t2],%[t1]\n\t" 71 + "or\t%[rv],%[t1],%[rv]\n\t" 72 + : [rv] "=&r" (rv), [t1] "=&r" (t1), [t2] "=&r" (t2), [t3] "=&r" (t3) 73 + : [cnt] "r" (cnt), [mult] "r" (mult), [shift] "r" (shift) 74 + : "hi", "lo"); 75 + return rv; 76 + #else 77 + /* GCC > 4.3 do it the easy way. */ 78 + unsigned int __attribute__((mode(TI))) t; 79 + t = read_c0_cvmcount(); 80 + t = t * clocksource_mips.mult; 81 + return (unsigned long long)(t >> clocksource_mips.shift); 82 + #endif 83 + } 84 + 53 85 void __init plat_time_init(void) 54 86 { 55 87 clocksource_mips.rating = 300;
+7 -15
arch/mips/cobalt/setup.c
··· 97 97 98 98 void __init prom_init(void) 99 99 { 100 - int narg, indx, posn, nchr; 101 100 unsigned long memsz; 101 + int argc, i; 102 102 char **argv; 103 103 104 104 memsz = fw_arg0 & 0x7fff0000; 105 - narg = fw_arg0 & 0x0000ffff; 105 + argc = fw_arg0 & 0x0000ffff; 106 + argv = (char **)fw_arg1; 106 107 107 - if (narg) { 108 - arcs_cmdline[0] = '\0'; 109 - argv = (char **) fw_arg1; 110 - posn = 0; 111 - for (indx = 1; indx < narg; ++indx) { 112 - nchr = strlen(argv[indx]); 113 - if (posn + 1 + nchr + 1 > sizeof(arcs_cmdline)) 114 - break; 115 - if (posn) 116 - arcs_cmdline[posn++] = ' '; 117 - strcpy(arcs_cmdline + posn, argv[indx]); 118 - posn += nchr; 119 - } 108 + for (i = 1; i < argc; i++) { 109 + strlcat(arcs_cmdline, argv[i], COMMAND_LINE_SIZE); 110 + if (i < (argc - 1)) 111 + strlcat(arcs_cmdline, " ", COMMAND_LINE_SIZE); 120 112 } 121 113 122 114 add_memory_region(0x0, memsz, BOOT_MEM_RAM);
+3 -1
arch/mips/include/asm/mach-ip27/topology.h
··· 24 24 25 25 #define cpu_to_node(cpu) (sn_cpu_info[(cpu)].p_nodeid) 26 26 #define parent_node(node) (node) 27 - #define cpumask_of_node(node) (&hub_data(node)->h_cpus) 27 + #define cpumask_of_node(node) ((node) == -1 ? \ 28 + cpu_all_mask : \ 29 + &hub_data(node)->h_cpus) 28 30 struct pci_bus; 29 31 extern int pcibus_to_node(struct pci_bus *); 30 32
-4
arch/mips/mipssim/sim_setup.c
··· 49 49 set_io_port_base(0xbfd00000); 50 50 51 51 serial_init(); 52 - 53 - pr_info("Linux started...\n"); 54 - 55 52 } 56 53 57 54 extern struct plat_smp_ops ssmtc_smp_ops; ··· 57 60 { 58 61 set_io_port_base(0xbfd00000); 59 62 60 - pr_info("\nLINUX started...\n"); 61 63 prom_meminit(); 62 64 63 65 #ifdef CONFIG_MIPS_MT_SMP
-8
arch/mips/mm/tlbex.c
··· 73 73 enum label_id { 74 74 label_second_part = 1, 75 75 label_leave, 76 - #ifdef MODULE_START 77 - label_module_alloc, 78 - #endif 79 76 label_vmalloc, 80 77 label_vmalloc_done, 81 78 label_tlbw_hazard, ··· 89 92 90 93 UASM_L_LA(_second_part) 91 94 UASM_L_LA(_leave) 92 - #ifdef MODULE_START 93 - UASM_L_LA(_module_alloc) 94 - #endif 95 95 UASM_L_LA(_vmalloc) 96 96 UASM_L_LA(_vmalloc_done) 97 97 UASM_L_LA(_tlbw_hazard) ··· 812 818 } else { 813 819 #if defined(CONFIG_HUGETLB_PAGE) 814 820 const enum label_id ls = label_tlb_huge_update; 815 - #elif defined(MODULE_START) 816 - const enum label_id ls = label_module_alloc; 817 821 #else 818 822 const enum label_id ls = label_vmalloc; 819 823 #endif
-1
arch/mips/mti-malta/malta-init.c
··· 355 355 board_nmi_handler_setup = mips_nmi_setup; 356 356 board_ejtag_handler_setup = mips_ejtag_setup; 357 357 358 - pr_info("\nLINUX started...\n"); 359 358 prom_init_cmdline(); 360 359 prom_meminit(); 361 360 #ifdef CONFIG_SERIAL_8250_CONSOLE
+1 -1
arch/mips/powertv/Makefile
··· 23 23 # under Linux. 24 24 # 25 25 26 - obj-y += cmdline.o init.o memory.o reset.o time.o powertv_setup.o asic/ pci/ 26 + obj-y += init.o memory.o reset.o time.o powertv_setup.o asic/ pci/ 27 27 28 28 EXTRA_CFLAGS += -Wall -Werror
-52
arch/mips/powertv/cmdline.c
··· 1 - /* 2 - * Carsten Langgaard, carstenl@mips.com 3 - * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved. 4 - * Portions copyright (C) 2009 Cisco Systems, Inc. 5 - * 6 - * This program is free software; you can distribute it and/or modify it 7 - * under the terms of the GNU General Public License (Version 2) as 8 - * published by the Free Software Foundation. 9 - * 10 - * This program is distributed in the hope it will be useful, but WITHOUT 11 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 13 - * for more details. 14 - * 15 - * You should have received a copy of the GNU General Public License along 16 - * with this program; if not, write to the Free Software Foundation, Inc., 17 - * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. 18 - * 19 - * Kernel command line creation using the prom monitor (YAMON) argc/argv. 20 - */ 21 - #include <linux/init.h> 22 - #include <linux/string.h> 23 - 24 - #include <asm/bootinfo.h> 25 - 26 - #include "init.h" 27 - 28 - /* 29 - * YAMON (32-bit PROM) pass arguments and environment as 32-bit pointer. 30 - * This macro take care of sign extension. 31 - */ 32 - #define prom_argv(index) ((char *)(long)_prom_argv[(index)]) 33 - 34 - char * __init prom_getcmdline(void) 35 - { 36 - return &(arcs_cmdline[0]); 37 - } 38 - 39 - void __init prom_init_cmdline(void) 40 - { 41 - int len; 42 - 43 - if (prom_argc != 1) 44 - return; 45 - 46 - len = strlen(arcs_cmdline); 47 - 48 - arcs_cmdline[len] = ' '; 49 - 50 - strlcpy(arcs_cmdline + len + 1, (char *)_prom_argv, 51 - COMMAND_LINE_SIZE - len - 1); 52 - }
+8 -7
arch/mips/powertv/init.c
··· 34 34 #include <asm/mips-boards/generic.h> 35 35 #include <asm/mach-powertv/asic.h> 36 36 37 - #include "init.h" 38 - 39 - int prom_argc; 40 - int *_prom_argv, *_prom_envp; 37 + static int *_prom_envp; 41 38 unsigned long _prom_memsize; 42 39 43 40 /* ··· 106 109 107 110 void __init prom_init(void) 108 111 { 112 + int prom_argc; 113 + char *prom_argv; 114 + 109 115 prom_argc = fw_arg0; 110 - _prom_argv = (int *) fw_arg1; 116 + prom_argv = (char *) fw_arg1; 111 117 _prom_envp = (int *) fw_arg2; 112 118 _prom_memsize = (unsigned long) fw_arg3; 113 119 114 120 board_nmi_handler_setup = mips_nmi_setup; 115 121 board_ejtag_handler_setup = mips_ejtag_setup; 116 122 117 - pr_info("\nLINUX started...\n"); 118 - prom_init_cmdline(); 123 + if (prom_argc == 1) 124 + strlcat(arcs_cmdline, prom_argv, COMMAND_LINE_SIZE); 125 + 119 126 configure_platform(); 120 127 prom_meminit(); 121 128
-2
arch/mips/powertv/init.h
··· 22 22 23 23 #ifndef _POWERTV_INIT_H 24 24 #define _POWERTV_INIT_H 25 - extern int prom_argc; 26 - extern int *_prom_argv; 27 25 extern unsigned long _prom_memsize; 28 26 #endif
-5
arch/mips/powertv/memory.c
··· 42 42 #define BOOT_MEM_SIZE KIBIBYTE(256) /* Memory reserved for bldr */ 43 43 #define PHYS_MEM_START 0x10000000 /* Start of physical memory */ 44 44 45 - unsigned long ptv_memsize; 46 - 47 45 char __initdata cmdline[COMMAND_LINE_SIZE]; 48 46 49 47 void __init prom_meminit(void) ··· 84 86 } 85 87 } 86 88 } 87 - 88 - /* Store memsize for diagnostic purposes */ 89 - ptv_memsize = memsize; 90 89 91 90 physend = PFN_ALIGN(&_end) - 0x80000000; 92 91 if (memsize > LOW_MEM_MAX) {
-21
arch/mips/powertv/powertv_setup.c
··· 64 64 #define REG_SIZE "4" /* In bytes */ 65 65 #endif 66 66 67 - static struct pt_regs die_regs; 68 - static bool have_die_regs; 69 - 70 67 static void register_panic_notifier(void); 71 68 static int panic_handler(struct notifier_block *notifier_block, 72 69 unsigned long event, void *cause_string); ··· 213 216 #endif 214 217 215 218 return NOTIFY_DONE; 216 - } 217 - 218 - /** 219 - * Platform-specific handling of oops 220 - * @str: Pointer to the oops string 221 - * @regs: Pointer to the oops registers 222 - * All we do here is to save the registers for subsequent printing through 223 - * the panic notifier. 224 - */ 225 - void platform_die(const char *str, const struct pt_regs *regs) 226 - { 227 - /* If we already have saved registers, don't overwrite them as they 228 - * they apply to the initial fault */ 229 - 230 - if (!have_die_regs) { 231 - have_die_regs = true; 232 - die_regs = *regs; 233 - } 234 219 } 235 220 236 221 /* Information about the RF MAC address, if one was supplied on the
-18
arch/mips/powertv/reset.c
··· 28 28 #include <asm/mach-powertv/asic_regs.h> 29 29 #include "reset.h" 30 30 31 - static void mips_machine_restart(char *command); 32 - static void mips_machine_halt(void); 33 - 34 31 static void mips_machine_restart(char *command) 35 - { 36 - #ifdef CONFIG_BOOTLOADER_DRIVER 37 - /* 38 - * Call the bootloader's reset function to ensure 39 - * that persistent data is flushed before hard reset 40 - */ 41 - kbldr_SetCauseAndReset(); 42 - #else 43 - writel(0x1, asic_reg_addr(watchdog)); 44 - #endif 45 - } 46 - 47 - static void mips_machine_halt(void) 48 32 { 49 33 #ifdef CONFIG_BOOTLOADER_DRIVER 50 34 /* ··· 44 60 void mips_reboot_setup(void) 45 61 { 46 62 _machine_restart = mips_machine_restart; 47 - _machine_halt = mips_machine_halt; 48 - pm_power_off = mips_machine_halt; 49 63 }
-1
arch/mips/powertv/time.c
··· 33 33 void __init plat_time_init(void) 34 34 { 35 35 powertv_clocksource_init(); 36 - r4k_clockevent_init(); 37 36 }
-21
arch/mips/txx9/generic/setup.c
··· 160 160 int argc; 161 161 int *argv32; 162 162 int i; /* Always ignore the "-c" at argv[0] */ 163 - static char builtin[COMMAND_LINE_SIZE] __initdata; 164 163 165 164 if (fw_arg0 >= CKSEG0 || fw_arg1 < CKSEG0) { 166 165 /* ··· 173 174 argv32 = (int *)fw_arg1; 174 175 } 175 176 176 - /* ignore all built-in args if any f/w args given */ 177 - /* 178 - * But if built-in strings was started with '+', append them 179 - * to command line args. If built-in was started with '-', 180 - * ignore all f/w args. 181 - */ 182 - builtin[0] = '\0'; 183 - if (arcs_cmdline[0] == '+') 184 - strcpy(builtin, arcs_cmdline + 1); 185 - else if (arcs_cmdline[0] == '-') { 186 - strcpy(builtin, arcs_cmdline + 1); 187 - argc = 0; 188 - } else if (argc <= 1) 189 - strcpy(builtin, arcs_cmdline); 190 177 arcs_cmdline[0] = '\0'; 191 178 192 179 for (i = 1; i < argc; i++) { ··· 185 200 strcat(arcs_cmdline, "\""); 186 201 } else 187 202 strcat(arcs_cmdline, str); 188 - } 189 - /* append saved builtin args */ 190 - if (builtin[0]) { 191 - if (arcs_cmdline[0]) 192 - strcat(arcs_cmdline, " "); 193 - strcat(arcs_cmdline, builtin); 194 203 } 195 204 } 196 205
+3 -3
arch/mips/vr41xx/common/init.c
··· 1 1 /* 2 2 * init.c, Common initialization routines for NEC VR4100 series. 3 3 * 4 - * Copyright (C) 2003-2008 Yoichi Yuasa <yuasa@linux-mips.org> 4 + * Copyright (C) 2003-2009 Yoichi Yuasa <yuasa@linux-mips.org> 5 5 * 6 6 * This program is free software; you can redistribute it and/or modify 7 7 * it under the terms of the GNU General Public License as published by ··· 66 66 argv = (char **)fw_arg1; 67 67 68 68 for (i = 1; i < argc; i++) { 69 - strcat(arcs_cmdline, argv[i]); 69 + strlcat(arcs_cmdline, argv[i], COMMAND_LINE_SIZE); 70 70 if (i < (argc - 1)) 71 - strcat(arcs_cmdline, " "); 71 + strlcat(arcs_cmdline, " ", COMMAND_LINE_SIZE); 72 72 } 73 73 } 74 74