MIPS: remove unused powertv prom_getcmdline()
PATCH 1/5 MIPS: remove unused powertv prom_getcmdline()
--- arch/mips/powertv/cmdline.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-)
arch/mips/powertv/cmdline.c +0 -5
@@ -31,11 +31,6 @@*/ #define prom_argv (index) ((char *)(long)_prom_argv[(index)]) -char *__init prom_getcmdline (void ) -{ -return &(arcs_cmdline[0 ]); -} -void __init prom_init_cmdline (void ) {int len;
Signature · 1 line
1.6.5.7
PATCH 2/5 MIPS: remove unused powertv ptv_memsize
--- arch/mips/powertv/memory.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-)
arch/mips/powertv/memory.c +0 -5
@@ -42,8 +42,6 @@#define BOOT_MEM_SIZE KIBIBYTE(256)/* Memory reserved for bldr */ #define PHYS_MEM_START 0x10000000/* Start of physical memory */ -unsigned long ptv_memsize; -char __initdata cmdline[COMMAND_LINE_SIZE ];void __init prom_meminit (void )
@@ -87,9 +85,6 @@ void __init prom_meminit(void) } } -/* Store memsize for diagnostic purposes */ - ptv_memsize = memsize; - physend =PFN_ALIGN (&_end) -0x80000000 ;if (memsize >LOW_MEM_MAX ) { low_mem =LOW_MEM_MAX ;
Signature · 1 line
1.6.5.7
PATCH 3/5 MIPS: remove powertv mips_machine_halt()
mips_machine_halt() is same as mips_machine_restart().
In addition, the registration of _machine_halt and pm_power_off are deleted. because mips_machine_halt() is restart function.
--- arch/mips/powertv/reset.c | 18 ------------------ 1 files changed, 0 insertions(+), 18 deletions(-)
arch/mips/powertv/reset.c +0 -18
@@ -28,9 +28,6 @@#include <asm/mach-powertv/asic_regs.h> #include "reset.h" -static void mips_machine_restart (char *command); -static void mips_machine_halt (void ); -static void mips_machine_restart (char *command) {#ifdef CONFIG_BOOTLOADER_DRIVER
@@ -44,22 +41,7 @@ static void mips_machine_restart(char *command)#endif } -static void mips_machine_halt (void ) -{ -#ifdef CONFIG_BOOTLOADER_DRIVER -/* -* Call the bootloader's reset function to ensure -* that persistent data is flushed before hard reset -*/ -kbldr_SetCauseAndReset (); -#else -writel (0x1 ,asic_reg_addr (watchdog)); -#endif -} -void mips_reboot_setup (void ) { _machine_restart = mips_machine_restart; - _machine_halt = mips_machine_halt; - pm_power_off = mips_machine_halt; }
Signature · 1 line
1.6.5.7
PATCH 4/5 MIPS: remove unused powertv platform_die()
--- arch/mips/powertv/powertv_setup.c | 21 --------------------- 1 files changed, 0 insertions(+), 21 deletions(-)
arch/mips/powertv/powertv_setup.c +0 -21
@@ -64,9 +64,6 @@#define REG_SIZE "4"/* In bytes */ #endif -static struct pt_regs die_regs; -static bool have_die_regs; -static void register_panic_notifier (void );static int panic_handler (struct notifier_block *notifier_block,unsigned long event,void *cause_string);
@@ -218,24 +215,6 @@ static int panic_handler(struct notifier_block *notifier_block,return NOTIFY_DONE ; } -/** -* Platform-specific handling of oops -* @str: Pointer to the oops string -* @regs: Pointer to the oops registers -* All we do here is to save the registers for subsequent printing through -* the panic notifier. -*/ -void platform_die (const char *str,const struct pt_regs *regs) -{ -/* If we already have saved registers, don't overwrite them as they -* they apply to the initial fault */ - -if (!have_die_regs) { - have_die_regs = true; - die_regs = *regs; - } -} -/* Information about the RF MAC address, if one was supplied on the * command line. */ static bool have_rfmac;
Signature · 1 line
1.6.5.7
PATCH 5/5 MIPS: simplify powertv prom_init_cmdline() and merge to prom_init()
--- arch/mips/powertv/Makefile | 2 +- arch/mips/powertv/cmdline.c | 47 ------------------------------------------- arch/mips/powertv/init.c | 15 ++++++++----- arch/mips/powertv/init.h | 2 - 4 files changed, 10 insertions(+), 56 deletions(-) delete mode 100644 arch/mips/powertv/cmdline.c
arch/mips/powertv/Makefile +1 -1
@@ -23,6 +23,6 @@ # under Linux. # -obj-y += cmdline.o init.o memory.o reset.o time.o powertv_setup.o asic/ pci/ +obj-y += init.o memory.o reset.o time.o powertv_setup.o asic/ pci/ EXTRA_CFLAGS += -Wall -Werror
arch/mips/powertv/cmdline.c deleted +0 -47
47 lines not on this page · raw message
arch/mips/powertv/init.c +9 -6
@@ -34,10 +34,7 @@#include <asm/mips-boards/generic.h> #include <asm/mach-powertv/asic.h> -#include "init.h" - -int prom_argc; -int *_prom_argv, *_prom_envp; +static int *_prom_envp;unsigned long _prom_memsize;/*
@@ -109,8 +106,11 @@ static void __init mips_ejtag_setup(void)void __init prom_init (void ) { +int prom_argc; +char *prom_argv; + prom_argc = fw_arg0; - _prom_argv = (int *) fw_arg1; + prom_argv = (char *) fw_arg1; _prom_envp = (int *) fw_arg2; _prom_memsize = (unsigned long ) fw_arg3;
@@ -118,7 +118,10 @@ void __init prom_init(void) board_ejtag_handler_setup = mips_ejtag_setup;pr_info ("\nLINUX started...\n" ); -prom_init_cmdline (); + +if (prom_argc ==1 ) +strlcat (arcs_cmdline, prom_argv,COMMAND_LINE_SIZE ); +configure_platform ();prom_meminit ();
arch/mips/powertv/init.h +0 -2
@@ -22,7 +22,5 @@#ifndef _POWERTV_INIT_H#define _POWERTV_INIT_H -extern int prom_argc; -extern int *_prom_argv;extern unsigned long _prom_memsize;#endif
Signature · 1 line
1.6.5.7
Re: [PATCH 5/5] MIPS: simplify powertv prom_init_cmdline() and merge to prom_init()
Quoted 131 lines · Yoichi Yuasa
Signed-off-by Yoichi Yuasa <[email protected]>--- arch/mips/powertv/Makefile | 2 +- arch/mips/powertv/cmdline.c | 47 ------------------------------------------- arch/mips/powertv/init.c | 15 ++++++++----- arch/mips/powertv/init.h | 2 - 4 files changed, 10 insertions(+), 56 deletions(-) delete mode 100644 arch/mips/powertv/cmdline.carch/mips/powertv/Makefile +1
-1@@ -23,6 +23,6 @@ # under Linux. # -obj-y += cmdline.o init.o memory.o reset.o time.o powertv_setup.o asic/ pci/ +obj-y += init.o memory.o reset.o time.o powertv_setup.o asic/ pci/ EXTRA_CFLAGS += -Wall -Werrorarch/mips/powertv/cmdline.c deleted +0
-47@@ -1,47 +0,0 @@ -/* -* Carsten Langgaard, [email protected] -* Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved. -* Portions copyright (C) 2009 Cisco Systems, Inc. -* -* This program is free software; you can distribute it and/or modify it -* under the terms of the GNU General Public License (Version 2) as -* published by the Free Software Foundation. -* -* This program is distributed in the hope it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. -* -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. -* -* Kernel command line creation using the prom monitor (YAMON) argc/argv. -*/ -#include <linux/init.h> -#include <linux/string.h> - -#include <asm/bootinfo.h> - -#include "init.h" - -/* -* YAMON (32-bit PROM) pass arguments and environment as 32-bit pointer. -* This macro take care of sign extension. -*/ -#define prom_argv (index) ((char *)(long)_prom_argv[(index)]) - -void __init prom_init_cmdline (void ) -{ -int len; - -if (prom_argc !=1 ) -return ; - - len =strlen (arcs_cmdline); - - arcs_cmdline[len] =' ' ; - -strlcpy (arcs_cmdline + len +1 , (char *)_prom_argv, -COMMAND_LINE_SIZE - len -1 ); -}arch/mips/powertv/init.c +9
-6@@ -34,10 +34,7 @@#include <asm/mips-boards/generic.h> #include <asm/mach-powertv/asic.h> -#include "init.h" - -int prom_argc; -int *_prom_argv, *_prom_envp; +static int *_prom_envp;unsigned long _prom_memsize;/* @@ -109,8 +106,11 @@ static void __init mips_ejtag_setup(void)void __init prom_init (void ) { +int prom_argc; +char *prom_argv; + prom_argc = fw_arg0; - _prom_argv = (int *) fw_arg1; + prom_argv = (char *) fw_arg1; _prom_envp = (int *) fw_arg2; _prom_memsize = (unsigned long ) fw_arg3;@@ -118,7 +118,10 @@ void __init prom_init(void) board_ejtag_handler_setup = mips_ejtag_setup;pr_info ("\nLINUX started...\n" ); -prom_init_cmdline (); + +if (prom_argc ==1 ) +strlcat (arcs_cmdline, prom_argv,COMMAND_LINE_SIZE ); +configure_platform ();prom_meminit ();arch/mips/powertv/init.h +0
-2@@ -22,7 +22,5 @@#ifndef _POWERTV_INIT_H#define _POWERTV_INIT_H -extern int prom_argc; -extern int *_prom_argv;extern unsigned long _prom_memsize;#endif Signature · 1 line
1.6.5.7
And, for the final time, this looks good, too, and thanks! (And sorry for the duplicate replies)
Re: [PATCH 5/5] MIPS: simplify powertv prom_init_cmdline() and merge to prom_init()
Quoted 3 lines · David VomLehn
And, for the final time, this looks good, too, and thanks! (And sorry for the duplicate replies)
Reviewed-by David VomLehn ([email protected])
It may seem repetitive if not plain annoying to send a reply for each patch of a series but it keeps things easy to follow in patchwork. Until Patchwork maybe one day learns something about threading.
Ralf
Ralf Baechle
AppliedRe: [PATCH 5/5] MIPS: simplify powertv prom_init_cmdline() and merge to prom_init()
In reply to Yoichi YuasaOn Fri, Dec 18, 2009 at 09:38:37PM +0900, Yoichi Yuasa wrote:
Applied. Thanks Yoichi-San!
Ralf
Re: [PATCH 4/5] MIPS: remove unused powertv platform_die()
In reply to Yoichi YuasaQuoted 48 lines · Yoichi Yuasa
Signed-off-by Yoichi Yuasa <[email protected]>--- arch/mips/powertv/powertv_setup.c | 21 --------------------- 1 files changed, 0 insertions(+), 21 deletions(-)arch/mips/powertv/powertv_setup.c +0
-21@@ -64,9 +64,6 @@#define REG_SIZE "4"/* In bytes */ #endif -static struct pt_regs die_regs; -static bool have_die_regs; -static void register_panic_notifier (void );static int panic_handler (struct notifier_block *notifier_block,unsigned long event,void *cause_string);@@ -218,24 +215,6 @@ static int panic_handler(struct notifier_block *notifier_block,return NOTIFY_DONE ; } -/** -* Platform-specific handling of oops -* @str: Pointer to the oops string -* @regs: Pointer to the oops registers -* All we do here is to save the registers for subsequent printing through -* the panic notifier. -*/ -void platform_die (const char *str,const struct pt_regs *regs) -{ -/* If we already have saved registers, don't overwrite them as they -* they apply to the initial fault */ - -if (!have_die_regs) { - have_die_regs = true; - die_regs = *regs; - } -} -/* Information about the RF MAC address, if one was supplied on the * command line. */ static bool have_rfmac;Signature · 1 line
1.6.5.7
Looks good, thanks!
Ralf Baechle
AppliedRe: [PATCH 4/5] MIPS: remove unused powertv platform_die()
In reply to Yoichi YuasaOn Fri, Dec 18, 2009 at 09:36:32PM +0900, Yoichi Yuasa wrote:
Applied. Thanks Yoichi-San!
Ralf
Re: [PATCH 3/5] MIPS: remove powertv mips_machine_halt()
In reply to Yoichi YuasaQuoted 50 lines · Yoichi Yuasa
mips_machine_halt()is same asmips_machine_restart().
In addition, the registration of_machine_haltandpm_power_offare deleted. becausemips_machine_halt()is restart function.Signed-off-by Yoichi Yuasa <[email protected]>--- arch/mips/powertv/reset.c | 18 ------------------ 1 files changed, 0 insertions(+), 18 deletions(-)arch/mips/powertv/reset.c +0
-18@@ -28,9 +28,6 @@#include <asm/mach-powertv/asic_regs.h> #include "reset.h" -static void mips_machine_restart (char *command); -static void mips_machine_halt (void ); -static void mips_machine_restart (char *command) {#ifdef CONFIG_BOOTLOADER_DRIVER @@ -44,22 +41,7 @@ static void mips_machine_restart(char *command)#endif } -static void mips_machine_halt (void ) -{ -#ifdef CONFIG_BOOTLOADER_DRIVER -/* -* Call the bootloader's reset function to ensure -* that persistent data is flushed before hard reset -*/ -kbldr_SetCauseAndReset (); -#else -writel (0x1 ,asic_reg_addr (watchdog)); -#endif -} -void mips_reboot_setup (void ) { _machine_restart = mips_machine_restart; - _machine_halt = mips_machine_halt; - pm_power_off = mips_machine_halt; }Signature · 1 line
1.6.5.7
oks good, thanks!
Ralf Baechle
AppliedRe: [PATCH 3/5] MIPS: remove powertv mips_machine_halt()
In reply to Yoichi YuasaOn Fri, Dec 18, 2009 at 09:33:46PM +0900, Yoichi Yuasa wrote:
Applied. Thanks Yoichi-San!
Ralf
Re: [PATCH 2/5] MIPS: remove unused powertv ptv_memsize
In reply to Yoichi YuasaQuoted 32 lines · Yoichi Yuasa
Signed-off-by Yoichi Yuasa <[email protected]>--- arch/mips/powertv/memory.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-)arch/mips/powertv/memory.c +0
-5@@ -42,8 +42,6 @@#define BOOT_MEM_SIZE KIBIBYTE(256)/* Memory reserved for bldr */ #define PHYS_MEM_START 0x10000000/* Start of physical memory */ -unsigned long ptv_memsize; -char __initdata cmdline[COMMAND_LINE_SIZE ];void __init prom_meminit (void )@@ -87,9 +85,6 @@ void __init prom_meminit(void) } } -/* Store memsize for diagnostic purposes */ - ptv_memsize = memsize; - physend =PFN_ALIGN (&_end) -0x80000000 ;if (memsize >LOW_MEM_MAX ) { low_mem =LOW_MEM_MAX ;Signature · 1 line
1.6.5.7
Looks good, thanks!
Re: [PATCH 2/5] MIPS: remove unused powertv ptv_memsize
Quoted 2 lines · David VomLehn
Looks good, thanks!
Reviewed-by David VomLehn ([email protected])
Reviewed-by, Cc, To Signed-off-by lines are suppsed to have an email address in RFC 2822 format. This is so various utilities can extract email addresses from commits.
Ralf
Re: [PATCH 2/5] MIPS: remove unused powertv ptv_memsize
In reply to Yoichi YuasaToday's complete stack of patches.
Ralf Baechle
AppliedRe: [PATCH 2/5] MIPS: remove unused powertv ptv_memsize
In reply to Yoichi YuasaOn Fri, Dec 18, 2009 at 09:30:18PM +0900, Yoichi Yuasa wrote:
Applied. Thanks Yoichi-San!
Ralf
Quoted 25 lines · Yoichi Yuasa
Signed-off-by Yoichi Yuasa <[email protected]>--- arch/mips/powertv/cmdline.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-)arch/mips/powertv/cmdline.c +0
-5@@ -31,11 +31,6 @@*/ #define prom_argv (index) ((char *)(long)_prom_argv[(index)]) -char *__init prom_getcmdline (void ) -{ -return &(arcs_cmdline[0 ]); -} -void __init prom_init_cmdline (void ) {int len;Signature · 1 line
1.6.5.7
Looks good, thanks!
Ralf Baechle
AppliedOn Fri, Dec 18, 2009 at 09:29:17PM +0900, Yoichi Yuasa wrote:
Applied. Thanks Yoichi-San!
Ralf