Commit 3d5ae6b6 authored by David S. Miller's avatar David S. Miller

[SPARC64]: Fix sparse warnings in arch/sparc64/kernel/{cpu,setup}.c

We create a local header file entry.h, under arch/sparc64/kernel/,
that we can use to declare routines either defined in assembler
or only invoked from assembler.  As well as other data objects
which are private to the inner sparc64 kernel arch code.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 606d5b19
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
#include <asm/spitfire.h> #include <asm/spitfire.h>
#include <asm/oplib.h> #include <asm/oplib.h>
#include "entry.h"
DEFINE_PER_CPU(cpuinfo_sparc, __cpu_data) = { 0 }; DEFINE_PER_CPU(cpuinfo_sparc, __cpu_data) = { 0 };
struct cpu_iu_info { struct cpu_iu_info {
...@@ -65,8 +67,6 @@ static struct cpu_iu_info linux_sparc_chips[] = { ...@@ -65,8 +67,6 @@ static struct cpu_iu_info linux_sparc_chips[] = {
char *sparc_cpu_type; char *sparc_cpu_type;
char *sparc_fpu_type; char *sparc_fpu_type;
unsigned int fsr_storage;
static void __init sun4v_cpu_probe(void) static void __init sun4v_cpu_probe(void)
{ {
switch (sun4v_chip_type) { switch (sun4v_chip_type) {
...@@ -94,8 +94,10 @@ void __init cpu_probe(void) ...@@ -94,8 +94,10 @@ void __init cpu_probe(void)
unsigned long ver, fpu_vers, manuf, impl, fprs; unsigned long ver, fpu_vers, manuf, impl, fprs;
int i; int i;
if (tlb_type == hypervisor) if (tlb_type == hypervisor) {
return sun4v_cpu_probe(); sun4v_cpu_probe();
return;
}
fprs = fprs_read(); fprs = fprs_read();
fprs_write(FPRS_FEF); fprs_write(FPRS_FEF);
......
#ifndef _ENTRY_H
#define _ENTRY_H
#include <linux/init.h>
extern char *sparc_cpu_type;
extern char *sparc_fpu_type;
extern void __init per_cpu_patch(void);
extern void __init sun4v_patch(void);
extern void __init boot_cpu_id_too_large(int cpu);
extern unsigned int dcache_parity_tl1_occurred;
extern unsigned int icache_parity_tl1_occurred;
#endif /* _ENTRY_H */
...@@ -51,6 +51,8 @@ ...@@ -51,6 +51,8 @@
#include <net/ipconfig.h> #include <net/ipconfig.h>
#endif #endif
#include "entry.h"
/* Used to synchronize accesses to NatSemi SUPER I/O chip configure /* Used to synchronize accesses to NatSemi SUPER I/O chip configure
* operations in asm/ns87303.h * operations in asm/ns87303.h
*/ */
...@@ -335,9 +337,6 @@ void __init setup_arch(char **cmdline_p) ...@@ -335,9 +337,6 @@ void __init setup_arch(char **cmdline_p)
/* BUFFER is PAGE_SIZE bytes long. */ /* BUFFER is PAGE_SIZE bytes long. */
extern char *sparc_cpu_type;
extern char *sparc_fpu_type;
extern void smp_info(struct seq_file *); extern void smp_info(struct seq_file *);
extern void smp_bogo(struct seq_file *); extern void smp_bogo(struct seq_file *);
extern void mmu_info(struct seq_file *); extern void mmu_info(struct seq_file *);
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/sstate.h> #include <asm/sstate.h>
#include <asm/mdesc.h> #include <asm/mdesc.h>
#include <asm/cpudata.h>
#define MAX_PHYS_ADDRESS (1UL << 42UL) #define MAX_PHYS_ADDRESS (1UL << 42UL)
#define KPTE_BITMAP_CHUNK_SZ (256UL * 1024UL * 1024UL) #define KPTE_BITMAP_CHUNK_SZ (256UL * 1024UL * 1024UL)
......
...@@ -86,6 +86,8 @@ extern struct trap_per_cpu trap_block[NR_CPUS]; ...@@ -86,6 +86,8 @@ extern struct trap_per_cpu trap_block[NR_CPUS];
extern void init_cur_cpu_trap(struct thread_info *); extern void init_cur_cpu_trap(struct thread_info *);
extern void setup_tba(void); extern void setup_tba(void);
extern int ncpus_probed; extern int ncpus_probed;
extern void __init cpu_probe(void);
extern const struct seq_operations cpuinfo_op;
extern unsigned long real_hard_smp_processor_id(void); extern unsigned long real_hard_smp_processor_id(void);
......
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