sparc32: remove all uses of ARCH_SUN4C

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Sam Ravnborg 2012-05-11 11:35:08 +00:00 committed by David S. Miller
parent 593fc6ea47
commit 582a0baee5
6 changed files with 8 additions and 61 deletions

View File

@ -19,16 +19,12 @@ enum sparc_cpu {
#ifdef CONFIG_SPARC32 #ifdef CONFIG_SPARC32
extern enum sparc_cpu sparc_cpu_model; extern enum sparc_cpu sparc_cpu_model;
#define ARCH_SUN4C (sparc_cpu_model==sun4c)
#define SUN4M_NCPUS 4 /* Architectural limit of sun4m. */ #define SUN4M_NCPUS 4 /* Architectural limit of sun4m. */
#else #else
#define sparc_cpu_model sun4u #define sparc_cpu_model sun4u
/* This cannot ever be a sun4c :) That's just history. */
#define ARCH_SUN4C 0
#endif #endif
#endif /* __ASM_CPU_TYPE_H */ #endif /* __ASM_CPU_TYPE_H */

View File

@ -118,11 +118,10 @@ typedef struct {
instruction set this cpu supports. This can NOT be done in userspace instruction set this cpu supports. This can NOT be done in userspace
on Sparc. */ on Sparc. */
/* Sun4c has none of the capabilities, most sun4m's have them all. /* Most sun4m's have them all.
* XXX This is gross, set some global variable at boot time. -DaveM * XXX This is gross, set some global variable at boot time. -DaveM
*/ */
#define ELF_HWCAP ((ARCH_SUN4C) ? 0 : \ #define ELF_HWCAP ((HWCAP_SPARC_FLUSH | HWCAP_SPARC_STBAR | \
(HWCAP_SPARC_FLUSH | HWCAP_SPARC_STBAR | \
HWCAP_SPARC_SWAP | \ HWCAP_SPARC_SWAP | \
((srmmu_modtype != Cypress && \ ((srmmu_modtype != Cypress && \
srmmu_modtype != Cypress_vE && \ srmmu_modtype != Cypress_vE && \

View File

@ -67,8 +67,6 @@ struct thread_info *current_set[NR_CPUS];
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
#define SUN4C_FAULT_HIGH 100
/* /*
* the idle loop on a Sparc... ;) * the idle loop on a Sparc... ;)
*/ */
@ -76,36 +74,6 @@ void cpu_idle(void)
{ {
/* endless idle loop with no priority at all */ /* endless idle loop with no priority at all */
for (;;) { for (;;) {
if (ARCH_SUN4C) {
static int count = HZ;
static unsigned long last_jiffies;
static unsigned long last_faults;
static unsigned long fps;
unsigned long now;
unsigned long faults;
extern unsigned long sun4c_kernel_faults;
extern void sun4c_grow_kernel_ring(void);
local_irq_disable();
now = jiffies;
count -= (now - last_jiffies);
last_jiffies = now;
if (count < 0) {
count += HZ;
faults = sun4c_kernel_faults;
fps = (fps + (faults - last_faults)) >> 1;
last_faults = faults;
#if 0
printk("kernel faults / second = %ld\n", fps);
#endif
if (fps >= SUN4C_FAULT_HIGH) {
/*sun4c_grow_kernel_ring();*/
}
}
local_irq_enable();
}
if (pm_idle) { if (pm_idle) {
while (!need_resched()) while (!need_resched())
(*pm_idle)(); (*pm_idle)();

View File

@ -53,8 +53,6 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
/* See asm-sparc/uaccess.h */ /* See asm-sparc/uaccess.h */
if (len > TASK_SIZE - PAGE_SIZE) if (len > TASK_SIZE - PAGE_SIZE)
return -ENOMEM; return -ENOMEM;
if (ARCH_SUN4C && len > 0x20000000)
return -ENOMEM;
if (!addr) if (!addr)
addr = TASK_UNMAPPED_BASE; addr = TASK_UNMAPPED_BASE;
@ -65,10 +63,6 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
for (vmm = find_vma(current->mm, addr); ; vmm = vmm->vm_next) { for (vmm = find_vma(current->mm, addr); ; vmm = vmm->vm_next) {
/* At this point: (!vmm || addr < vmm->vm_end). */ /* At this point: (!vmm || addr < vmm->vm_end). */
if (ARCH_SUN4C && addr < 0xe0000000 && 0x20000000 - len < addr) {
addr = PAGE_OFFSET;
vmm = find_vma(current->mm, PAGE_OFFSET);
}
if (TASK_SIZE - PAGE_SIZE - len < addr) if (TASK_SIZE - PAGE_SIZE - len < addr)
return -ENOMEM; return -ENOMEM;
if (!vmm || addr + len <= vmm->vm_start) if (!vmm || addr + len <= vmm->vm_start)
@ -99,11 +93,6 @@ out:
int sparc_mmap_check(unsigned long addr, unsigned long len) int sparc_mmap_check(unsigned long addr, unsigned long len)
{ {
if (ARCH_SUN4C &&
(len > 0x20000000 ||
(addr < 0xe0000000 && addr + len > 0x20000000)))
return -EINVAL;
/* See asm-sparc/uaccess.h */ /* See asm-sparc/uaccess.h */
if (len > TASK_SIZE - PAGE_SIZE || addr + len > TASK_SIZE - PAGE_SIZE) if (len > TASK_SIZE - PAGE_SIZE || addr + len > TASK_SIZE - PAGE_SIZE)
return -EINVAL; return -EINVAL;

View File

@ -19,7 +19,6 @@
extern char *srmmu_name; extern char *srmmu_name;
static char version[] __initdata = "Boot time fixup v1.6. 4/Mar/98 Jakub Jelinek (jj@ultra.linux.cz). Patching kernel for "; static char version[] __initdata = "Boot time fixup v1.6. 4/Mar/98 Jakub Jelinek (jj@ultra.linux.cz). Patching kernel for ";
static char str_sun4c[] __initdata = "sun4c\n";
static char str_srmmu[] __initdata = "srmmu[%s]/"; static char str_srmmu[] __initdata = "srmmu[%s]/";
static char str_iommu[] __initdata = "iommu\n"; static char str_iommu[] __initdata = "iommu\n";
static char str_iounit[] __initdata = "io-unit\n"; static char str_iounit[] __initdata = "io-unit\n";
@ -81,16 +80,12 @@ void __init btfixup(void)
if (!visited) { if (!visited) {
visited++; visited++;
printk(version); printk(version);
if (ARCH_SUN4C)
printk(str_sun4c);
else {
printk(str_srmmu, srmmu_name); printk(str_srmmu, srmmu_name);
if (sparc_cpu_model == sun4d) if (sparc_cpu_model == sun4d)
printk(str_iounit); printk(str_iounit);
else else
printk(str_iommu); printk(str_iommu);
} }
}
for (p = ___btfixup_start; p < ___btfixup_end; ) { for (p = ___btfixup_start; p < ___btfixup_end; ) {
count = p[2]; count = p[2];
q = p + 3; q = p + 3;

View File

@ -235,7 +235,7 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write,
* nothing more. * nothing more.
*/ */
code = SEGV_MAPERR; code = SEGV_MAPERR;
if (!ARCH_SUN4C && address >= TASK_SIZE) if (address >= TASK_SIZE)
goto vmalloc_fault; goto vmalloc_fault;
/* /*