mingo@elte.hu, tglx@linutronix.de, linuxppc-dev@ozlabs.org, tsutomu.owa@toshiba.co.jp

From: Tsutomu OWA
Date: Thu Aug 10 2006 - 22:00:46 EST



To support CONFIG_MCOUNT for powermac and cell.
---
-- owa

diff -rup -x CVS 2.6.16-rt17/arch/powerpc/kernel/entry_64.S rt-powerpc/arch/powerpc/kernel/entry_64.S
--- 2.6.16-rt17/arch/powerpc/kernel/entry_64.S 2006-03-20 14:53:29.000000000 +0900
+++ rt-powerpc/arch/powerpc/kernel/entry_64.S 2006-07-12 15:36:22.000000000 +0900
@@ -803,3 +803,36 @@ _GLOBAL(enter_prom)
blr

#endif /* CONFIG_PPC_MULTIPLATFORM */
+
+#ifdef CONFIG_MCOUNT
+
+/* based on glibc-2.3.2/sysdeps/powerpc/powerpc64/ppc-mcount.S */
+/* We don't need to save the parameter-passing registers as gcc takes
+ * care of that for us. Thus this function looks fairly normal.
+ * In fact, the generic code would work for us.
+ */
+#define _MC_STACK_FRAME 112
+_GLOBAL(_mcount)
+ /* to see if mcount_enabled is set */
+ LOAD_REG_ADDR(r5, mcount_enabled)
+ lwz r5, 0(r5)
+ cmpwi r5, 1
+ bnelr
+
+ /* translation on, mcount_enabled is on and system_state is fine. */
+ mflr r3
+ ld r11, 0(r1)
+ stdu r1,-_MC_STACK_FRAME(r1)
+ std r3, _MC_STACK_FRAME+16(r1)
+ ld r4, 16(r11)
+
+ /* r3 contains lr (eip), put parent lr (parent_eip) in r4 */
+ bl .__trace
+ nop
+
+ ld r0, _MC_STACK_FRAME+16(r1)
+ mtlr r0
+ addi r1,r1,_MC_STACK_FRAME
+ blr
+
+#endif /* CONFIG_MCOUNT */
diff -rup -x CVS 2.6.16-rt17/arch/powerpc/kernel/process.c rt-powerpc/arch/powerpc/kernel/process.c
--- 2.6.16-rt17/arch/powerpc/kernel/process.c 2006-03-20 14:53:29.000000000 +0900
+++ rt-powerpc/arch/powerpc/kernel/process.c 2006-07-11 13:29:35.000000000 +0900
@@ -886,6 +886,15 @@ void show_stack(struct task_struct *tsk,
void dump_stack(void)
{
show_stack(current, NULL);
+
+#if defined(CONFIG_PREEMPT_TRACE) || defined(CONFIG_LATENCY_TRACE)
+ print_traces(current);
+#endif /* CONFIG_PREEMPT_TRACE || CONFIG_LATENCY_TRACE */
+
+#ifdef CONFIG_DEBUG_MUTEXES
+ show_held_locks(current);
+#endif /* CONFIG_DEBUG_MUTEXES */
+
}
EXPORT_SYMBOL(dump_stack);

diff -rup -x CVS 2.6.16-rt17/arch/powerpc/kernel/prom.c rt-powerpc/arch/powerpc/kernel/prom.c
--- 2.6.16-rt17/arch/powerpc/kernel/prom.c 2006-03-20 14:53:29.000000000 +0900
+++ rt-powerpc/arch/powerpc/kernel/prom.c 2006-06-09 18:19:18.000000000 +0900
@@ -514,7 +514,7 @@ static inline char *find_flat_dt_string(
* used to extract the memory informations at boot before we can
* unflatten the tree
*/
-int __init of_scan_flat_dt(int (*it)(unsigned long node,
+int notrace __init of_scan_flat_dt(int (*it)(unsigned long node,
const char *uname, int depth,
void *data),
void *data)
@@ -1125,7 +1125,7 @@ static int __init early_init_dt_scan_mem
return 0;
}

-static void __init early_reserve_mem(void)
+static void notrace __init early_reserve_mem(void)
{
u64 base, size;
u64 *reserve_map;
@@ -1167,7 +1167,7 @@ static void __init early_reserve_mem(voi
#endif
}

-void __init early_init_devtree(void *params)
+void notrace __init early_init_devtree(void *params)
{
DBG(" -> early_init_devtree()\n");

diff -rup -x CVS 2.6.16-rt17/arch/powerpc/kernel/prom_init.c rt-powerpc/arch/powerpc/kernel/prom_init.c
--- 2.6.16-rt17/arch/powerpc/kernel/prom_init.c 2006-03-20 14:53:29.000000000 +0900
+++ rt-powerpc/arch/powerpc/kernel/prom_init.c 2006-06-28 16:01:19.000000000 +0900
@@ -221,7 +221,7 @@ static cell_t __initdata regbuf[1024];
* firmware.
*/

-static int __init call_prom(const char *service, int nargs, int nret, ...)
+static int notrace __init call_prom(const char *service, int nargs, int nret, ...)
{
int i;
struct prom_args args;
@@ -245,7 +245,7 @@ static int __init call_prom(const char *
return (nret > 0) ? args.args[nargs] : 0;
}

-static int __init call_prom_ret(const char *service, int nargs, int nret,
+static int notrace __init call_prom_ret(const char *service, int nargs, int nret,
prom_arg_t *rets, ...)
{
int i;
@@ -275,7 +275,7 @@ static int __init call_prom_ret(const ch
}


-static void __init prom_print(const char *msg)
+static void notrace __init prom_print(const char *msg)
{
const char *p, *q;
struct prom_t *_prom = &RELOC(prom);
@@ -296,7 +296,7 @@ static void __init prom_print(const char
}


-static void __init prom_print_hex(unsigned long val)
+static void notrace __init prom_print_hex(unsigned long val)
{
int i, nibbles = sizeof(val)*2;
char buf[sizeof(val)*2+1];
@@ -313,7 +313,7 @@ static void __init prom_print_hex(unsign
}


-static void __init prom_printf(const char *format, ...)
+static void notrace __init prom_printf(const char *format, ...)
{
const char *p, *q, *s;
va_list args;
@@ -356,7 +356,7 @@ static void __init prom_printf(const cha
}


-static unsigned int __init prom_claim(unsigned long virt, unsigned long size,
+static unsigned int notrace __init prom_claim(unsigned long virt, unsigned long size,
unsigned long align)
{
struct prom_t *_prom = &RELOC(prom);
@@ -391,7 +391,7 @@ static unsigned int __init prom_claim(un
(prom_arg_t)align);
}

-static void __init __attribute__((noreturn)) prom_panic(const char *reason)
+static void notrace __init __attribute__((noreturn)) prom_panic(const char *reason)
{
#ifdef CONFIG_PPC64
reason = PTRRELOC(reason);
@@ -405,7 +405,7 @@ static void __init __attribute__((noretu
}


-static int __init prom_next_node(phandle *nodep)
+static int notrace __init prom_next_node(phandle *nodep)
{
phandle node;

@@ -434,7 +434,7 @@ static int inline prom_getproplen(phandl
return call_prom("getproplen", 2, 1, node, ADDR(pname));
}

-static void add_string(char **str, const char *q)
+static void notrace add_string(char **str, const char *q)
{
char *p = *str;

@@ -444,7 +444,7 @@ static void add_string(char **str, const
*str = p;
}

-static char *tohex(unsigned int x)
+static char notrace *tohex(unsigned int x)
{
static char digits[] = "0123456789abcdef";
static char result[9];
@@ -460,7 +460,7 @@ static char *tohex(unsigned int x)
return &result[i];
}

-static int __init prom_setprop(phandle node, const char *nodename,
+static int notrace __init prom_setprop(phandle node, const char *nodename,
const char *pname, void *value, size_t valuelen)
{
char cmd[256], *p;
@@ -491,7 +491,7 @@ static int __init prom_setprop(phandle n
#define islower(c) ('a' <= (c) && (c) <= 'z')
#define toupper(c) (islower(c) ? ((c) - 'a' + 'A') : (c))

-unsigned long prom_strtoul(const char *cp, const char **endp)
+unsigned long notrace prom_strtoul(const char *cp, const char **endp)
{
unsigned long result = 0, base = 10, value;

@@ -516,7 +516,7 @@ unsigned long prom_strtoul(const char *c
return result;
}

-unsigned long prom_memparse(const char *ptr, const char **retptr)
+unsigned long notrace prom_memparse(const char *ptr, const char **retptr)
{
unsigned long ret = prom_strtoul(ptr, retptr);
int shift = 0;
@@ -547,7 +547,7 @@ unsigned long prom_memparse(const char *
* Early parsing of the command line passed to the kernel, used for
* "mem=x" and the options that affect the iommu
*/
-static void __init early_cmdline_parse(void)
+static void notrace __init early_cmdline_parse(void)
{
struct prom_t *_prom = &RELOC(prom);
const char *opt;
@@ -711,7 +711,7 @@ static struct fake_elf {
}
};

-static void __init prom_send_capabilities(void)
+static void notrace __init prom_send_capabilities(void)
{
ihandle elfloader;

@@ -759,7 +759,7 @@ static void __init prom_send_capabilitie
* at the current location of alloc_bottom or fail (that is basically
* extending the previous allocation). Used for the device-tree flattening
*/
-static unsigned long __init alloc_up(unsigned long size, unsigned long align)
+static unsigned long notrace __init alloc_up(unsigned long size, unsigned long align)
{
unsigned long base = RELOC(alloc_bottom);
unsigned long addr = 0;
@@ -804,7 +804,7 @@ static unsigned long __init alloc_up(uns
* is set, from the top of RAM. Note that this one doesn't handle
* failures. It does claim memory if highmem is not set.
*/
-static unsigned long __init alloc_down(unsigned long size, unsigned long align,
+static unsigned long notrace __init alloc_down(unsigned long size, unsigned long align,
int highmem)
{
unsigned long base, addr = 0;
@@ -861,7 +861,7 @@ static unsigned long __init alloc_down(u
/*
* Parse a "reg" cell
*/
-static unsigned long __init prom_next_cell(int s, cell_t **cellp)
+static unsigned long notrace __init prom_next_cell(int s, cell_t **cellp)
{
cell_t *p = *cellp;
unsigned long r = 0;
@@ -890,7 +890,7 @@ static unsigned long __init prom_next_ce
* If problems seem to show up, it would be a good start to track
* them down.
*/
-static void reserve_mem(u64 base, u64 size)
+static void notrace reserve_mem(u64 base, u64 size)
{
u64 top = base + size;
unsigned long cnt = RELOC(mem_reserve_cnt);
@@ -917,7 +917,7 @@ static void reserve_mem(u64 base, u64 si
* Initialize memory allocation mecanism, parse "memory" nodes and
* obtain that way the top of memory and RMO to setup out local allocator
*/
-static void __init prom_init_mem(void)
+static void notrace __init prom_init_mem(void)
{
phandle node;
char *path, type[64];
@@ -1050,7 +1050,7 @@ static void __init prom_init_mem(void)
/*
* Allocate room for and instantiate RTAS
*/
-static void __init prom_instantiate_rtas(void)
+static void notrace __init prom_instantiate_rtas(void)
{
phandle rtas_node;
ihandle rtas_inst;
@@ -1109,7 +1109,7 @@ static void __init prom_instantiate_rtas
/*
* Allocate room for and initialize TCE tables
*/
-static void __init prom_initialize_tce_table(void)
+static void notrace __init prom_initialize_tce_table(void)
{
phandle node;
ihandle phb_node;
@@ -1273,7 +1273,7 @@ extern unsigned long __secondary_hold_ac
*/
#define LOW_ADDR(x) (((unsigned long) &(x)) & 0xff)

-static void __init prom_hold_cpus(void)
+static void notrace __init prom_hold_cpus(void)
{
unsigned long i;
unsigned int reg;
@@ -1386,7 +1386,7 @@ static void __init prom_hold_cpus(void)
}


-static void __init prom_init_client_services(unsigned long pp)
+static void notrace __init prom_init_client_services(unsigned long pp)
{
struct prom_t *_prom = &RELOC(prom);

@@ -1412,7 +1412,7 @@ static void __init prom_init_client_serv
* For that, we need the ihandle of the mmu.
* Also, on the longtrail, we need to work around other bugs.
*/
-static void __init prom_find_mmu(void)
+static void notrace __init prom_find_mmu(void)
{
struct prom_t *_prom = &RELOC(prom);
phandle oprom;
@@ -1442,7 +1442,7 @@ static void __init prom_find_mmu(void)
#define prom_find_mmu()
#endif

-static void __init prom_init_stdout(void)
+static void notrace __init prom_init_stdout(void)
{
struct prom_t *_prom = &RELOC(prom);
char *path = RELOC(of_stdout_device);
@@ -1471,7 +1471,7 @@ static void __init prom_init_stdout(void
prom_setprop(val, path, "linux,boot-display", NULL, 0);
}

-static void __init prom_close_stdin(void)
+static void notrace __init prom_close_stdin(void)
{
struct prom_t *_prom = &RELOC(prom);
ihandle val;
@@ -1480,7 +1480,7 @@ static void __init prom_close_stdin(void
call_prom("close", 1, 0, val);
}

-static int __init prom_find_machine_type(void)
+static int notrace __init prom_find_machine_type(void)
{
struct prom_t *_prom = &RELOC(prom);
char compat[256];
@@ -1525,7 +1525,7 @@ static int __init prom_find_machine_type
#endif
}

-static int __init prom_set_color(ihandle ih, int i, int r, int g, int b)
+static int notrace __init prom_set_color(ihandle ih, int i, int r, int g, int b)
{
return call_prom("call-method", 6, 1, ADDR("color!"), ih, i, b, g, r);
}
@@ -1538,7 +1538,7 @@ static int __init prom_set_color(ihandle
* So we check whether we will need to open the display,
* and if so, open it now.
*/
-static void __init prom_check_displays(void)
+static void notrace __init prom_check_displays(void)
{
char type[16], *path;
phandle node;
@@ -1615,7 +1615,7 @@ static void __init prom_check_displays(v


/* Return (relocated) pointer to this much memory: moves initrd if reqd. */
-static void __init *make_room(unsigned long *mem_start, unsigned long *mem_end,
+static void notrace __init *make_room(unsigned long *mem_start, unsigned long *mem_end,
unsigned long needed, unsigned long align)
{
void *ret;
@@ -1646,7 +1646,7 @@ static void __init *make_room(unsigned l
#define dt_push_token(token, mem_start, mem_end) \
do { *((u32 *)make_room(mem_start, mem_end, 4, 4)) = token; } while(0)

-static unsigned long __init dt_find_string(char *str)
+static unsigned long notrace __init dt_find_string(char *str)
{
char *s, *os;

@@ -1666,7 +1666,7 @@ static unsigned long __init dt_find_stri
*/
#define MAX_PROPERTY_NAME 64

-static void __init scan_dt_build_strings(phandle node,
+static void notrace __init scan_dt_build_strings(phandle node,
unsigned long *mem_start,
unsigned long *mem_end)
{
@@ -1714,7 +1714,7 @@ static void __init scan_dt_build_strings
}
}

-static void __init scan_dt_build_struct(phandle node, unsigned long *mem_start,
+static void notrace __init scan_dt_build_struct(phandle node, unsigned long *mem_start,
unsigned long *mem_end)
{
phandle child;
@@ -1831,7 +1831,7 @@ static void __init scan_dt_build_struct(
dt_push_token(OF_DT_END_NODE, mem_start, mem_end);
}

-static void __init flatten_device_tree(void)
+static void notrace __init flatten_device_tree(void)
{
phandle root;
unsigned long mem_start, mem_end, room;
@@ -1929,7 +1929,7 @@ static void __init flatten_device_tree(v
}


-static void __init fixup_device_tree(void)
+static void notrace __init fixup_device_tree(void)
{
#if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC)
phandle u3, i2c, mpic;
@@ -1972,7 +1972,7 @@ static void __init fixup_device_tree(voi
}


-static void __init prom_find_boot_cpu(void)
+static void notrace __init prom_find_boot_cpu(void)
{
struct prom_t *_prom = &RELOC(prom);
u32 getprop_rval;
@@ -1991,7 +1991,7 @@ static void __init prom_find_boot_cpu(vo
prom_debug("Booting CPU hw index = 0x%x\n", _prom->cpu);
}

-static void __init prom_check_initrd(unsigned long r3, unsigned long r4)
+static void notrace __init prom_check_initrd(unsigned long r3, unsigned long r4)
{
#ifdef CONFIG_BLK_DEV_INITRD
struct prom_t *_prom = &RELOC(prom);
@@ -2023,7 +2023,7 @@ static void __init prom_check_initrd(uns
* handling exceptions and the MMU hash table for us.
*/

-unsigned long __init prom_init(unsigned long r3, unsigned long r4,
+unsigned long notrace __init prom_init(unsigned long r3, unsigned long r4,
unsigned long pp,
unsigned long r6, unsigned long r7)
{
diff -rup -x CVS 2.6.16-rt17/arch/powerpc/kernel/setup_64.c rt-powerpc/arch/powerpc/kernel/setup_64.c
--- 2.6.16-rt17/arch/powerpc/kernel/setup_64.c 2006-03-20 14:53:29.000000000 +0900
+++ rt-powerpc/arch/powerpc/kernel/setup_64.c 2006-06-28 11:45:54.000000000 +0900
@@ -683,3 +683,22 @@ void __init setup_per_cpu_areas(void)
}
}
#endif
+
+#ifdef CONFIG_EARLY_PRINTK
+void early_printk(const char *fmt, ...)
+{
+ udbg_printf(fmt);
+}
+#endif /* CONFIG_EARLY_PRINTK */
+
+#ifdef CONFIG_MCOUNT
+extern void __mcount(void);
+extern void _mcount(void);
+EXPORT_SYMBOL(_mcount);
+void notrace mcount(void)
+{
+ if(mcount_enabled) {
+ __mcount();
+ }
+}
+#endif /* CONFIG_MCOUNT */
diff -rup -x CVS 2.6.16-rt17/arch/powerpc/mm/hash_utils_64.c rt-powerpc/arch/powerpc/mm/hash_utils_64.c
--- 2.6.16-rt17/arch/powerpc/mm/hash_utils_64.c 2006-03-20 14:53:29.000000000 +0900
+++ rt-powerpc/arch/powerpc/mm/hash_utils_64.c 2006-06-28 12:06:57.000000000 +0900
@@ -135,7 +135,7 @@ struct mmu_psize_def mmu_psize_defaults_
};


-int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
+int notrace htab_bolt_mapping(unsigned long vstart, unsigned long vend,
unsigned long pstart, unsigned long mode, int psize)
{
unsigned long vaddr, paddr;
@@ -276,7 +276,7 @@ static int __init htab_dt_scan_page_size
}


-static void __init htab_init_page_sizes(void)
+static void notrace __init htab_init_page_sizes(void)
{
int rc;

@@ -364,7 +364,7 @@ static int __init htab_dt_scan_pftsize(u
return 0;
}

-static unsigned long __init htab_get_table_size(void)
+static unsigned long notrace __init htab_get_table_size(void)
{
unsigned long mem_size, rnd_mem_size, pteg_count;

@@ -398,7 +398,7 @@ void create_section_mapping(unsigned lon
}
#endif /* CONFIG_MEMORY_HOTPLUG */

-void __init htab_initialize(void)
+void notrace __init htab_initialize(void)
{
unsigned long table;
unsigned long pteg_count;
diff -rup -x CVS 2.6.16-rt17/arch/powerpc/mm/lmb.c rt-powerpc/arch/powerpc/mm/lmb.c
--- 2.6.16-rt17/arch/powerpc/mm/lmb.c 2006-03-20 14:53:29.000000000 +0900
+++ rt-powerpc/arch/powerpc/mm/lmb.c 2006-06-09 18:18:46.000000000 +0900
@@ -118,7 +118,7 @@ void __init lmb_init(void)
}

/* This routine may be called with relocation disabled. */
-void __init lmb_analyze(void)
+void notrace __init lmb_analyze(void)
{
int i;

@@ -193,7 +193,7 @@ long __init lmb_add(unsigned long base,

}

-long __init lmb_reserve(unsigned long base, unsigned long size)
+long notrace __init lmb_reserve(unsigned long base, unsigned long size)
{
struct lmb_region *_rgn = &(lmb.reserved);

@@ -282,7 +282,7 @@ unsigned long __init lmb_end_of_DRAM(voi
* Truncate the lmb list to memory_limit if it's set
* You must call lmb_analyze() after this.
*/
-void __init lmb_enforce_memory_limit(unsigned long memory_limit)
+void notrace __init lmb_enforce_memory_limit(unsigned long memory_limit)
{
unsigned long i, limit;

diff -rup -x CVS 2.6.16-rt17/arch/powerpc/platforms/powermac/setup.c rt-powerpc/arch/powerpc/platforms/powermac/setup.c
--- 2.6.16-rt17/arch/powerpc/platforms/powermac/setup.c 2006-03-20 14:53:29.000000000 +0900
+++ rt-powerpc/arch/powerpc/platforms/powermac/setup.c 2006-06-09 18:20:45.000000000 +0900
@@ -666,7 +666,7 @@ device_initcall(pmac_declare_of_platform
/*
* Called very early, MMU is off, device-tree isn't unflattened
*/
-static int __init pmac_probe(int platform)
+static int notrace __init pmac_probe(int platform)
{
#ifdef CONFIG_PPC64
if (platform != PLATFORM_POWERMAC)
diff -rup -x CVS 2.6.16-rt17/arch/powerpc/xmon/xmon.c rt-powerpc/arch/powerpc/xmon/xmon.c
--- 2.6.16-rt17/arch/powerpc/xmon/xmon.c 2006-03-20 14:53:29.000000000 +0900
+++ rt-powerpc/arch/powerpc/xmon/xmon.c 2006-04-28 16:01:58.000000000 +0900
@@ -2064,7 +2064,7 @@ print_address(unsigned long addr)
static unsigned long mdest; /* destination address */
static unsigned long msrc; /* source address */
static unsigned long mval; /* byte value to set memory to */
-static unsigned long mcount; /* # bytes to affect */
+static unsigned long memcount; /* # bytes to affect */
static unsigned long mdiffs; /* max # differences to print */

void
@@ -2076,19 +2076,19 @@ memops(int cmd)
scanhex((void *)(cmd == 's'? &mval: &msrc));
if( termch != '\n' )
termch = 0;
- scanhex((void *)&mcount);
+ scanhex((void *)&memcount);
switch( cmd ){
case 'm':
- memmove((void *)mdest, (void *)msrc, mcount);
+ memmove((void *)mdest, (void *)msrc, memcount);
break;
case 's':
- memset((void *)mdest, mval, mcount);
+ memset((void *)mdest, mval, memcount);
break;
case 'd':
if( termch != '\n' )
termch = 0;
scanhex((void *)&mdiffs);
- memdiffs((unsigned char *)mdest, (unsigned char *)msrc, mcount, mdiffs);
+ memdiffs((unsigned char *)mdest, (unsigned char *)msrc, memcount, mdiffs);
break;
}
}
diff -rup -x CVS 2.6.16-rt17/include/asm-powerpc/thread_info.h rt-powerpc/include/asm-powerpc/thread_info.h
--- 2.6.16-rt17/include/asm-powerpc/thread_info.h 2006-04-26 18:24:28.000000000 +0900
+++ rt-powerpc/include/asm-powerpc/thread_info.h 2006-05-10 14:03:59.000000000 +0900
@@ -28,6 +28,13 @@
#include <linux/stringify.h>

/*
+ * for kernel/latency.c
+ */
+#ifdef CONFIG_DEBUG_STACKOVERFLOW
+#define STACK_WARN (THREAD_SIZE/8)
+#endif
+
+/*
* low level task data.
*/
struct thread_info {
diff -rup -x CVS 2.6.16-rt17/kernel/latency.c rt-powerpc/kernel/latency.c
--- 2.6.16-rt17/kernel/latency.c 2006-04-26 18:24:29.000000000 +0900
+++ rt-powerpc/kernel/latency.c 2006-07-12 13:57:31.000000000 +0900
@@ -464,6 +464,13 @@ static notrace void debug_stackoverflow(
#elif defined(__x86_64__)
__asm__ __volatile__("and %%rsp,%0" :
"=r" (stack_left) : "0" (THREAD_SIZE - 1));
+#elif defined(__powerpc__)
+ /*
+ * to keep compiler quiet.
+ */
+ /* for powerpc64: is there less than 2KB(16KB/8) free? */
+ __asm__ __volatile__("mr %0, 1" : "=r" (stack_left));
+ stack_left &= THREAD_SIZE - 1;
#else
# error Poke the author of above asm code lines !
#endif
diff -rup -x CVS 2.6.16-rt17/lib/string.c rt-powerpc/lib/string.c
--- 2.6.16-rt17/lib/string.c 2006-03-20 14:53:29.000000000 +0900
+++ rt-powerpc/lib/string.c 2006-06-16 13:08:07.000000000 +0900
@@ -67,7 +67,7 @@ EXPORT_SYMBOL(strnicmp);
* @src: Where to copy the string from
*/
#undef strcpy
-char *strcpy(char *dest, const char *src)
+char * notrace strcpy(char *dest, const char *src)
{
char *tmp = dest;

@@ -119,7 +119,7 @@ EXPORT_SYMBOL(strncpy);
* of course, the buffer size is zero). It does not pad
* out the result like strncpy() does.
*/
-size_t strlcpy(char *dest, const char *src, size_t size)
+size_t notrace strlcpy(char *dest, const char *src, size_t size)
{
size_t ret = strlen(src);

@@ -216,7 +216,7 @@ EXPORT_SYMBOL(strlcat);
* @ct: Another string
*/
#undef strcmp
-int strcmp(const char *cs, const char *ct)
+int notrace strcmp(const char *cs, const char *ct)
{
signed char __res;

@@ -236,7 +236,7 @@ EXPORT_SYMBOL(strcmp);
* @ct: Another string
* @count: The maximum number of bytes to compare
*/
-int strncmp(const char *cs, const char *ct, size_t count)
+int notrace notrace strncmp(const char *cs, const char *ct, size_t count)
{
signed char __res = 0;

@@ -306,7 +306,7 @@ EXPORT_SYMBOL(strnchr);
* strlen - Find the length of a string
* @s: The string to be sized
*/
-size_t strlen(const char *s)
+size_t notrace strlen(const char *s)
{
const char *sc;

@@ -561,7 +561,7 @@ EXPORT_SYMBOL(memscan);
* @s1: The string to be searched
* @s2: The string to search for
*/
-char *strstr(const char *s1, const char *s2)
+char * notrace strstr(const char *s1, const char *s2)
{
int l1, l2;

diff -rup -x CVS 2.6.16-rt17/lib/vsprintf.c rt-powerpc/lib/vsprintf.c
--- 2.6.16-rt17/lib/vsprintf.c 2006-03-20 14:53:29.000000000 +0900
+++ rt-powerpc/lib/vsprintf.c 2006-06-09 18:25:38.000000000 +0900
@@ -143,7 +143,7 @@ static int skip_atoi(const char **s)
#define SPECIAL 32 /* 0x */
#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */

-static char * number(char * buf, char * end, unsigned long long num, int base, int size, int precision, int type)
+static char * notrace number(char * buf, char * end, unsigned long long num, int base, int size, int precision, int type)
{
char c,sign,tmp[66];
const char *digits;
@@ -254,7 +254,7 @@ static char * number(char * buf, char *
* Call this function if you are already dealing with a va_list.
* You probably want snprintf instead.
*/
-int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
+int notrace vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
{
int len;
unsigned long long num;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/