Skip to content

Commit

Permalink
powerpc/xmon: Merge start.c into nonstdio.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Ellerman authored and Benjamin Herrenschmidt committed Nov 15, 2012
1 parent 88c6d62 commit 33b5cd6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 26 deletions.
2 changes: 1 addition & 1 deletion arch/powerpc/xmon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ GCOV_PROFILE := n

ccflags-$(CONFIG_PPC64) := -mno-minimal-toc

obj-y += xmon.o start.o nonstdio.o
obj-y += xmon.o nonstdio.o

ifdef CONFIG_XMON_DISASSEMBLY
obj-y += ppc-dis.o ppc-opc.o
Expand Down
14 changes: 14 additions & 0 deletions arch/powerpc/xmon/nonstdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,23 @@
* 2 of the License, or (at your option) any later version.
*/
#include <linux/string.h>
#include <asm/udbg.h>
#include <asm/time.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)
{
char ch = c;
Expand Down
2 changes: 0 additions & 2 deletions arch/powerpc/xmon/nonstdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ extern int xmon_putchar(int c);
extern void xmon_puts(const char *);
extern char *xmon_gets(char *, int);
extern void xmon_printf(const char *, ...);
extern int xmon_write(const void *ptr, int nb);
extern int xmon_readchar(void);
23 changes: 0 additions & 23 deletions arch/powerpc/xmon/start.c

This file was deleted.

0 comments on commit 33b5cd6

Please sign in to comment.