forked from luck/tmp_suning_uos_patched
powerpc/xmon: Merge start.c into nonstdio.c
The routines in start.c are only ever called from nonstdio.c, so if we move them in there they can become static which is nice. I suspect the idea behind the separation was that start.c could be replaced in order to build xmon in userland. If anyone still cares about doing that we could handle that with an ifdef or two. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
88c6d62641
commit
33b5cd6866
@ -6,7 +6,7 @@ GCOV_PROFILE := n
|
|||||||
|
|
||||||
ccflags-$(CONFIG_PPC64) := -mno-minimal-toc
|
ccflags-$(CONFIG_PPC64) := -mno-minimal-toc
|
||||||
|
|
||||||
obj-y += xmon.o start.o nonstdio.o
|
obj-y += xmon.o nonstdio.o
|
||||||
|
|
||||||
ifdef CONFIG_XMON_DISASSEMBLY
|
ifdef CONFIG_XMON_DISASSEMBLY
|
||||||
obj-y += ppc-dis.o ppc-opc.o
|
obj-y += ppc-dis.o ppc-opc.o
|
||||||
|
@ -7,9 +7,23 @@
|
|||||||
* 2 of the License, or (at your option) any later version.
|
* 2 of the License, or (at your option) any later version.
|
||||||
*/
|
*/
|
||||||
#include <linux/string.h>
|
#include <linux/string.h>
|
||||||
|
#include <asm/udbg.h>
|
||||||
#include <asm/time.h>
|
#include <asm/time.h>
|
||||||
#include "nonstdio.h"
|
#include "nonstdio.h"
|
||||||
|
|
||||||
|
|
||||||
|
static int xmon_write(const void *ptr, int nb)
|
||||||
|
{
|
||||||
|
return udbg_write(ptr, nb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int xmon_readchar(void)
|
||||||
|
{
|
||||||
|
if (udbg_getc)
|
||||||
|
return udbg_getc();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
int xmon_putchar(int c)
|
int xmon_putchar(int c)
|
||||||
{
|
{
|
||||||
char ch = c;
|
char ch = c;
|
||||||
|
@ -7,5 +7,3 @@ extern int xmon_putchar(int c);
|
|||||||
extern void xmon_puts(const char *);
|
extern void xmon_puts(const char *);
|
||||||
extern char *xmon_gets(char *, int);
|
extern char *xmon_gets(char *, int);
|
||||||
extern void xmon_printf(const char *, ...);
|
extern void xmon_printf(const char *, ...);
|
||||||
extern int xmon_write(const void *ptr, int nb);
|
|
||||||
extern int xmon_readchar(void);
|
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 1996 Paul Mackerras.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version
|
|
||||||
* 2 of the License, or (at your option) any later version.
|
|
||||||
*/
|
|
||||||
#include <asm/machdep.h>
|
|
||||||
#include <asm/udbg.h>
|
|
||||||
#include "nonstdio.h"
|
|
||||||
|
|
||||||
int xmon_write(const void *ptr, int nb)
|
|
||||||
{
|
|
||||||
return udbg_write(ptr, nb);
|
|
||||||
}
|
|
||||||
|
|
||||||
int xmon_readchar(void)
|
|
||||||
{
|
|
||||||
if (udbg_getc)
|
|
||||||
return udbg_getc();
|
|
||||||
return -1;
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user