Commit 8a972b41 authored by Paul Mackerras's avatar Paul Mackerras

PPC32: Use char[] consistently with __bss_start, _end, etc.

parent 50692f8c
......@@ -268,7 +268,6 @@ __init
unsigned long
early_init(int r3, int r4, int r5)
{
extern char __bss_start, _end;
unsigned long phys;
unsigned long offset = reloc_offset();
......@@ -277,7 +276,7 @@ early_init(int r3, int r4, int r5)
/* First zero the BSS -- use memset, some arches don't have
* caches on yet */
memset_io(PTRRELOC(&__bss_start), 0, &_end - &__bss_start);
memset_io(PTRRELOC(&__bss_start), 0, _end - __bss_start);
/*
* Identify the CPU type and fix up code sections
......@@ -466,7 +465,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
struct bi_record *find_bootinfo(void)
{
struct bi_record *rec;
extern char __bss_start[];
rec = (struct bi_record *)_ALIGN((ulong)__bss_start+(1<<20)-1,(1<<20));
if ( rec->tag != BI_FIRST ) {
......@@ -591,7 +589,6 @@ arch_initcall(ppc_init);
void __init setup_arch(char **cmdline_p)
{
extern int panic_timeout;
extern char _etext[], _edata[];
extern char *klimit;
extern void do_init_bootmem(void);
......
......@@ -133,7 +133,6 @@ char *bootdevice;
struct device_node *allnodes;
extern char *klimit;
extern char _stext;
static void __init
prom_exit(void)
......@@ -601,7 +600,7 @@ prom_hold_cpus(unsigned long mem)
/* copy the holding pattern code to someplace safe (0) */
/* the holding pattern is now within the first 0x100
bytes of the kernel image -- paulus */
memcpy((void *)0, &_stext, 0x100);
memcpy((void *)0, _stext, 0x100);
flush_icache_range(0, 0x100);
/* look for cpus */
......@@ -631,7 +630,7 @@ prom_hold_cpus(unsigned long mem)
prom_print(path);
*(ulong *)(0x4) = 0;
call_prom("start-cpu", 3, 0, node,
(char *)__secondary_hold - &_stext, cpu);
(char *)__secondary_hold - _stext, cpu);
prom_print("...");
for ( i = 0 ; (i < 10000) && (*(ulong *)(0x4) == 0); i++ )
;
......
......@@ -2,6 +2,10 @@
#ifndef _PPC_SECTIONS_H
#define _PPC_SECTIONS_H
#include <asm-generic/sections.h>
extern char _end[];
#define __pmac __attribute__ ((__section__ (".pmac.text")))
#define __pmacdata __attribute__ ((__section__ (".pmac.data")))
#define __pmacfunc(__argpmac) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment