Commit 20fd1c34 authored by Keith M. Wesolowski's avatar Keith M. Wesolowski

[SPARC32]: Fix CONFIG_SUN4 build

parent 938999d4
...@@ -233,7 +233,6 @@ extern void sun4c_probe_vac(void); ...@@ -233,7 +233,6 @@ extern void sun4c_probe_vac(void);
extern char cputypval; extern char cputypval;
extern unsigned long start, end; extern unsigned long start, end;
extern void panic_setup(char *, int *); extern void panic_setup(char *, int *);
extern void srmmu_end_memory(unsigned long, unsigned long *);
extern unsigned short root_flags; extern unsigned short root_flags;
extern unsigned short root_dev; extern unsigned short root_dev;
......
...@@ -9,10 +9,12 @@ ...@@ -9,10 +9,12 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/mbus.h> #include <asm/mbus.h>
#include <asm/sbus.h>
static char shouldnothappen[] __initdata = "SUN4 kernel can only run on SUN4\n"; static char shouldnothappen[] __initdata = "SUN4 kernel can only run on SUN4\n";
enum mbus_module srmmu_modtype; enum mbus_module srmmu_modtype;
void *srmmu_nocache_pool;
int vac_cache_size = 0; int vac_cache_size = 0;
...@@ -46,11 +48,6 @@ void srmmu_unmapioaddr(unsigned long virt_addr) ...@@ -46,11 +48,6 @@ void srmmu_unmapioaddr(unsigned long virt_addr)
{ {
} }
void __init srmmu_end_memory(unsigned long memory_size, unsigned long *mem_end_p)
{
return 0;
}
__u32 iounit_map_dma_init(struct sbus_bus *sbus, int size) __u32 iounit_map_dma_init(struct sbus_bus *sbus, int size)
{ {
return 0; return 0;
......
...@@ -309,6 +309,10 @@ static void __init sbus_fixup_all_regs(struct sbus_dev *first_sdev) ...@@ -309,6 +309,10 @@ static void __init sbus_fixup_all_regs(struct sbus_dev *first_sdev)
extern void register_proc_sparc_ioport(void); extern void register_proc_sparc_ioport(void);
extern void firetruck_init(void); extern void firetruck_init(void);
#ifdef CONFIG_SUN4
extern void sun4_dvma_init(void);
#endif
static int __init sbus_init(void) static int __init sbus_init(void)
{ {
int nd, this_sbus, sbus_devs, topnd, iommund; int nd, this_sbus, sbus_devs, topnd, iommund;
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
#define _SUN4C_PAGE_NOCACHE 0x10000000 /* non-cacheable page */ #define _SUN4C_PAGE_NOCACHE 0x10000000 /* non-cacheable page */
#define _SUN4C_PAGE_PRESENT 0x08000000 /* implemented in software */ #define _SUN4C_PAGE_PRESENT 0x08000000 /* implemented in software */
#define _SUN4C_PAGE_IO 0x04000000 /* I/O page */ #define _SUN4C_PAGE_IO 0x04000000 /* I/O page */
#define _SUN4C_PAGE_FILE 0x02000000 /* implemented in software */
#define _SUN4C_PAGE_READ 0x00800000 /* implemented in software */ #define _SUN4C_PAGE_READ 0x00800000 /* implemented in software */
#define _SUN4C_PAGE_WRITE 0x00400000 /* implemented in software */ #define _SUN4C_PAGE_WRITE 0x00400000 /* implemented in software */
#define _SUN4C_PAGE_ACCESSED 0x00200000 /* implemented in software */ #define _SUN4C_PAGE_ACCESSED 0x00200000 /* implemented in software */
...@@ -71,6 +72,21 @@ ...@@ -71,6 +72,21 @@
#define SUN4C_PAGE_KERNEL __pgprot(_SUN4C_READABLE|_SUN4C_WRITEABLE|\ #define SUN4C_PAGE_KERNEL __pgprot(_SUN4C_READABLE|_SUN4C_WRITEABLE|\
_SUN4C_PAGE_DIRTY|_SUN4C_PAGE_PRIV) _SUN4C_PAGE_DIRTY|_SUN4C_PAGE_PRIV)
/* SUN4C swap entry encoding
*
* We use 5 bits for the type and 19 for the offset. This gives us
* 32 swapfiles of 4GB each. Encoding looks like:
*
* RRRRRRRRooooooooooooooooooottttt
* fedcba9876543210fedcba9876543210
*
* The top 8 bits are reserved for protection and status bits, especially
* FILE and PRESENT.
*/
#define SUN4C_SWP_TYPE_MASK 0x1f
#define SUN4C_SWP_OFF_MASK 0x7ffff
#define SUN4C_SWP_OFF_SHIFT 5
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
static inline unsigned long sun4c_get_synchronous_error(void) static inline unsigned long sun4c_get_synchronous_error(void)
......
...@@ -25,7 +25,7 @@ typedef struct { ...@@ -25,7 +25,7 @@ typedef struct {
unsigned char (*getchar)(void); /* Get char from input device */ unsigned char (*getchar)(void); /* Get char from input device */
void (*putchar)(char); /* Put char to output device */ void (*putchar)(char); /* Put char to output device */
int (*mayget)(void); /* Maybe get char, or -1 */ int (*mayget)(void); /* Maybe get char, or -1 */
int (*mayput)(void); /* Maybe put char, or -1 */ int (*mayput)(int); /* Maybe put char, or -1 */
unsigned char *echo; /* Should getchar echo? */ unsigned char *echo; /* Should getchar echo? */
unsigned char *insource; /* Input source selector */ unsigned char *insource; /* Input source selector */
unsigned char *outsink; /* Output sink selector */ unsigned char *outsink; /* Output sink selector */
......
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