Commit 5a1c8ba5 authored by Jeff Garzik's avatar Jeff Garzik

Merge mandrakesoft.com:/home/jgarzik/vanilla/linus-2.5

into mandrakesoft.com:/home/jgarzik/repo/irda-2.5
parents cc21ca79 4cc4c697
...@@ -8,12 +8,11 @@ ...@@ -8,12 +8,11 @@
# Copyright (C) 1994 by Linus Torvalds # Copyright (C) 1994 by Linus Torvalds
# #
LINKFLAGS = -static -T bootloader.lds #-N -relax USE_STANDARD_AS_RULE := true
EXTRA_AFLAGS := -traditional
.S.s: LINKFLAGS = -static -T bootloader.lds #-N -relax
$(CPP) $(AFLAGS) -traditional -o $*.o $<
.S.o:
$(CC) $(AFLAGS) -traditional -c -o $*.o $<
OBJECTS = head.o main.o OBJECTS = head.o main.o
BPOBJECTS = head.o bootp.o BPOBJECTS = head.o bootp.o
......
...@@ -7,13 +7,12 @@ ...@@ -7,13 +7,12 @@
# #
# Note 2! The CFLAGS definitions are now in the main makefile... # Note 2! The CFLAGS definitions are now in the main makefile...
.S.s: USE_STANDARD_AS_RULE := true
$(CPP) $(CFLAGS) $(AFLAGS) -o $*.s $<
.S.o:
$(CC) $(CFLAGS) $(AFLAGS) -c -o $*.o $<
O_TARGET := kernel.o O_TARGET := kernel.o
EXTRA_AFLAGS := $(CFLAGS)
export-objs := alpha_ksyms.o export-objs := alpha_ksyms.o
obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o irq_alpha.o \ obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o irq_alpha.o \
......
...@@ -260,16 +260,22 @@ int ...@@ -260,16 +260,22 @@ int
alpha_clone(unsigned long clone_flags, unsigned long usp, alpha_clone(unsigned long clone_flags, unsigned long usp,
struct switch_stack * swstack) struct switch_stack * swstack)
{ {
struct task_struct *p;
if (!usp) if (!usp)
usp = rdusp(); usp = rdusp();
return do_fork(clone_flags, usp, (struct pt_regs *) (swstack+1), 0);
p = do_fork(clone_flags & ~CLONE_IDLETASK,
usp, (struct pt_regs *) (swstack+1), 0);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
int int
alpha_vfork(struct switch_stack * swstack) alpha_vfork(struct switch_stack * swstack)
{ {
return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), struct task_struct *p;
(struct pt_regs *) (swstack+1), 0); p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(),
(struct pt_regs *) (swstack+1), 0);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
/* /*
......
...@@ -433,13 +433,13 @@ secondary_cpu_start(int cpuid, struct task_struct *idle) ...@@ -433,13 +433,13 @@ secondary_cpu_start(int cpuid, struct task_struct *idle)
return 0; return 0;
} }
static int __init static struct task_struct * __init
fork_by_hand(void) fork_by_hand(void)
{ {
/* Don't care about the contents of regs since we'll never /* Don't care about the contents of regs since we'll never
reschedule the forked task. */ reschedule the forked task. */
struct pt_regs regs; struct pt_regs regs;
return do_fork(CLONE_VM|CLONE_PID, 0, &regs, 0); return do_fork(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0);
} }
/* /*
...@@ -457,13 +457,10 @@ smp_boot_one_cpu(int cpuid, int cpunum) ...@@ -457,13 +457,10 @@ smp_boot_one_cpu(int cpuid, int cpunum)
the other task-y sort of data structures set up like we the other task-y sort of data structures set up like we
wish. We can't use kernel_thread since we must avoid wish. We can't use kernel_thread since we must avoid
rescheduling the child. */ rescheduling the child. */
if (fork_by_hand() < 0) idle = fork_by_hand();
if (IS_ERR(idle))
panic("failed fork for CPU %d", cpuid); panic("failed fork for CPU %d", cpuid);
idle = prev_task(&init_task);
if (!idle)
panic("No idle process for CPU %d", cpuid);
init_idle(idle, cpuid); init_idle(idle, cpuid);
unhash_process(idle); unhash_process(idle);
......
...@@ -2,10 +2,9 @@ ...@@ -2,10 +2,9 @@
# Makefile for alpha-specific library files.. # Makefile for alpha-specific library files..
# #
.S.s: USE_STANDARD_AS_RULE := true
$(CPP) -D__ASSEMBLY__ $(CFLAGS) -o $*.s $<
.S.o: EXTRA_AFLAGS := $(CFLAGS)
$(CC) -D__ASSEMBLY__ $(CFLAGS) -c -o $*.o $<
# Many of these routines have implementations tuned for ev6. # Many of these routines have implementations tuned for ev6.
# Choose them iff we're targeting ev6 specifically. # Choose them iff we're targeting ev6 specifically.
......
...@@ -14,14 +14,12 @@ ifeq ($(CONFIG_CPU_26),y) ...@@ -14,14 +14,12 @@ ifeq ($(CONFIG_CPU_26),y)
ZRELADDR = 0x02080000 ZRELADDR = 0x02080000
PARAMS_PHYS = 0x0207c000 PARAMS_PHYS = 0x0207c000
INITRD_PHYS = 0x02180000 INITRD_PHYS = 0x02180000
INITRD_VIRT = 0x02180000
endif endif
ifeq ($(CONFIG_ARCH_RPC),y) ifeq ($(CONFIG_ARCH_RPC),y)
ZRELADDR = 0x10008000 ZRELADDR = 0x10008000
PARAMS_PHYS = 0x10000100 PARAMS_PHYS = 0x10000100
INITRD_PHYS = 0x18000000 INITRD_PHYS = 0x18000000
INITRD_VIRT = 0xc8000000
endif endif
ifeq ($(CONFIG_ARCH_CLPS7500),y) ifeq ($(CONFIG_ARCH_CLPS7500),y)
...@@ -32,7 +30,6 @@ ifeq ($(CONFIG_ARCH_EBSA110),y) ...@@ -32,7 +30,6 @@ ifeq ($(CONFIG_ARCH_EBSA110),y)
ZRELADDR = 0x00008000 ZRELADDR = 0x00008000
PARAMS_PHYS = 0x00000400 PARAMS_PHYS = 0x00000400
INITRD_PHYS = 0x00800000 INITRD_PHYS = 0x00800000
INITRD_VIRT = 0xc0800000
endif endif
ifeq ($(CONFIG_ARCH_SHARK),y) ifeq ($(CONFIG_ARCH_SHARK),y)
...@@ -44,14 +41,12 @@ ifeq ($(CONFIG_FOOTBRIDGE),y) ...@@ -44,14 +41,12 @@ ifeq ($(CONFIG_FOOTBRIDGE),y)
ZRELADDR = 0x00008000 ZRELADDR = 0x00008000
PARAMS_PHYS = 0x00000100 PARAMS_PHYS = 0x00000100
INITRD_PHYS = 0x00800000 INITRD_PHYS = 0x00800000
INITRD_VIRT = 0xc0800000
endif endif
ifeq ($(CONFIG_ARCH_INTEGRATOR),y) ifeq ($(CONFIG_ARCH_INTEGRATOR),y)
ZRELADDR = 0x00008000 ZRELADDR = 0x00008000
PARAMS_PHYS = 0x00000100 PARAMS_PHYS = 0x00000100
INITRD_PHYS = 0x00800000 INITRD_PHYS = 0x00800000
INITRD_VIRT = 0xc0800000
endif endif
ifeq ($(CONFIG_ARCH_CAMELOT),y) ifeq ($(CONFIG_ARCH_CAMELOT),y)
...@@ -75,11 +70,9 @@ endif ...@@ -75,11 +70,9 @@ endif
# Should probably have some agreement on these... # Should probably have some agreement on these...
ifeq ($(CONFIG_ARCH_P720T),y) ifeq ($(CONFIG_ARCH_P720T),y)
INITRD_PHYS = 0xc0400000 INITRD_PHYS = 0xc0400000
INITRD_VIRT = 0xc0400000
endif endif
ifeq ($(CONFIG_ARCH_CDB89712),y) ifeq ($(CONFIG_ARCH_CDB89712),y)
INITRD_PHYS = 0x00700000 INITRD_PHYS = 0x00700000
INITRD_VIRT = 0xc0300000
endif endif
ifeq ($(CONFIG_ARCH_SA1100),y) ifeq ($(CONFIG_ARCH_SA1100),y)
...@@ -119,7 +112,7 @@ ZTEXTADDR =0 ...@@ -119,7 +112,7 @@ ZTEXTADDR =0
ZBSSADDR =ALIGN(4) ZBSSADDR =ALIGN(4)
endif endif
export SYSTEM ZTEXTADDR ZBSSADDR ZRELADDR INITRD_PHYS INITRD_VIRT PARAMS_PHYS export SYSTEM ZTEXTADDR ZBSSADDR ZRELADDR INITRD_PHYS PARAMS_PHYS
Image: $(CONFIGURE) $(SYSTEM) Image: $(CONFIGURE) $(SYSTEM)
$(OBJCOPY) -O binary -R .note -R .comment -S $(SYSTEM) $@ $(OBJCOPY) -O binary -R .note -R .comment -S $(SYSTEM) $@
...@@ -139,7 +132,7 @@ bootp/bootp: zImage initrd ...@@ -139,7 +132,7 @@ bootp/bootp: zImage initrd
@$(MAKE) -C bootp bootp @$(MAKE) -C bootp bootp
initrd: initrd:
@test "$(INITRD_VIRT)" != "" || (echo This architecture does not support INITRD; exit -1) @test "$(INITRD_PHYS)" != "" || (echo This architecture does not support INITRD; exit -1)
@test "$(INITRD)" != "" || (echo You must specify INITRD; exit -1) @test "$(INITRD)" != "" || (echo You must specify INITRD; exit -1)
install: $(CONFIGURE) Image install: $(CONFIGURE) Image
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
ZSYSTEM =$(TOPDIR)/arch/arm/boot/zImage ZSYSTEM =$(TOPDIR)/arch/arm/boot/zImage
ZLDFLAGS =-p -X -T bootp.lds \ ZLDFLAGS =-p -X -T bootp.lds \
--defsym initrd_addr=$(INITRD_PHYS) \ --defsym initrd_addr=$(INITRD_PHYS) \
--defsym initrd_virt=$(INITRD_VIRT) \
--defsym params=$(PARAMS_PHYS) \ --defsym params=$(PARAMS_PHYS) \
--defsym kernel_addr=$(ZTEXTADDR) --defsym kernel_addr=$(ZTEXTADDR)
......
...@@ -102,8 +102,8 @@ data: .word initrd_start ...@@ -102,8 +102,8 @@ data: .word initrd_start
.word kernel_len .word kernel_len
.word 0x54410001 @ r4 = ATAG_CORE .word 0x54410001 @ r4 = ATAG_CORE
.word 0x54410005 @ r5 = ATAG_INITRD .word 0x54420005 @ r5 = ATAG_INITRD
.word initrd_virt @ r6 .word initrd_addr @ r6
.word initrd_len @ r7 .word initrd_len @ r7
.word params @ r8 .word params @ r8
......
...@@ -151,7 +151,7 @@ not_angel: ...@@ -151,7 +151,7 @@ not_angel:
add r1, r1, r0 @ table. This fixes up the add r1, r1, r0 @ table. This fixes up the
str r1, [r6], #4 @ C references. str r1, [r6], #4 @ C references.
cmp r6, ip cmp r6, ip
blt 1b blo 1b
not_relocated: mov r0, #0 not_relocated: mov r0, #0
1: str r0, [r2], #4 @ clear bss 1: str r0, [r2], #4 @ clear bss
...@@ -159,7 +159,7 @@ not_relocated: mov r0, #0 ...@@ -159,7 +159,7 @@ not_relocated: mov r0, #0
str r0, [r2], #4 str r0, [r2], #4
str r0, [r2], #4 str r0, [r2], #4
cmp r2, r3 cmp r2, r3
blt 1b blo 1b
mrc p15, 0, r6, c0, c0 @ get processor ID mrc p15, 0, r6, c0, c0 @ get processor ID
bl cache_on bl cache_on
...@@ -206,7 +206,7 @@ not_relocated: mov r0, #0 ...@@ -206,7 +206,7 @@ not_relocated: mov r0, #0
ldmia r2!, {r8 - r13} ldmia r2!, {r8 - r13}
stmia r1!, {r8 - r13} stmia r1!, {r8 - r13}
cmp r2, r3 cmp r2, r3
blt 1b blo 1b
bl cache_clean_flush bl cache_clean_flush
add pc, r5, r0 @ call relocation code add pc, r5, r0 @ call relocation code
...@@ -270,9 +270,9 @@ __cache_on: sub r3, r4, #16384 @ Page directory size ...@@ -270,9 +270,9 @@ __cache_on: sub r3, r4, #16384 @ Page directory size
orr r1, r1, #3 << 10 orr r1, r1, #3 << 10
add r2, r3, #16384 add r2, r3, #16384
1: cmp r1, r8 @ if virt > start of RAM 1: cmp r1, r8 @ if virt > start of RAM
orrge r1, r1, #0x0c @ set cacheable, bufferable orrhs r1, r1, #0x0c @ set cacheable, bufferable
cmp r1, r9 @ if virt > end of RAM cmp r1, r9 @ if virt > end of RAM
bicge r1, r1, #0x0c @ clear cacheable, bufferable bichs r1, r1, #0x0c @ clear cacheable, bufferable
str r1, [r0], #4 @ 1:1 mapping str r1, [r0], #4 @ 1:1 mapping
add r1, r1, #1048576 add r1, r1, #1048576
teq r0, r2 teq r0, r2
...@@ -330,7 +330,7 @@ reloc_start: add r8, r5, r0 ...@@ -330,7 +330,7 @@ reloc_start: add r8, r5, r0
.endr .endr
cmp r5, r8 cmp r5, r8
blt 1b blo 1b
debug_reloc_end debug_reloc_end
call_kernel: bl cache_clean_flush call_kernel: bl cache_clean_flush
...@@ -396,6 +396,12 @@ proc_types: ...@@ -396,6 +396,12 @@ proc_types:
b __armv4_cache_off b __armv4_cache_off
mov pc, lr mov pc, lr
.word 0x41129200 @ ARM920T
.word 0xff00fff0
b __cache_on
b __armv4_cache_off
b __armv4_cache_flush
.word 0x4401a100 @ sa110 / sa1100 .word 0x4401a100 @ sa110 / sa1100
.word 0xffffffe0 .word 0xffffffe0
b __cache_on b __cache_on
......
...@@ -464,20 +464,8 @@ bool 'Power Management support' CONFIG_PM ...@@ -464,20 +464,8 @@ bool 'Power Management support' CONFIG_PM
dep_bool 'Preemptible Kernel (experimental)' CONFIG_PREEMPT $CONFIG_CPU_32 $CONFIG_EXPERIMENTAL dep_bool 'Preemptible Kernel (experimental)' CONFIG_PREEMPT $CONFIG_CPU_32 $CONFIG_EXPERIMENTAL
dep_tristate 'Advanced Power Management Emulation' CONFIG_APM $CONFIG_PM dep_tristate 'Advanced Power Management Emulation' CONFIG_APM $CONFIG_PM
dep_tristate 'RISC OS personality' CONFIG_ARTHUR $CONFIG_CPU_32 dep_tristate 'RISC OS personality' CONFIG_ARTHUR $CONFIG_CPU_32
string 'Default kernel command string' CONFIG_CMDLINE ""
if [ "$CONFIG_ARCH_EBSA110" = "y" -o \
"$CONFIG_ARCH_SA1100" = "y" -o \
"$CONFIG_ARCH_CLPS7500" = "y" -o \
"$CONFIG_ARCH_PERSONAL_SERVER" = "y" -o \
"$CONFIG_ARCH_CATS" = "y" -o \
"$CONFIG_ARCH_P720T" = "y" -o \
"$CONFIG_ARCH_CDB89712" = "y" -o \
"$CONFIG_ARCH_CAMELOT" = "y" -o \
"$CONFIG_ARCH_ANAKIN" = "y" -o \
"$CONFIG_ARCH_IOP310" = "y" -o \
"$CONFIG_ARCH_ADIFCC" = "y" ]; then
string 'Default kernel command string' CONFIG_CMDLINE ""
fi
if [ "$CONFIG_ARCH_NETWINDER" = "y" -o \ if [ "$CONFIG_ARCH_NETWINDER" = "y" -o \
"$CONFIG_ARCH_EBSA110" = "y" -o \ "$CONFIG_ARCH_EBSA110" = "y" -o \
"$CONFIG_ARCH_EBSA285" = "y" -o \ "$CONFIG_ARCH_EBSA285" = "y" -o \
......
...@@ -849,7 +849,7 @@ CONFIG_USB_DEBUG=y ...@@ -849,7 +849,7 @@ CONFIG_USB_DEBUG=y
# #
# CONFIG_USB_UHCI is not set # CONFIG_USB_UHCI is not set
# CONFIG_USB_UHCI_ALT is not set # CONFIG_USB_UHCI_ALT is not set
CONFIG_USB_OHCI=y # CONFIG_USB_OHCI is not set
CONFIG_USB_OHCI_SA1111=y CONFIG_USB_OHCI_SA1111=y
# #
......
...@@ -182,7 +182,6 @@ EXPORT_SYMBOL_NOVERS(strchr); ...@@ -182,7 +182,6 @@ EXPORT_SYMBOL_NOVERS(strchr);
EXPORT_SYMBOL_NOVERS(strlen); EXPORT_SYMBOL_NOVERS(strlen);
EXPORT_SYMBOL_NOVERS(strnlen); EXPORT_SYMBOL_NOVERS(strnlen);
EXPORT_SYMBOL_NOVERS(strpbrk); EXPORT_SYMBOL_NOVERS(strpbrk);
EXPORT_SYMBOL_NOVERS(strsep);
EXPORT_SYMBOL_NOVERS(strrchr); EXPORT_SYMBOL_NOVERS(strrchr);
EXPORT_SYMBOL_NOVERS(strstr); EXPORT_SYMBOL_NOVERS(strstr);
EXPORT_SYMBOL_NOVERS(memset); EXPORT_SYMBOL_NOVERS(memset);
......
...@@ -9,6 +9,11 @@ ...@@ -9,6 +9,11 @@
* *
* We keep the old params compatibility cruft in one place (here) * We keep the old params compatibility cruft in one place (here)
* so we don't end up with lots of mess around other places. * so we don't end up with lots of mess around other places.
*
* NOTE:
* The old struct param_struct is deprecated, but it will be kept in
* the kernel for 5 years from now (2001). This will allow boot loaders
* to convert to the new struct tag way.
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/types.h> #include <linux/types.h>
...@@ -22,6 +27,59 @@ ...@@ -22,6 +27,59 @@
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
/*
* Usage:
* - do not go blindly adding fields, add them at the end
* - when adding fields, don't rely on the address until
* a patch from me has been released
* - unused fields should be zero (for future expansion)
* - this structure is relatively short-lived - only
* guaranteed to contain useful data in setup_arch()
*
* This is the old deprecated way to pass parameters to the kernel
*/
struct param_struct {
union {
struct {
unsigned long page_size; /* 0 */
unsigned long nr_pages; /* 4 */
unsigned long ramdisk_size; /* 8 */
unsigned long flags; /* 12 */
#define FLAG_READONLY 1
#define FLAG_RDLOAD 4
#define FLAG_RDPROMPT 8
unsigned long rootdev; /* 16 */
unsigned long video_num_cols; /* 20 */
unsigned long video_num_rows; /* 24 */
unsigned long video_x; /* 28 */
unsigned long video_y; /* 32 */
unsigned long memc_control_reg; /* 36 */
unsigned char sounddefault; /* 40 */
unsigned char adfsdrives; /* 41 */
unsigned char bytes_per_char_h; /* 42 */
unsigned char bytes_per_char_v; /* 43 */
unsigned long pages_in_bank[4]; /* 44 */
unsigned long pages_in_vram; /* 60 */
unsigned long initrd_start; /* 64 */
unsigned long initrd_size; /* 68 */
unsigned long rd_start; /* 72 */
unsigned long system_rev; /* 76 */
unsigned long system_serial_low; /* 80 */
unsigned long system_serial_high; /* 84 */
unsigned long mem_fclk_21285; /* 88 */
} s;
char unused[256];
} u1;
union {
char paths[8][128];
struct {
unsigned long magic;
char n[1024 - sizeof(unsigned long)];
} s;
} u2;
char commandline[COMMAND_LINE_SIZE];
};
static struct tag * __init memtag(struct tag *tag, unsigned long start, unsigned long size) static struct tag * __init memtag(struct tag *tag, unsigned long start, unsigned long size)
{ {
tag = tag_next(tag); tag = tag_next(tag);
...@@ -33,7 +91,7 @@ static struct tag * __init memtag(struct tag *tag, unsigned long start, unsigned ...@@ -33,7 +91,7 @@ static struct tag * __init memtag(struct tag *tag, unsigned long start, unsigned
return tag; return tag;
} }
static void __init build_tag_list(struct param_struct *params, void *taglist, int mem_init) static void __init build_tag_list(struct param_struct *params, void *taglist)
{ {
struct tag *tag = taglist; struct tag *tag = taglist;
...@@ -44,6 +102,22 @@ static void __init build_tag_list(struct param_struct *params, void *taglist, in ...@@ -44,6 +102,22 @@ static void __init build_tag_list(struct param_struct *params, void *taglist, in
"trying to continue\n"); "trying to continue\n");
return; return;
} }
#ifdef CONFIG_ARCH_NETWINDER
if (params->u1.s.nr_pages != 0x02000 &&
params->u1.s.nr_pages != 0x04000 &&
params->u1.s.nr_pages != 0x08000 &&
params->u1.s.nr_pages != 0x10000) {
printk(KERN_WARNING "Warning: bad NeTTrom parameters "
"detected, using defaults\n");
params->u1.s.nr_pages = 0x1000; /* 16MB */
params->u1.s.ramdisk_size = 0;
params->u1.s.flags = FLAG_READONLY;
params->u1.s.initrd_start = 0;
params->u1.s.initrd_size = 0;
params->u1.s.rd_start = 0;
}
#endif
tag->hdr.tag = ATAG_CORE; tag->hdr.tag = ATAG_CORE;
tag->hdr.size = tag_size(tag_core); tag->hdr.size = tag_size(tag_core);
...@@ -76,17 +150,15 @@ static void __init build_tag_list(struct param_struct *params, void *taglist, in ...@@ -76,17 +150,15 @@ static void __init build_tag_list(struct param_struct *params, void *taglist, in
tag->hdr.size = tag_size(tag_revision); tag->hdr.size = tag_size(tag_revision);
tag->u.revision.rev = params->u1.s.system_rev; tag->u.revision.rev = params->u1.s.system_rev;
if (mem_init) {
#ifdef CONFIG_ARCH_ACORN #ifdef CONFIG_ARCH_ACORN
if (machine_is_riscpc()) { if (machine_is_riscpc()) {
int i; int i;
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
tag = memtag(tag, PHYS_OFFSET + (i << 26), tag = memtag(tag, PHYS_OFFSET + (i << 26),
params->u1.s.pages_in_bank[i] * PAGE_SIZE); params->u1.s.pages_in_bank[i] * PAGE_SIZE);
} else } else
#endif #endif
tag = memtag(tag, PHYS_OFFSET, params->u1.s.nr_pages * PAGE_SIZE); tag = memtag(tag, PHYS_OFFSET, params->u1.s.nr_pages * PAGE_SIZE);
}
#ifdef CONFIG_FOOTBRIDGE #ifdef CONFIG_FOOTBRIDGE
if (params->u1.s.mem_fclk_21285) { if (params->u1.s.mem_fclk_21285) {
...@@ -97,6 +169,23 @@ static void __init build_tag_list(struct param_struct *params, void *taglist, in ...@@ -97,6 +169,23 @@ static void __init build_tag_list(struct param_struct *params, void *taglist, in
} }
#endif #endif
#ifdef CONFIG_ARCH_EBSA285
if (machine_is_ebsa285()) {
tag = tag_next(tag);
tag->hdr.tag = ATAG_VIDEOTEXT;
tag->hdr.size = tag_size(tag_videotext);
tag->u.videotext.x = params->u1.s.video_x;
tag->u.videotext.y = params->u1.s.video_y;
tag->u.videotext.video_page = 0;
tag->u.videotext.video_mode = 0;
tag->u.videotext.video_cols = params->u1.s.video_num_cols;
tag->u.videotext.video_ega_bx = 0;
tag->u.videotext.video_lines = params->u1.s.video_num_rows;
tag->u.videotext.video_isvga = 1;
tag->u.videotext.video_points = 8;
}
#endif
#ifdef CONFIG_ARCH_ACORN #ifdef CONFIG_ARCH_ACORN
tag = tag_next(tag); tag = tag_next(tag);
tag->hdr.tag = ATAG_ACORN; tag->hdr.tag = ATAG_ACORN;
...@@ -114,14 +203,22 @@ static void __init build_tag_list(struct param_struct *params, void *taglist, in ...@@ -114,14 +203,22 @@ static void __init build_tag_list(struct param_struct *params, void *taglist, in
strcpy(tag->u.cmdline.cmdline, params->commandline); strcpy(tag->u.cmdline.cmdline, params->commandline);
tag = tag_next(tag); tag = tag_next(tag);
tag->hdr.tag = 0; tag->hdr.tag = ATAG_NONE;
tag->hdr.size = 0; tag->hdr.size = 0;
memmove(params, taglist, ((int)tag) - ((int)taglist) + memmove(params, taglist, ((int)tag) - ((int)taglist) +
sizeof(struct tag_header)); sizeof(struct tag_header));
} }
void __init convert_to_tag_list(struct param_struct *params, int mem_init) void __init convert_to_tag_list(struct tag *tags)
{
struct param_struct *params = (struct param_struct *)tags;
build_tag_list(params, &params->u2);
}
void __init squash_mem_tags(struct tag *tag)
{ {
build_tag_list(params, &params->u2, mem_init); for (; tag->hdr.size; tag = tag_next(tag))
if (tag->hdr.tag == ATAG_MEM)
tag->hdr.tag = ATAG_NONE;
} }
...@@ -799,8 +799,7 @@ __und_svc: sub sp, sp, #S_FRAME_SIZE ...@@ -799,8 +799,7 @@ __und_svc: sub sp, sp, #S_FRAME_SIZE
adrsvc al, r9, 1f @ r9 = normal FP return adrsvc al, r9, 1f @ r9 = normal FP return
bl call_fpe @ lr = undefined instr return bl call_fpe @ lr = undefined instr return
mov r0, r5 @ unsigned long pc mov r0, sp @ struct pt_regs *regs
mov r1, sp @ struct pt_regs *regs
bl do_undefinstr bl do_undefinstr
1: set_cpsr_c r0, #PSR_I_BIT | MODE_SVC 1: set_cpsr_c r0, #PSR_I_BIT | MODE_SVC
...@@ -926,8 +925,7 @@ call_fpe: get_thread_info r10 @ get current thread ...@@ -926,8 +925,7 @@ call_fpe: get_thread_info r10 @ get current thread
ldr pc, [r4] @ Call FP module USR entry point ldr pc, [r4] @ Call FP module USR entry point
fpundefinstr: set_cpsr_c r0, #MODE_SVC @ Enable interrupts fpundefinstr: set_cpsr_c r0, #MODE_SVC @ Enable interrupts
mov r0, lr mov r0, sp
mov r1, sp
adrsvc al, lr, ret_from_exception adrsvc al, lr, ret_from_exception
b do_undefinstr b do_undefinstr
......
...@@ -45,7 +45,7 @@ static inline struct pt_regs * ...@@ -45,7 +45,7 @@ static inline struct pt_regs *
get_user_regs(struct task_struct *task) get_user_regs(struct task_struct *task)
{ {
return (struct pt_regs *) return (struct pt_regs *)
((unsigned long)task + 8192 - sizeof(struct pt_regs)); ((unsigned long)task->thread_info + 8192 - sizeof(struct pt_regs));
} }
/* /*
......
...@@ -35,10 +35,6 @@ ...@@ -35,10 +35,6 @@
#define MEM_SIZE (16*1024*1024) #define MEM_SIZE (16*1024*1024)
#endif #endif
#ifndef CONFIG_CMDLINE
#define CONFIG_CMDLINE ""
#endif
#ifdef CONFIG_PREEMPT #ifdef CONFIG_PREEMPT
spinlock_t kernel_flag __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED; spinlock_t kernel_flag __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
#endif #endif
...@@ -57,7 +53,8 @@ __setup("fpe=", fpe_setup); ...@@ -57,7 +53,8 @@ __setup("fpe=", fpe_setup);
extern unsigned int mem_fclk_21285; extern unsigned int mem_fclk_21285;
extern void paging_init(struct meminfo *, struct machine_desc *desc); extern void paging_init(struct meminfo *, struct machine_desc *desc);
extern void convert_to_tag_list(struct param_struct *params, int mem_init); extern void convert_to_tag_list(struct tag *tags);
extern void squash_mem_tags(struct tag *tag);
extern void bootmem_init(struct meminfo *); extern void bootmem_init(struct meminfo *);
extern void reboot_setup(char *str); extern void reboot_setup(char *str);
extern int root_mountflags; extern int root_mountflags;
...@@ -517,6 +514,20 @@ static int __init parse_tag_initrd(const struct tag *tag) ...@@ -517,6 +514,20 @@ static int __init parse_tag_initrd(const struct tag *tag)
__tagtable(ATAG_INITRD, parse_tag_initrd); __tagtable(ATAG_INITRD, parse_tag_initrd);
static int __init parse_tag_initrd2(const struct tag *tag)
{
unsigned long start = 0;
if (tag->u.initrd.size) {
start = (unsigned long)phys_to_virt(tag->u.initrd.start);
setup_initrd(start, tag->u.initrd.size);
}
return 0;
}
__tagtable(ATAG_INITRD2, parse_tag_initrd2);
static int __init parse_tag_serialnr(const struct tag *tag) static int __init parse_tag_serialnr(const struct tag *tag)
{ {
system_serial_low = tag->u.serialnr.low; system_serial_low = tag->u.serialnr.low;
...@@ -575,14 +586,29 @@ static void __init parse_tags(const struct tag *t) ...@@ -575,14 +586,29 @@ static void __init parse_tags(const struct tag *t)
t->hdr.tag); t->hdr.tag);
} }
/*
* This holds our defaults.
*/
static struct init_tags {
struct tag_header hdr1;
struct tag_core core;
struct tag_header hdr2;
struct tag_mem32 mem;
struct tag_header hdr3;
} init_tags __initdata = {
{ tag_size(tag_core), ATAG_CORE },
{ 1, PAGE_SIZE, 0xff },
{ tag_size(tag_mem32), ATAG_MEM },
{ MEM_SIZE, PHYS_OFFSET },
{ 0, ATAG_NONE }
};
void __init setup_arch(char **cmdline_p) void __init setup_arch(char **cmdline_p)
{ {
struct tag *tags = NULL; struct tag *tags = (struct tag *)&init_tags;
struct machine_desc *mdesc; struct machine_desc *mdesc;
char *from = default_command_line; char *from = default_command_line;
ROOT_DEV = mk_kdev(0, 255);
setup_processor(); setup_processor();
mdesc = setup_machine(machine_arch_type); mdesc = setup_machine(machine_arch_type);
machine_name = mdesc->name; machine_name = mdesc->name;
...@@ -593,29 +619,22 @@ void __init setup_arch(char **cmdline_p) ...@@ -593,29 +619,22 @@ void __init setup_arch(char **cmdline_p)
if (mdesc->param_offset) if (mdesc->param_offset)
tags = phys_to_virt(mdesc->param_offset); tags = phys_to_virt(mdesc->param_offset);
/*
* Do the machine-specific fixups before we parse the
* parameters or tags.
*/
if (mdesc->fixup)
mdesc->fixup(mdesc, (struct param_struct *)tags,
&from, &meminfo);
/* /*
* If we have the old style parameters, convert them to * If we have the old style parameters, convert them to
* a tag list before. * a tag list.
*/ */
if (tags && tags->hdr.tag != ATAG_CORE) if (tags->hdr.tag != ATAG_CORE)
convert_to_tag_list((struct param_struct *)tags, convert_to_tag_list(tags);
meminfo.nr_banks == 0); if (tags->hdr.tag != ATAG_CORE)
tags = (struct tag *)&init_tags;
if (tags && tags->hdr.tag == ATAG_CORE) if (mdesc->fixup)
parse_tags(tags); mdesc->fixup(mdesc, tags, &from, &meminfo);
if (meminfo.nr_banks == 0) { if (tags->hdr.tag == ATAG_CORE) {
meminfo.nr_banks = 1; if (meminfo.nr_banks != 0)
meminfo.bank[0].start = PHYS_OFFSET; squash_mem_tags(tags);
meminfo.bank[0].size = MEM_SIZE; parse_tags(tags);
} }
init_mm.start_code = (unsigned long) &_text; init_mm.start_code = (unsigned long) &_text;
......
...@@ -238,7 +238,9 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr, ...@@ -238,7 +238,9 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr,
*/ */
asmlinkage int sys_fork(struct pt_regs *regs) asmlinkage int sys_fork(struct pt_regs *regs)
{ {
return do_fork(SIGCHLD, regs->ARM_sp, regs, 0); struct task_struct *p;
p = do_fork(SIGCHLD, regs->ARM_sp, regs, 0);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
/* Clone a task - this clones the calling program thread. /* Clone a task - this clones the calling program thread.
...@@ -246,14 +248,18 @@ asmlinkage int sys_fork(struct pt_regs *regs) ...@@ -246,14 +248,18 @@ asmlinkage int sys_fork(struct pt_regs *regs)
*/ */
asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, struct pt_regs *regs) asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, struct pt_regs *regs)
{ {
struct task_struct *p;
if (!newsp) if (!newsp)
newsp = regs->ARM_sp; newsp = regs->ARM_sp;
return do_fork(clone_flags, newsp, regs, 0); p = do_fork(clone_flags & ~CLONE_IDLETASK, newsp, regs, 0);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
asmlinkage int sys_vfork(struct pt_regs *regs) asmlinkage int sys_vfork(struct pt_regs *regs)
{ {
return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->ARM_sp, regs, 0); struct task_struct *p;
p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->ARM_sp, regs, 0);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
/* sys_execve() executes a new program. /* sys_execve() executes a new program.
......
...@@ -116,7 +116,7 @@ static void dump_instr(struct pt_regs *regs) ...@@ -116,7 +116,7 @@ static void dump_instr(struct pt_regs *regs)
static void dump_stack(struct task_struct *tsk, unsigned long sp) static void dump_stack(struct task_struct *tsk, unsigned long sp)
{ {
dump_mem("Stack: ", sp - 16, 8192+(unsigned long)tsk->thread_info); dump_mem("Stack: ", sp, 8192+(unsigned long)tsk->thread_info);
} }
static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk) static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
...@@ -132,7 +132,7 @@ static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk) ...@@ -132,7 +132,7 @@ static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
} else if (verify_stack(fp)) { } else if (verify_stack(fp)) {
printk("invalid frame pointer 0x%08x", fp); printk("invalid frame pointer 0x%08x", fp);
ok = 0; ok = 0;
} else if (fp < 4096+(unsigned long)tsk->thread_info) } else if (fp < (unsigned long)(tsk->thread_info + 1))
printk("frame pointer underflow"); printk("frame pointer underflow");
printk("\n"); printk("\n");
...@@ -167,8 +167,8 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err) ...@@ -167,8 +167,8 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
printk("Internal error: %s: %x\n", str, err); printk("Internal error: %s: %x\n", str, err);
printk("CPU: %d\n", smp_processor_id()); printk("CPU: %d\n", smp_processor_id());
show_regs(regs); show_regs(regs);
printk("Process %s (pid: %d, stackpage=%08lx)\n", printk("Process %s (pid: %d, stack limit = 0x%p)\n",
current->comm, current->pid, 4096+(unsigned long)tsk); current->comm, current->pid, tsk->thread_info + 1);
if (!user_mode(regs) || in_interrupt()) { if (!user_mode(regs) || in_interrupt()) {
mm_segment_t fs; mm_segment_t fs;
...@@ -201,7 +201,7 @@ void die_if_kernel(const char *str, struct pt_regs *regs, int err) ...@@ -201,7 +201,7 @@ void die_if_kernel(const char *str, struct pt_regs *regs, int err)
die(str, regs, err); die(str, regs, err);
} }
asmlinkage void do_undefinstr(int address, struct pt_regs *regs, int mode) asmlinkage void do_undefinstr(struct pt_regs *regs)
{ {
unsigned long *pc; unsigned long *pc;
siginfo_t info; siginfo_t info;
...@@ -229,7 +229,7 @@ asmlinkage void do_undefinstr(int address, struct pt_regs *regs, int mode) ...@@ -229,7 +229,7 @@ asmlinkage void do_undefinstr(int address, struct pt_regs *regs, int mode)
force_sig_info(SIGILL, &info, current); force_sig_info(SIGILL, &info, current);
die_if_kernel("Oops - undefined instruction", regs, mode); die_if_kernel("Oops - undefined instruction", regs, 0);
} }
#ifdef CONFIG_CPU_26 #ifdef CONFIG_CPU_26
......
...@@ -137,19 +137,19 @@ FN_ENTRY ...@@ -137,19 +137,19 @@ FN_ENTRY
4: ands len, len, #3 4: ands len, len, #3
beq .done beq .done
load1l r5 load1l r4
tst len, #2 tst len, #2
mov r4, r5, lsr #byte(0) mov r5, r4, lsr #byte(0)
beq .exit beq .exit
adcs sum, sum, r5, push #16 adcs sum, sum, r4, push #16
strb r4, [dst], #1 strb r5, [dst], #1
mov r4, r5, lsr #byte(1) mov r5, r4, lsr #byte(1)
strb r4, [dst], #1 strb r5, [dst], #1
mov r4, r5, lsr #byte(2) mov r5, r4, lsr #byte(2)
.exit: tst len, #1 .exit: tst len, #1
strneb r4, [dst], #1 strneb r5, [dst], #1
andne r4, r4, #255 andne r5, r5, #255
adcnes sum, sum, r4, lsl #byte(0) adcnes sum, sum, r5, lsl #byte(0)
/* /*
* If the dst pointer was not 16-bit aligned, we * If the dst pointer was not 16-bit aligned, we
...@@ -210,17 +210,17 @@ FN_ENTRY ...@@ -210,17 +210,17 @@ FN_ENTRY
orr r4, r4, r5, push #24 orr r4, r4, r5, push #24
str r4, [dst], #4 str r4, [dst], #4
adcs sum, sum, r4 adcs sum, sum, r4
mov r4, r5, pull #8
4: ands len, len, #3 4: ands len, len, #3
beq .done beq .done
mov r4, r5, lsr #byte(1) mov r5, r4, lsr #byte(0)
tst len, #2 tst len, #2
beq .exit beq .exit
bic r5, r5, #0xff << byte(0) adcs sum, sum, r4, push #16
adcs sum, sum, r5, push #8 strb r5, [dst], #1
strb r4, [dst], #1 mov r5, r4, lsr #byte(1)
mov r4, r5, lsr #byte(2) strb r5, [dst], #1
strb r4, [dst], #1 mov r5, r4, lsr #byte(2)
mov r4, r5, lsr #byte(3)
b .exit b .exit
.src2_aligned: mov r4, r5, pull #16 .src2_aligned: mov r4, r5, pull #16
...@@ -262,18 +262,19 @@ FN_ENTRY ...@@ -262,18 +262,19 @@ FN_ENTRY
orr r4, r4, r5, push #16 orr r4, r4, r5, push #16
str r4, [dst], #4 str r4, [dst], #4
adcs sum, sum, r4 adcs sum, sum, r4
mov r4, r5, pull #16
4: ands len, len, #3 4: ands len, len, #3
beq .done beq .done
mov r4, r5, lsr #byte(2) mov r5, r4, lsr #byte(0)
tst len, #2 tst len, #2
beq .exit beq .exit
adcs sum, sum, r5, pull #16 adcs sum, sum, r4
strb r4, [dst], #1 strb r5, [dst], #1
mov r4, r5, lsr #byte(3) mov r5, r4, lsr #byte(1)
strb r4, [dst], #1 strb r5, [dst], #1
tst len, #1 tst len, #1
beq .done beq .done
load1b r4 load1b r5
b .exit b .exit
.src3_aligned: mov r4, r5, pull #24 .src3_aligned: mov r4, r5, pull #24
...@@ -315,16 +316,17 @@ FN_ENTRY ...@@ -315,16 +316,17 @@ FN_ENTRY
orr r4, r4, r5, push #8 orr r4, r4, r5, push #8
str r4, [dst], #4 str r4, [dst], #4
adcs sum, sum, r4 adcs sum, sum, r4
mov r4, r5, pull #24
4: ands len, len, #3 4: ands len, len, #3
beq .done beq .done
mov r4, r5, lsr #byte(3) mov r5, r4, lsr #byte(0)
tst len, #2 tst len, #2
beq .exit beq .exit
adcs sum, sum, r5, pull #24 strb r5, [dst], #1
strb r4, [dst], #1 adcs sum, sum, r4
load1l r5 load1l r4
mov r4, r5, lsr #byte(0) mov r5, r4, lsr #byte(0)
strb r4, [dst], #1 strb r5, [dst], #1
adcs sum, sum, r4, push #24 adcs sum, sum, r4, push #24
mov r4, r5, lsr #byte(1) mov r5, r4, lsr #byte(1)
b .exit b .exit
...@@ -22,7 +22,7 @@ extern void adifcc_map_io(void); ...@@ -22,7 +22,7 @@ extern void adifcc_map_io(void);
extern void adifcc_init_irq(void); extern void adifcc_init_irq(void);
static void __init static void __init
fixup_adifcc(struct machine_desc *desc, struct param_struct *params, fixup_adifcc(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
#ifdef CONFIG_ARCH_ADI_EVB #ifdef CONFIG_ARCH_ADI_EVB
......
...@@ -27,7 +27,7 @@ extern void anakin_map_io(void); ...@@ -27,7 +27,7 @@ extern void anakin_map_io(void);
extern void genarch_init_irq(void); extern void genarch_init_irq(void);
static void __init static void __init
fixup_anakin(struct machine_desc *desc, struct param_struct *unused, fixup_anakin(struct machine_desc *desc, struct tag *tag,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
ROOT_DEV = mk_kdev(RAMDISK_MAJOR, 0); ROOT_DEV = mk_kdev(RAMDISK_MAJOR, 0);
......
...@@ -45,7 +45,7 @@ static struct map_desc cdb89712_io_desc[] __initdata = { ...@@ -45,7 +45,7 @@ static struct map_desc cdb89712_io_desc[] __initdata = {
}; };
static void __init static void __init
fixup_cdb89712(struct machine_desc *desc, struct param_struct *params, fixup_cdb89712(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
} }
......
...@@ -27,7 +27,7 @@ extern void clps711x_init_irq(void); ...@@ -27,7 +27,7 @@ extern void clps711x_init_irq(void);
extern void clps711x_map_io(void); extern void clps711x_map_io(void);
static void __init static void __init
fixup_clep7312(struct machine_desc *desc, struct param_struct *params, fixup_clep7312(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
mi->nr_banks=1; mi->nr_banks=1;
......
...@@ -29,7 +29,7 @@ extern void clps711x_init_irq(void); ...@@ -29,7 +29,7 @@ extern void clps711x_init_irq(void);
extern void edb7211_map_io(void); extern void edb7211_map_io(void);
static void __init static void __init
fixup_edb7211(struct machine_desc *desc, struct param_struct *params, fixup_edb7211(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
/* /*
......
...@@ -53,7 +53,7 @@ typedef struct tag_IMAGE_PARAMS ...@@ -53,7 +53,7 @@ typedef struct tag_IMAGE_PARAMS
#define IMAGE_PARAMS_PHYS 0xC01F0000 #define IMAGE_PARAMS_PHYS 0xC01F0000
static void __init static void __init
fortunet_fixup(struct machine_desc *desc, struct param_struct *params, fortunet_fixup(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
IMAGE_PARAMS *ip; IMAGE_PARAMS *ip;
......
...@@ -49,11 +49,9 @@ static struct map_desc p720t_io_desc[] __initdata = { ...@@ -49,11 +49,9 @@ static struct map_desc p720t_io_desc[] __initdata = {
}; };
static void __init static void __init
fixup_p720t(struct machine_desc *desc, struct param_struct *params, fixup_p720t(struct machine_desc *desc, struct tag *tag,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
struct tag *tag = (struct tag *)params;
/* /*
* Our bootloader doesn't setup any tags (yet). * Our bootloader doesn't setup any tags (yet).
*/ */
......
...@@ -35,7 +35,7 @@ extern void epxa10db_init_irq(void); ...@@ -35,7 +35,7 @@ extern void epxa10db_init_irq(void);
static void __init static void __init
epxa10db_fixup(struct machine_desc *desc, struct param_struct *params, epxa10db_fixup(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
......
...@@ -36,25 +36,11 @@ static int __init parse_tag_memclk(const struct tag *tag) ...@@ -36,25 +36,11 @@ static int __init parse_tag_memclk(const struct tag *tag)
__tagtable(ATAG_MEMCLK, parse_tag_memclk); __tagtable(ATAG_MEMCLK, parse_tag_memclk);
#ifdef CONFIG_ARCH_EBSA285 #ifdef CONFIG_ARCH_EBSA285
static void __init
fixup_ebsa285(struct machine_desc *desc, struct param_struct *params,
char **cmdline, struct meminfo *mi)
{
#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE)
ORIG_X = params->u1.s.video_x;
ORIG_Y = params->u1.s.video_y;
ORIG_VIDEO_COLS = params->u1.s.video_num_cols;
ORIG_VIDEO_LINES = params->u1.s.video_num_rows;
#endif
}
MACHINE_START(EBSA285, "EBSA285") MACHINE_START(EBSA285, "EBSA285")
MAINTAINER("Russell King") MAINTAINER("Russell King")
BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000) BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000)
BOOT_PARAMS(0x00000100) BOOT_PARAMS(0x00000100)
VIDEO(0x000a0000, 0x000bffff) VIDEO(0x000a0000, 0x000bffff)
FIXUP(fixup_ebsa285)
MAPIO(footbridge_map_io) MAPIO(footbridge_map_io)
INITIRQ(footbridge_init_irq) INITIRQ(footbridge_init_irq)
MACHINE_END MACHINE_END
...@@ -67,7 +53,7 @@ MACHINE_END ...@@ -67,7 +53,7 @@ MACHINE_END
* the parameter page. * the parameter page.
*/ */
static void __init static void __init
fixup_netwinder(struct machine_desc *desc, struct param_struct *params, fixup_netwinder(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
#ifdef CONFIG_ISAPNP #ifdef CONFIG_ISAPNP
...@@ -80,21 +66,6 @@ fixup_netwinder(struct machine_desc *desc, struct param_struct *params, ...@@ -80,21 +66,6 @@ fixup_netwinder(struct machine_desc *desc, struct param_struct *params,
*/ */
isapnp_disable = 1; isapnp_disable = 1;
#endif #endif
if (params->u1.s.nr_pages != 0x02000 &&
params->u1.s.nr_pages != 0x04000 &&
params->u1.s.nr_pages != 0x08000 &&
params->u1.s.nr_pages != 0x10000) {
printk(KERN_WARNING "Warning: bad NeTTrom parameters "
"detected, using defaults\n");
params->u1.s.nr_pages = 0x1000; /* 16MB */
params->u1.s.ramdisk_size = 0;
params->u1.s.flags = FLAG_READONLY;
params->u1.s.initrd_start = 0;
params->u1.s.initrd_size = 0;
params->u1.s.rd_start = 0;
}
} }
MACHINE_START(NETWINDER, "Rebel-NetWinder") MACHINE_START(NETWINDER, "Rebel-NetWinder")
...@@ -116,7 +87,7 @@ MACHINE_END ...@@ -116,7 +87,7 @@ MACHINE_END
* hard reboots fail on early boards. * hard reboots fail on early boards.
*/ */
static void __init static void __init
fixup_cats(struct machine_desc *desc, struct param_struct *unused, fixup_cats(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
ORIG_VIDEO_LINES = 25; ORIG_VIDEO_LINES = 25;
...@@ -138,7 +109,7 @@ MACHINE_END ...@@ -138,7 +109,7 @@ MACHINE_END
#ifdef CONFIG_ARCH_CO285 #ifdef CONFIG_ARCH_CO285
static void __init static void __init
fixup_coebsa285(struct machine_desc *desc, struct param_struct *unused, fixup_coebsa285(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
extern unsigned long boot_memory_end; extern unsigned long boot_memory_end;
......
...@@ -51,7 +51,7 @@ static struct kmi_info integrator_mouse __initdata = { ...@@ -51,7 +51,7 @@ static struct kmi_info integrator_mouse __initdata = {
#endif #endif
static void __init static void __init
integrator_fixup(struct machine_desc *desc, struct param_struct *unused, integrator_fixup(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
#ifdef CONFIG_KMI_KEYB #ifdef CONFIG_KMI_KEYB
......
...@@ -33,10 +33,10 @@ ...@@ -33,10 +33,10 @@
/* /*
* Logical Physical * Logical Physical
* e8000000 40000000 PCI memory * e8000000 40000000 PCI memory PHYS_PCI_MEM_BASE (max 512M)
* ec000000 62000000 PCI config space * ec000000 61000000 PCI config space PHYS_PCI_CONFIG_BASE (max 16M)
* ed000000 61000000 PCI V3 regs * ed000000 62000000 PCI V3 regs PHYS_PCI_V3_BASE (max 64k)
* ee000000 60000000 PCI IO * ee000000 60000000 PCI IO PHYS_PCI_IO_BASE (max 16M)
* ef000000 Cache flush * ef000000 Cache flush
* f1000000 10000000 Core module registers * f1000000 10000000 Core module registers
* f1100000 11000000 System controller registers * f1100000 11000000 System controller registers
...@@ -67,7 +67,7 @@ static struct map_desc integrator_io_desc[] __initdata = { ...@@ -67,7 +67,7 @@ static struct map_desc integrator_io_desc[] __initdata = {
{ IO_ADDRESS(INTEGRATOR_GPIO_BASE), INTEGRATOR_GPIO_BASE, SZ_4K , DOMAIN_IO, 0, 1}, { IO_ADDRESS(INTEGRATOR_GPIO_BASE), INTEGRATOR_GPIO_BASE, SZ_4K , DOMAIN_IO, 0, 1},
{ PCI_MEMORY_VADDR, PHYS_PCI_MEM_BASE, SZ_16M , DOMAIN_IO, 0, 1}, { PCI_MEMORY_VADDR, PHYS_PCI_MEM_BASE, SZ_16M , DOMAIN_IO, 0, 1},
{ PCI_CONFIG_VADDR, PHYS_PCI_CONFIG_BASE, SZ_16M , DOMAIN_IO, 0, 1}, { PCI_CONFIG_VADDR, PHYS_PCI_CONFIG_BASE, SZ_16M , DOMAIN_IO, 0, 1},
{ PCI_V3_VADDR, PHYS_PCI_V3_BASE, SZ_512K , DOMAIN_IO, 0, 1}, { PCI_V3_VADDR, PHYS_PCI_V3_BASE, SZ_64K , DOMAIN_IO, 0, 1},
{ PCI_IO_VADDR, PHYS_PCI_IO_BASE, SZ_64K , DOMAIN_IO, 0, 1}, { PCI_IO_VADDR, PHYS_PCI_IO_BASE, SZ_64K , DOMAIN_IO, 0, 1},
LAST_DESC LAST_DESC
}; };
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
* 40000000 - 4FFFFFFF PCI memory. 256M non-prefetchable * 40000000 - 4FFFFFFF PCI memory. 256M non-prefetchable
* 50000000 - 5FFFFFFF PCI memory. 256M prefetchable * 50000000 - 5FFFFFFF PCI memory. 256M prefetchable
* 60000000 - 60FFFFFF PCI IO. 16M * 60000000 - 60FFFFFF PCI IO. 16M
* 68000000 - 68FFFFFF PCI Configuration. 16M * 61000000 - 61FFFFFF PCI Configuration. 16M
* *
* There are three V3 windows, each described by a pair of V3 registers. * There are three V3 windows, each described by a pair of V3 registers.
* These are LB_BASE0/LB_MAP0, LB_BASE1/LB_MAP1 and LB_BASE2/LB_MAP2. * These are LB_BASE0/LB_MAP0, LB_BASE1/LB_MAP1 and LB_BASE2/LB_MAP2.
...@@ -58,14 +58,6 @@ ...@@ -58,14 +58,6 @@
* can be used either for PCI I/O or for I20 accesses. By default, uHAL * can be used either for PCI I/O or for I20 accesses. By default, uHAL
* uses this only for PCI IO space. * uses this only for PCI IO space.
* *
* PCI Memory is mapped so that assigned addresses in PCI Memory match
* local bus memory addresses. In other words, if a PCI device is assigned
* address 80200000 then that address is a valid local bus address as well
* as a valid PCI Memory address. PCI IO addresses are mapped to start
* at zero. This means that local bus address 60000000 maps to PCI IO address
* 00000000 and so on. Device driver writers need to be aware of this
* distinction.
*
* Normally these spaces are mapped using the following base registers: * Normally these spaces are mapped using the following base registers:
* *
* Usage Local Bus Memory Base/Map registers used * Usage Local Bus Memory Base/Map registers used
...@@ -73,7 +65,7 @@ ...@@ -73,7 +65,7 @@
* Mem 40000000 - 4FFFFFFF LB_BASE0/LB_MAP0 * Mem 40000000 - 4FFFFFFF LB_BASE0/LB_MAP0
* Mem 50000000 - 5FFFFFFF LB_BASE1/LB_MAP1 * Mem 50000000 - 5FFFFFFF LB_BASE1/LB_MAP1
* IO 60000000 - 60FFFFFF LB_BASE2/LB_MAP2 * IO 60000000 - 60FFFFFF LB_BASE2/LB_MAP2
* Cfg 68000000 - 68FFFFFF * Cfg 61000000 - 61FFFFFF
* *
* This means that I20 and PCI configuration space accesses will fail. * This means that I20 and PCI configuration space accesses will fail.
* When PCI configuration accesses are needed (via the uHAL PCI * When PCI configuration accesses are needed (via the uHAL PCI
...@@ -84,7 +76,7 @@ ...@@ -84,7 +76,7 @@
* Mem 40000000 - 4FFFFFFF LB_BASE0/LB_MAP0 * Mem 40000000 - 4FFFFFFF LB_BASE0/LB_MAP0
* Mem 50000000 - 5FFFFFFF LB_BASE0/LB_MAP0 * Mem 50000000 - 5FFFFFFF LB_BASE0/LB_MAP0
* IO 60000000 - 60FFFFFF LB_BASE2/LB_MAP2 * IO 60000000 - 60FFFFFF LB_BASE2/LB_MAP2
* Cfg 68000000 - 68FFFFFF LB_BASE1/LB_MAP1 * Cfg 61000000 - 61FFFFFF LB_BASE1/LB_MAP1
* *
* To make this work, the code depends on overlapping windows working. * To make this work, the code depends on overlapping windows working.
* The V3 chip translates an address by checking its range within * The V3 chip translates an address by checking its range within
...@@ -174,10 +166,10 @@ ...@@ -174,10 +166,10 @@
static spinlock_t v3_lock = SPIN_LOCK_UNLOCKED; static spinlock_t v3_lock = SPIN_LOCK_UNLOCKED;
#define PCI_BUS_NONMEM_START 0x00000000 #define PCI_BUS_NONMEM_START 0x00000000
#define PCI_BUS_NONMEM_SIZE 0x10000000 #define PCI_BUS_NONMEM_SIZE SZ_256M
#define PCI_BUS_PREMEM_START 0x10000000 #define PCI_BUS_PREMEM_START PCI_BUS_NONMEM_START + PCI_BUS_NONMEM_SIZE
#define PCI_BUS_PREMEM_SIZE 0x10000000 #define PCI_BUS_PREMEM_SIZE SZ_256M
#if PCI_BUS_NONMEM_START & 0x000fffff #if PCI_BUS_NONMEM_START & 0x000fffff
#error PCI_BUS_NONMEM_START must be megabyte aligned #error PCI_BUS_NONMEM_START must be megabyte aligned
...@@ -400,15 +392,15 @@ static struct pci_ops pci_v3_ops = { ...@@ -400,15 +392,15 @@ static struct pci_ops pci_v3_ops = {
static struct resource non_mem = { static struct resource non_mem = {
name: "PCI non-prefetchable", name: "PCI non-prefetchable",
start: 0x40000000 + PCI_BUS_NONMEM_START, start: PHYS_PCI_MEM_BASE + PCI_BUS_NONMEM_START,
end: 0x40000000 + PCI_BUS_NONMEM_START + PCI_BUS_NONMEM_SIZE - 1, end: PHYS_PCI_MEM_BASE + PCI_BUS_NONMEM_START + PCI_BUS_NONMEM_SIZE - 1,
flags: IORESOURCE_MEM, flags: IORESOURCE_MEM,
}; };
static struct resource pre_mem = { static struct resource pre_mem = {
name: "PCI prefetchable", name: "PCI prefetchable",
start: 0x40000000 + PCI_BUS_PREMEM_START, start: PHYS_PCI_MEM_BASE + PCI_BUS_PREMEM_START,
end: 0x40000000 + PCI_BUS_PREMEM_START + PCI_BUS_PREMEM_SIZE - 1, end: PHYS_PCI_MEM_BASE + PCI_BUS_PREMEM_START + PCI_BUS_PREMEM_SIZE - 1,
flags: IORESOURCE_MEM | IORESOURCE_PREFETCH, flags: IORESOURCE_MEM | IORESOURCE_PREFETCH,
}; };
...@@ -433,7 +425,7 @@ static int __init pci_v3_setup_resources(struct resource **resource) ...@@ -433,7 +425,7 @@ static int __init pci_v3_setup_resources(struct resource **resource)
*/ */
resource[0] = &ioport_resource; resource[0] = &ioport_resource;
resource[1] = &non_mem; resource[1] = &non_mem;
resource[2] = &pre_mem; // resource[2] = &pre_mem;
return 1; return 1;
} }
...@@ -530,7 +522,7 @@ int __init pci_v3_setup(int nr, struct pci_sys_data *sys) ...@@ -530,7 +522,7 @@ int __init pci_v3_setup(int nr, struct pci_sys_data *sys)
int ret = 0; int ret = 0;
if (nr == 0) { if (nr == 0) {
sys->mem_offset = 0x40000000; sys->mem_offset = PHYS_PCI_MEM_BASE;
ret = pci_v3_setup_resources(sys->resource); ret = pci_v3_setup_resources(sys->resource);
} }
......
...@@ -26,7 +26,7 @@ extern void iq80310_map_io(void); ...@@ -26,7 +26,7 @@ extern void iq80310_map_io(void);
extern void iq80310_init_irq(void); extern void iq80310_init_irq(void);
static void __init static void __init
fixup_iq80310(struct machine_desc *desc, struct param_struct *params, fixup_iq80310(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
system_rev = (*(volatile unsigned int*)0xfe830000) & 0x0f; system_rev = (*(volatile unsigned int*)0xfe830000) & 0x0f;
......
...@@ -83,7 +83,7 @@ static void __init l7200_map_io(void) ...@@ -83,7 +83,7 @@ static void __init l7200_map_io(void)
} }
static void __init static void __init
fixup_l7200(struct machine_desc *desc, struct param_struct *unused, fixup_l7200(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
mi->nr_banks = 1; mi->nr_banks = 1;
......
...@@ -69,7 +69,7 @@ static void __init idp_init_irq(void) ...@@ -69,7 +69,7 @@ static void __init idp_init_irq(void)
} }
static void __init static void __init
fixup_idp(struct machine_desc *desc, struct param_struct *params, fixup_idp(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
#ifdef PXA_IDP_REV02 #ifdef PXA_IDP_REV02
......
...@@ -120,7 +120,7 @@ static int __init lubbock_init(void) ...@@ -120,7 +120,7 @@ static int __init lubbock_init(void)
__initcall(lubbock_init); __initcall(lubbock_init);
static void __init static void __init
fixup_lubbock(struct machine_desc *desc, struct param_struct *params, fixup_lubbock(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
SET_BANK (0, 0xa0000000, 64*1024*1024); SET_BANK (0, 0xa0000000, 64*1024*1024);
......
...@@ -61,7 +61,7 @@ __tagtable(ATAG_ACORN, parse_tag_acorn); ...@@ -61,7 +61,7 @@ __tagtable(ATAG_ACORN, parse_tag_acorn);
#endif #endif
static void __init static void __init
fixup_riscpc(struct machine_desc *desc, struct param_struct *unusd, fixup_riscpc(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
/* /*
......
...@@ -82,7 +82,7 @@ static void __init adsbitsy_init_irq(void) ...@@ -82,7 +82,7 @@ static void __init adsbitsy_init_irq(void)
*/ */
static void __init static void __init
fixup_adsbitsy(struct machine_desc *desc, struct param_struct *params, fixup_adsbitsy(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
SET_BANK( 0, 0xc0000000, 32*1024*1024 ); SET_BANK( 0, 0xc0000000, 32*1024*1024 );
......
...@@ -103,7 +103,6 @@ static int __init assabet_init(void) ...@@ -103,7 +103,6 @@ static int __init assabet_init(void)
* or BCR_clear(). * or BCR_clear().
*/ */
ASSABET_BCR = BCR_value = ASSABET_BCR_DB1111; ASSABET_BCR = BCR_value = ASSABET_BCR_DB1111;
NCR_0 = 0;
#ifndef CONFIG_ASSABET_NEPONSET #ifndef CONFIG_ASSABET_NEPONSET
printk( "Warning: Neponset detected but full support " printk( "Warning: Neponset detected but full support "
...@@ -159,13 +158,11 @@ static void __init get_assabet_scr(void) ...@@ -159,13 +158,11 @@ static void __init get_assabet_scr(void)
SCR_value = scr; SCR_value = scr;
} }
extern void convert_to_tag_list(struct param_struct *params, int mem_init);
static void __init static void __init
fixup_assabet(struct machine_desc *desc, struct param_struct *params, fixup_assabet(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
struct tag *t = (struct tag *)params; struct tag *t = tags;
/* This must be done before any call to machine_has_neponset() */ /* This must be done before any call to machine_has_neponset() */
map_sa1100_gpio_regs(); map_sa1100_gpio_regs();
...@@ -174,12 +171,6 @@ fixup_assabet(struct machine_desc *desc, struct param_struct *params, ...@@ -174,12 +171,6 @@ fixup_assabet(struct machine_desc *desc, struct param_struct *params,
if (machine_has_neponset()) if (machine_has_neponset())
printk("Neponset expansion board detected\n"); printk("Neponset expansion board detected\n");
/*
* Apparantly bootldr uses a param_struct. Groan.
*/
if (t->hdr.tag != ATAG_CORE)
convert_to_tag_list(params, 1);
if (t->hdr.tag != ATAG_CORE) { if (t->hdr.tag != ATAG_CORE) {
t->hdr.tag = ATAG_CORE; t->hdr.tag = ATAG_CORE;
t->hdr.size = tag_size(tag_core); t->hdr.size = tag_size(tag_core);
...@@ -319,17 +310,16 @@ static void __init assabet_map_io(void) ...@@ -319,17 +310,16 @@ static void __init assabet_map_io(void)
sa1100_map_io(); sa1100_map_io();
iotable_init(assabet_io_desc); iotable_init(assabet_io_desc);
if (machine_has_neponset()) {
#ifdef CONFIG_ASSABET_NEPONSET #ifdef CONFIG_ASSABET_NEPONSET
/* /*
* We map Neponset registers even if it isn't present since * We map Neponset registers even if it isn't present since
* many drivers will try to probe their stuff (and fail). * many drivers will try to probe their stuff (and fail).
* This is still more friendly than a kernel paging request * This is still more friendly than a kernel paging request
* crash. * crash.
*/ */
neponset_map_io(); neponset_map_io();
#endif #endif
if (machine_has_neponset()) {
/* /*
* When Neponset is attached, the first UART should be * When Neponset is attached, the first UART should be
* UART3. That's what Angel is doing and many documents * UART3. That's what Angel is doing and many documents
......
...@@ -143,13 +143,6 @@ void badge4_set_5V(unsigned subsystem, int on) ...@@ -143,13 +143,6 @@ void badge4_set_5V(unsigned subsystem, int on)
EXPORT_SYMBOL(badge4_set_5V); EXPORT_SYMBOL(badge4_set_5V);
static void __init
fixup_badge4(struct machine_desc *desc, struct param_struct *params,
char **cmdline, struct meminfo *mi)
{
/* nothing needed here */
}
static struct map_desc badge4_io_desc[] __initdata = { static struct map_desc badge4_io_desc[] __initdata = {
/* virtual physical length domain r w c b */ /* virtual physical length domain r w c b */
{0xf1000000, 0x08000000, 0x00100000, DOMAIN_IO, 0,1,0,0},/* SRAM bank 1 */ {0xf1000000, 0x08000000, 0x00100000, DOMAIN_IO, 0,1,0,0},/* SRAM bank 1 */
...@@ -170,7 +163,6 @@ static void __init badge4_map_io(void) ...@@ -170,7 +163,6 @@ static void __init badge4_map_io(void)
MACHINE_START(BADGE4, "Hewlett-Packard Laboratories BadgePAD 4") MACHINE_START(BADGE4, "Hewlett-Packard Laboratories BadgePAD 4")
BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
BOOT_PARAMS(0xc0000100) BOOT_PARAMS(0xc0000100)
FIXUP(fixup_badge4)
MAPIO(badge4_map_io) MAPIO(badge4_map_io)
INITIRQ(sa1100_init_irq) INITIRQ(sa1100_init_irq)
MACHINE_END MACHINE_END
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
static void __init static void __init
fixup_brutus(struct machine_desc *desc, struct param_struct *params, fixup_brutus(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
SET_BANK( 0, 0xc0000000, 4*1024*1024 ); SET_BANK( 0, 0xc0000000, 4*1024*1024 );
......
...@@ -36,7 +36,7 @@ static void __init cerf_init_irq(void) ...@@ -36,7 +36,7 @@ static void __init cerf_init_irq(void)
} }
static void __init static void __init
fixup_cerf(struct machine_desc *desc, struct param_struct *params, fixup_cerf(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
#if defined(CONFIG_SA1100_CERF_64MB) #if defined(CONFIG_SA1100_CERF_64MB)
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
static void __init static void __init
fixup_empeg(struct machine_desc *desc, struct param_struct *params, fixup_empeg(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
SET_BANK( 0, 0xc0000000, 4*1024*1024 ); SET_BANK( 0, 0xc0000000, 4*1024*1024 );
......
...@@ -152,13 +152,9 @@ __initcall(flexanet_init); ...@@ -152,13 +152,9 @@ __initcall(flexanet_init);
static void __init static void __init
fixup_flexanet(struct machine_desc *desc, struct param_struct *params, fixup_flexanet(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
int status;
unsigned long now;
/* fixed RAM size, by now (64MB) */ /* fixed RAM size, by now (64MB) */
SET_BANK( 0, 0xc0000000, 64*1024*1024 ); SET_BANK( 0, 0xc0000000, 64*1024*1024 );
mi->nr_banks = 1; mi->nr_banks = 1;
......
...@@ -52,7 +52,7 @@ static int __init freebird_init(void) ...@@ -52,7 +52,7 @@ static int __init freebird_init(void)
__initcall(freebird_init); __initcall(freebird_init);
static void __init static void __init
fixup_freebird(struct machine_desc *desc, struct param_struct *params, fixup_freebird(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
#ifdef CONFIG_SA1100_FREEBIRD_OLD #ifdef CONFIG_SA1100_FREEBIRD_OLD
......
...@@ -125,7 +125,7 @@ static void __init graphicsclient_init_irq(void) ...@@ -125,7 +125,7 @@ static void __init graphicsclient_init_irq(void)
*/ */
static void __init static void __init
fixup_graphicsclient(struct machine_desc *desc, struct param_struct *params, fixup_graphicsclient(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
SET_BANK( 0, 0xc0000000, 16*1024*1024 ); SET_BANK( 0, 0xc0000000, 16*1024*1024 );
......
...@@ -157,7 +157,7 @@ static void __init graphicsmaster_init_irq(void) ...@@ -157,7 +157,7 @@ static void __init graphicsmaster_init_irq(void)
*/ */
static void __init static void __init
fixup_graphicsmaster(struct machine_desc *desc, struct param_struct *params, fixup_graphicsmaster(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
SET_BANK( 0, 0xc0000000, 16*1024*1024 ); SET_BANK( 0, 0xc0000000, 16*1024*1024 );
......
...@@ -55,7 +55,7 @@ __initcall(init_huw_cs3); ...@@ -55,7 +55,7 @@ __initcall(init_huw_cs3);
static void __init static void __init
fixup_huw_webpanel(struct machine_desc *desc, struct param_struct *params, fixup_huw_webpanel(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
/** /**
......
...@@ -40,32 +40,30 @@ static void sa1100_manual_rerun(unsigned int irq) ...@@ -40,32 +40,30 @@ static void sa1100_manual_rerun(unsigned int irq)
irq_desc[irq].handle(irq, &irq_desc[irq], &regs); irq_desc[irq].handle(irq, &irq_desc[irq], &regs);
} }
/*
* To get the GPIO number from an IRQ number
*/
#define GPIO_11_27_IRQ(i) ((i) - 21)
#define GPIO11_27_MASK(irq) (1 << GPIO_11_27_IRQ(irq)) #define GPIO11_27_MASK(irq) (1 << GPIO_11_27_IRQ(irq))
static int sa1100_gpio_type(unsigned int irq, unsigned int type) static int sa1100_gpio_type(unsigned int irq, unsigned int type)
{ {
unsigned int mask; unsigned int mask;
printk(KERN_DEBUG "IRQ%d: ", irq);
if (irq <= 10) if (irq <= 10)
mask = 1 << irq; mask = 1 << irq;
else else
mask = GPIO11_27_MASK(irq); mask = GPIO11_27_MASK(irq);
if (type & __IRQT_RISEDGE) { if (type & __IRQT_RISEDGE) {
printk("rising ");
GPIO_IRQ_rising_edge |= mask; GPIO_IRQ_rising_edge |= mask;
} else } else
GPIO_IRQ_rising_edge &= ~mask; GPIO_IRQ_rising_edge &= ~mask;
if (type & __IRQT_FALEDGE) { if (type & __IRQT_FALEDGE) {
printk("falling ");
GPIO_IRQ_falling_edge |= mask; GPIO_IRQ_falling_edge |= mask;
} else } else
GPIO_IRQ_falling_edge &= ~mask; GPIO_IRQ_falling_edge &= ~mask;
printk("edges\n");
GRER = GPIO_IRQ_rising_edge & GPIO_IRQ_mask; GRER = GPIO_IRQ_rising_edge & GPIO_IRQ_mask;
GFER = GPIO_IRQ_falling_edge & GPIO_IRQ_mask; GFER = GPIO_IRQ_falling_edge & GPIO_IRQ_mask;
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
static void __init static void __init
fixup_itsy(struct machine_desc *desc, struct param_struct *params, fixup_itsy(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
SET_BANK( 0, 0xc0000000, 16*1024*1024 ); SET_BANK( 0, 0xc0000000, 16*1024*1024 );
......
...@@ -57,7 +57,7 @@ __initcall(jornada720_init); ...@@ -57,7 +57,7 @@ __initcall(jornada720_init);
static void __init static void __init
fixup_jornada720(struct machine_desc *desc, struct param_struct *params, fixup_jornada720(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
SET_BANK( 0, 0xc0000000, 32*1024*1024 ); SET_BANK( 0, 0xc0000000, 32*1024*1024 );
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
static void __init static void __init
fixup_nanoengine(struct machine_desc *desc, struct param_struct *params, fixup_nanoengine(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
SET_BANK( 0, 0xc0000000, 32*1024*1024 ); SET_BANK( 0, 0xc0000000, 32*1024*1024 );
......
...@@ -84,7 +84,7 @@ neponset_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *reg ...@@ -84,7 +84,7 @@ neponset_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *reg
} }
} }
static void __init neponset_init_irq(void) static inline void __init neponset_init_irq(void)
{ {
/* /*
* Install handler for GPIO25. * Install handler for GPIO25.
...@@ -102,6 +102,64 @@ static void __init neponset_init_irq(void) ...@@ -102,6 +102,64 @@ static void __init neponset_init_irq(void)
set_irq_flags(IRQ_NEPONSET_USAR, IRQF_VALID | IRQF_PROBE); set_irq_flags(IRQ_NEPONSET_USAR, IRQF_VALID | IRQF_PROBE);
} }
static void neponset_set_mctrl(struct uart_port *port, u_int mctrl)
{
u_int mdm_ctl0 = MDM_CTL_0;
if (port->mapbase == _Ser1UTCR0) {
if (mctrl & TIOCM_RTS)
mdm_ctl0 &= ~MDM_CTL0_RTS2;
else
mdm_ctl0 |= MDM_CTL0_RTS2;
if (mctrl & TIOCM_DTR)
mdm_ctl0 &= ~MDM_CTL0_DTR2;
else
mdm_ctl0 |= MDM_CTL0_DTR2;
} else if (port->mapbase == _Ser3UTCR0) {
if (mctrl & TIOCM_RTS)
mdm_ctl0 &= ~MDM_CTL0_RTS1;
else
mdm_ctl0 |= MDM_CTL0_RTS1;
if (mctrl & TIOCM_DTR)
mdm_ctl0 &= ~MDM_CTL0_DTR1;
else
mdm_ctl0 |= MDM_CTL0_DTR1;
}
MDM_CTL_0 = mdm_ctl0;
}
static u_int neponset_get_mctrl(struct uart_port *port)
{
u_int ret = TIOCM_CD | TIOCM_CTS | TIOCM_DSR;
u_int mdm_ctl1 = MDM_CTL_1;
if (port->mapbase == _Ser1UTCR0) {
if (mdm_ctl1 & MDM_CTL1_DCD2)
ret &= ~TIOCM_CD;
if (mdm_ctl1 & MDM_CTL1_CTS2)
ret &= ~TIOCM_CTS;
if (mdm_ctl1 & MDM_CTL1_DSR2)
ret &= ~TIOCM_DSR;
} else if (port->mapbase == _Ser3UTCR0) {
if (mdm_ctl1 & MDM_CTL1_DCD1)
ret &= ~TIOCM_CD;
if (mdm_ctl1 & MDM_CTL1_CTS1)
ret &= ~TIOCM_CTS;
if (mdm_ctl1 & MDM_CTL1_DSR1)
ret &= ~TIOCM_DSR;
}
return ret;
}
static struct sa1100_port_fns neponset_port_fns __initdata = {
set_mctrl: neponset_set_mctrl,
get_mctrl: neponset_get_mctrl,
};
static int __init neponset_init(void) static int __init neponset_init(void)
{ {
int ret; int ret;
...@@ -134,12 +192,14 @@ static int __init neponset_init(void) ...@@ -134,12 +192,14 @@ static int __init neponset_init(void)
if (ret) if (ret)
return ret; return ret;
sa1100_register_uart_fns(&neponset_port_fns);
neponset_init_irq(); neponset_init_irq();
/* /*
* Disable GPIO 0/1 drivers so the buttons work on the module. * Disable GPIO 0/1 drivers so the buttons work on the module.
*/ */
NCR_0 |= NCR_GP01_OFF; NCR_0 = NCR_GP01_OFF;
/* /*
* Neponset has SA1111 connected to CS4. We know that after * Neponset has SA1111 connected to CS4. We know that after
...@@ -162,67 +222,7 @@ static struct map_desc neponset_io_desc[] __initdata = { ...@@ -162,67 +222,7 @@ static struct map_desc neponset_io_desc[] __initdata = {
LAST_DESC LAST_DESC
}; };
static void neponset_set_mctrl(struct uart_port *port, u_int mctrl)
{
u_int mdm_ctl0 = MDM_CTL_0;
if (port->mapbase == _Ser1UTCR0) {
if (mctrl & TIOCM_RTS)
mdm_ctl0 &= ~MDM_CTL0_RTS2;
else
mdm_ctl0 |= MDM_CTL0_RTS2;
if (mctrl & TIOCM_DTR)
mdm_ctl0 &= ~MDM_CTL0_DTR2;
else
mdm_ctl0 |= MDM_CTL0_DTR2;
} else if (port->mapbase == _Ser3UTCR0) {
if (mctrl & TIOCM_RTS)
mdm_ctl0 &= ~MDM_CTL0_RTS1;
else
mdm_ctl0 |= MDM_CTL0_RTS1;
if (mctrl & TIOCM_DTR)
mdm_ctl0 &= ~MDM_CTL0_DTR1;
else
mdm_ctl0 |= MDM_CTL0_DTR1;
}
MDM_CTL_0 = mdm_ctl0;
}
static u_int neponset_get_mctrl(struct uart_port *port)
{
u_int ret = TIOCM_CD | TIOCM_CTS | TIOCM_DSR;
u_int mdm_ctl1 = MDM_CTL_1;
if (port->mapbase == _Ser1UTCR0) {
if (mdm_ctl1 & MDM_CTL1_DCD2)
ret &= ~TIOCM_CD;
if (mdm_ctl1 & MDM_CTL1_CTS2)
ret &= ~TIOCM_CTS;
if (mdm_ctl1 & MDM_CTL1_DSR2)
ret &= ~TIOCM_DSR;
} else if (port->mapbase == _Ser3UTCR0) {
if (mdm_ctl1 & MDM_CTL1_DCD1)
ret &= ~TIOCM_CD;
if (mdm_ctl1 & MDM_CTL1_CTS1)
ret &= ~TIOCM_CTS;
if (mdm_ctl1 & MDM_CTL1_DSR1)
ret &= ~TIOCM_DSR;
}
return ret;
}
static struct sa1100_port_fns neponset_port_fns __initdata = {
set_mctrl: neponset_set_mctrl,
get_mctrl: neponset_get_mctrl,
};
void __init neponset_map_io(void) void __init neponset_map_io(void)
{ {
iotable_init(neponset_io_desc); iotable_init(neponset_io_desc);
if (machine_has_neponset())
sa1100_register_uart_fns(&neponset_port_fns);
} }
...@@ -41,7 +41,7 @@ static int __init omnimeter_init(void) ...@@ -41,7 +41,7 @@ static int __init omnimeter_init(void)
__initcall(omnimeter_init); __initcall(omnimeter_init);
static void __init static void __init
fixup_omnimeter(struct machine_desc *desc, struct param_struct *params, fixup_omnimeter(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
SET_BANK( 0, 0xc0000000, 16*1024*1024 ); SET_BANK( 0, 0xc0000000, 16*1024*1024 );
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
static void __init static void __init
fixup_pangolin(struct machine_desc *desc, struct param_struct *params, fixup_pangolin(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
SET_BANK( 0, 0xc0000000, 128*1024*1024 ); SET_BANK( 0, 0xc0000000, 128*1024*1024 );
......
...@@ -57,7 +57,7 @@ static void __init pfs168_init_irq(void) ...@@ -57,7 +57,7 @@ static void __init pfs168_init_irq(void)
static void __init static void __init
fixup_pfs168(struct machine_desc *desc, struct param_struct *params, fixup_pfs168(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
SET_BANK( 0, 0xc0000000, 16*1024*1024 ); SET_BANK( 0, 0xc0000000, 16*1024*1024 );
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include "generic.h" #include "generic.h"
static void __init static void __init
fixup_pleb(struct machine_desc *desc, struct param_struct *params, fixup_pleb(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
SET_BANK(0, 0xc0000000, 16*1024*1024); SET_BANK(0, 0xc0000000, 16*1024*1024);
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
static void __init static void __init
fixup_sherman(struct machine_desc *desc, struct param_struct *params, fixup_sherman(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
SET_BANK( 0, 0xc0000000, 64*1024*1024 ); SET_BANK( 0, 0xc0000000, 64*1024*1024 );
......
...@@ -41,7 +41,7 @@ void clear_cs3_bit(int value) ...@@ -41,7 +41,7 @@ void clear_cs3_bit(int value)
} }
static void __init static void __init
fixup_simpad(struct machine_desc *desc, struct param_struct *params, fixup_simpad(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
#ifdef CONFIG_SA1100_SIMPAD_DRAM_64MB /* DRAM */ #ifdef CONFIG_SA1100_SIMPAD_DRAM_64MB /* DRAM */
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
/* init funcs */ /* init funcs */
static void __init fixup_system3(struct machine_desc *desc, static void __init fixup_system3(struct machine_desc *desc,
struct param_struct *params, char **cmdline, struct meminfo *mi); struct tag *tags, char **cmdline, struct meminfo *mi);
static int __init system3_init(void); static int __init system3_init(void);
static void __init system3_init_irq(void); static void __init system3_init_irq(void);
static void __init system3_map_io(void); static void __init system3_map_io(void);
...@@ -87,8 +87,6 @@ static int sdram_notifier(struct notifier_block *nb, unsigned long event, void * ...@@ -87,8 +87,6 @@ static int sdram_notifier(struct notifier_block *nb, unsigned long event, void *
static void system3_lcd_power(int on); static void system3_lcd_power(int on);
static void system3_backlight_power(int on); static void system3_backlight_power(int on);
extern void convert_to_tag_list(struct param_struct *params, int mem_init);
/********************************************************************** /**********************************************************************
* global data * global data
...@@ -239,7 +237,7 @@ static int sdram_notifier(struct notifier_block *nb, unsigned long event, ...@@ -239,7 +237,7 @@ static int sdram_notifier(struct notifier_block *nb, unsigned long event,
* *
*/ */
static void __init fixup_system3(struct machine_desc *desc, static void __init fixup_system3(struct machine_desc *desc,
struct param_struct *params, char **cmdline, struct meminfo *mi) struct tag *tags, char **cmdline, struct meminfo *mi)
{ {
DPRINTK( "%s\n", "START" ); DPRINTK( "%s\n", "START" );
......
...@@ -42,7 +42,7 @@ __initcall(victor_init); ...@@ -42,7 +42,7 @@ __initcall(victor_init);
static void __init static void __init
fixup_victor(struct machine_desc *desc, struct param_struct *params, fixup_victor(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
SET_BANK( 0, 0xc0000000, 4*1024*1024 ); SET_BANK( 0, 0xc0000000, 4*1024*1024 );
......
...@@ -58,7 +58,7 @@ __initcall(xp860_init); ...@@ -58,7 +58,7 @@ __initcall(xp860_init);
static void __init static void __init
fixup_xp860(struct machine_desc *desc, struct param_struct *params, fixup_xp860(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi) char **cmdline, struct meminfo *mi)
{ {
SET_BANK( 0, 0xc0000000, 32*1024*1024 ); SET_BANK( 0, 0xc0000000, 32*1024*1024 );
......
...@@ -29,15 +29,21 @@ obj-$(CONFIG_DISCONTIGMEM) += discontig.o ...@@ -29,15 +29,21 @@ obj-$(CONFIG_DISCONTIGMEM) += discontig.o
# Select the processor-specific files # Select the processor-specific files
p-$(CONFIG_CPU_26) += proc-arm2,3.o p-$(CONFIG_CPU_26) += proc-arm2,3.o
# ARMv3
p-$(CONFIG_CPU_ARM610) += proc-arm6,7.o tlb-v3.o copypage-v3.o p-$(CONFIG_CPU_ARM610) += proc-arm6,7.o tlb-v3.o copypage-v3.o
p-$(CONFIG_CPU_ARM710) += proc-arm6,7.o tlb-v3.o copypage-v3.o p-$(CONFIG_CPU_ARM710) += proc-arm6,7.o tlb-v3.o copypage-v3.o
p-$(CONFIG_CPU_ARM720T) += proc-arm720.o tlb-v4.o copypage-v4.o abort-lv4t.o
p-$(CONFIG_CPU_ARM920T) += proc-arm920.o tlb-v4wb.o copypage-v4.o abort-ev4t.o # ARMv4
p-$(CONFIG_CPU_ARM922T) += proc-arm922.o tlb-v4wb.o copypage-v4.o abort-ev4t.o p-$(CONFIG_CPU_ARM720T) += proc-arm720.o tlb-v4.o copypage-v4wt.o abort-lv4t.o
p-$(CONFIG_CPU_ARM926T) += proc-arm926.o tlb-v4wb.o copypage-v4.o abort-ev5ej.o p-$(CONFIG_CPU_ARM920T) += proc-arm920.o tlb-v4wb.o copypage-v4wb.o abort-ev4t.o
p-$(CONFIG_CPU_ARM1020) += proc-arm1020.o tlb-v4wb.o copypage-v4.o abort-ev4t.o p-$(CONFIG_CPU_ARM922T) += proc-arm922.o tlb-v4wb.o copypage-v4wb.o abort-ev4t.o
p-$(CONFIG_CPU_SA110) += proc-sa110.o tlb-v4wb.o copypage-v4.o copypage-v4mc.o abort-ev4.o minicache.o p-$(CONFIG_CPU_ARM1020) += proc-arm1020.o tlb-v4wb.o copypage-v4wb.o abort-ev4t.o
p-$(CONFIG_CPU_SA1100) += proc-sa110.o tlb-v4wb.o copypage-v4.o copypage-v4mc.o abort-ev4.o minicache.o p-$(CONFIG_CPU_SA110) += proc-sa110.o tlb-v4wb.o copypage-v4wb.o abort-ev4.o minicache.o
p-$(CONFIG_CPU_SA1100) += proc-sa110.o tlb-v4wb.o copypage-v4mc.o abort-ev4.o minicache.o
# ARMv5
p-$(CONFIG_CPU_ARM926T) += proc-arm926.o tlb-v4wb.o copypage-v4wb.o abort-ev5ej.o
p-$(CONFIG_CPU_XSCALE) += proc-xscale.o tlb-v4wb.o copypage-v5te.o abort-ev4t.o minicache.o p-$(CONFIG_CPU_XSCALE) += proc-xscale.o tlb-v4wb.o copypage-v5te.o abort-ev4t.o minicache.o
obj-y += $(sort $(p-y)) obj-y += $(sort $(p-y))
......
...@@ -52,7 +52,8 @@ void *consistent_alloc(int gfp, size_t size, dma_addr_t *dma_handle) ...@@ -52,7 +52,8 @@ void *consistent_alloc(int gfp, size_t size, dma_addr_t *dma_handle)
goto no_page; goto no_page;
*dma_handle = page_to_bus(page); *dma_handle = page_to_bus(page);
ret = __ioremap(page_to_phys(page), size, 0); ret = __ioremap(page_to_pfn(page) << PAGE_SHIFT, size, 0,
PAGE_SIZE << order);
if (!ret) if (!ret)
goto no_remap; goto no_remap;
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
* instruction. If your processor does not supply this, you have to write your * instruction. If your processor does not supply this, you have to write your
* own copy_user_page that does the right thing. * own copy_user_page that does the right thing.
*/ */
ENTRY(v4_copy_user_page) ENTRY(v4wb_copy_user_page)
stmfd sp!, {r4, lr} @ 2 stmfd sp!, {r4, lr} @ 2
mov r2, #PAGE_SZ/64 @ 1 mov r2, #PAGE_SZ/64 @ 1
ldmia r1!, {r3, r4, ip, lr} @ 4 ldmia r1!, {r3, r4, ip, lr} @ 4
...@@ -51,7 +51,7 @@ ENTRY(v4_copy_user_page) ...@@ -51,7 +51,7 @@ ENTRY(v4_copy_user_page)
* *
* Same story as above. * Same story as above.
*/ */
ENTRY(v4_clear_user_page) ENTRY(v4wb_clear_user_page)
str lr, [sp, #-4]! str lr, [sp, #-4]!
mov r1, #PAGE_SZ/64 @ 1 mov r1, #PAGE_SZ/64 @ 1
mov r2, #0 @ 1 mov r2, #0 @ 1
...@@ -71,7 +71,7 @@ ENTRY(v4_clear_user_page) ...@@ -71,7 +71,7 @@ ENTRY(v4_clear_user_page)
.section ".text.init", #alloc, #execinstr .section ".text.init", #alloc, #execinstr
ENTRY(v4_user_fns) ENTRY(v4wb_user_fns)
.long v4_clear_user_page .long v4wb_clear_user_page
.long v4_copy_user_page .long v4wb_copy_user_page
/*
* linux/arch/arm/lib/copypage-v4.S
*
* Copyright (C) 1995-1999 Russell King
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* ASM optimised string functions
*
* This is for CPUs with a writethrough cache and 'flush ID cache' is
* the only supported cache operation.
*/
#include <linux/linkage.h>
#include <asm/constants.h>
.text
.align 5
/*
* ARMv4 optimised copy_user_page
*
* Since we have writethrough caches, we don't have to worry about
* dirty data in the cache. However, we do have to ensure that
* subsequent reads are up to date.
*/
ENTRY(v4wt_copy_user_page)
stmfd sp!, {r4, lr} @ 2
mov r2, #PAGE_SZ/64 @ 1
ldmia r1!, {r3, r4, ip, lr} @ 4
1: stmia r0!, {r3, r4, ip, lr} @ 4
ldmia r1!, {r3, r4, ip, lr} @ 4+1
stmia r0!, {r3, r4, ip, lr} @ 4
ldmia r1!, {r3, r4, ip, lr} @ 4
stmia r0!, {r3, r4, ip, lr} @ 4
ldmia r1!, {r3, r4, ip, lr} @ 4
subs r2, r2, #1 @ 1
stmia r0!, {r3, r4, ip, lr} @ 4
ldmneia r1!, {r3, r4, ip, lr} @ 4
bne 1b @ 1
mcr p15, 0, r2, c7, c7, 0 @ flush ID cache
ldmfd sp!, {r4, pc} @ 3
.align 5
/*
* ARMv4 optimised clear_user_page
*
* Same story as above.
*/
ENTRY(v4wt_clear_user_page)
str lr, [sp, #-4]!
mov r1, #PAGE_SZ/64 @ 1
mov r2, #0 @ 1
mov r3, #0 @ 1
mov ip, #0 @ 1
mov lr, #0 @ 1
1: stmia r0!, {r2, r3, ip, lr} @ 4
stmia r0!, {r2, r3, ip, lr} @ 4
stmia r0!, {r2, r3, ip, lr} @ 4
stmia r0!, {r2, r3, ip, lr} @ 4
subs r1, r1, #1 @ 1
bne 1b @ 1
mcr p15, 0, r2, c7, c7, 0 @ flush ID cache
ldr pc, [sp], #4
.section ".text.init", #alloc, #execinstr
ENTRY(v4wt_user_fns)
.long v4wt_clear_user_page
.long v4wt_copy_user_page
...@@ -557,5 +557,5 @@ __arm1020_proc_info: ...@@ -557,5 +557,5 @@ __arm1020_proc_info:
.long cpu_arm1020_info .long cpu_arm1020_info
.long arm1020_processor_functions .long arm1020_processor_functions
.long v4wbi_tlb_fns .long v4wbi_tlb_fns
.long v4_user_fns .long v4wb_user_fns
.size __arm1020_proc_info, . - __arm1020_proc_info .size __arm1020_proc_info, . - __arm1020_proc_info
...@@ -261,5 +261,5 @@ __arm720_proc_info: ...@@ -261,5 +261,5 @@ __arm720_proc_info:
.long cpu_arm720_info @ info .long cpu_arm720_info @ info
.long arm720_processor_functions .long arm720_processor_functions
.long v4_tlb_fns .long v4_tlb_fns
.long v4_user_fns .long v4wt_user_fns
.size __arm720_proc_info, . - __arm720_proc_info .size __arm720_proc_info, . - __arm720_proc_info
...@@ -543,5 +543,5 @@ __arm920_proc_info: ...@@ -543,5 +543,5 @@ __arm920_proc_info:
.long cpu_arm920_info .long cpu_arm920_info
.long arm920_processor_functions .long arm920_processor_functions
.long v4wbi_tlb_fns .long v4wbi_tlb_fns
.long v4_user_fns .long v4wb_user_fns
.size __arm920_proc_info, . - __arm920_proc_info .size __arm920_proc_info, . - __arm920_proc_info
...@@ -544,5 +544,5 @@ __arm922_proc_info: ...@@ -544,5 +544,5 @@ __arm922_proc_info:
.long cpu_arm922_info .long cpu_arm922_info
.long arm922_processor_functions .long arm922_processor_functions
.long v4wbi_tlb_fns .long v4wbi_tlb_fns
.long v4_user_fns .long v4wb_user_fns
.size __arm922_proc_info, . - __arm922_proc_info .size __arm922_proc_info, . - __arm922_proc_info
...@@ -542,5 +542,5 @@ __arm926_proc_info: ...@@ -542,5 +542,5 @@ __arm926_proc_info:
.long cpu_arm926_info .long cpu_arm926_info
.long arm926_processor_functions .long arm926_processor_functions
.long v4wbi_tlb_fns .long v4wbi_tlb_fns
.long v4_user_fns .long v4wb_user_fns
.size __arm926_proc_info, . - __arm926_proc_info .size __arm926_proc_info, . - __arm926_proc_info
...@@ -611,6 +611,7 @@ cpu_elf_name: ...@@ -611,6 +611,7 @@ cpu_elf_name:
.section ".proc.info", #alloc, #execinstr .section ".proc.info", #alloc, #execinstr
#ifdef CONFIG_CPU_SA110
.type __sa110_proc_info,#object .type __sa110_proc_info,#object
__sa110_proc_info: __sa110_proc_info:
.long 0x4401a100 .long 0x4401a100
...@@ -623,9 +624,11 @@ __sa110_proc_info: ...@@ -623,9 +624,11 @@ __sa110_proc_info:
.long cpu_sa110_info .long cpu_sa110_info
.long sa110_processor_functions .long sa110_processor_functions
.long v4wb_tlb_fns .long v4wb_tlb_fns
.long v4_user_fns .long v4wb_user_fns
.size __sa110_proc_info, . - __sa110_proc_info .size __sa110_proc_info, . - __sa110_proc_info
#endif
#ifdef CONFIG_CPU_SA1100
.type __sa1100_proc_info,#object .type __sa1100_proc_info,#object
__sa1100_proc_info: __sa1100_proc_info:
.long 0x4401a110 .long 0x4401a110
...@@ -655,3 +658,4 @@ __sa1110_proc_info: ...@@ -655,3 +658,4 @@ __sa1110_proc_info:
.long v4wb_tlb_fns .long v4wb_tlb_fns
.long v4_mc_user_fns .long v4_mc_user_fns
.size __sa1110_proc_info, . - __sa1110_proc_info .size __sa1110_proc_info, . - __sa1110_proc_info
#endif
...@@ -55,14 +55,13 @@ ENTRY(v4_flush_user_tlb_range) ...@@ -55,14 +55,13 @@ ENTRY(v4_flush_user_tlb_range)
eors r3, ip, r3 @ == mm ? eors r3, ip, r3 @ == mm ?
movne pc, lr @ no, we dont do anything movne pc, lr @ no, we dont do anything
vma_vm_flags ip, r2 vma_vm_flags ip, r2
.v4_flush_kern_tlb_range:
bic r0, r0, #0x0ff bic r0, r0, #0x0ff
bic r0, r0, #0xf00 bic r0, r0, #0xf00
1: mcr p15, 0, r0, c8, c6, 1 @ invalidate D TLB entry 1: mcr p15, 0, r0, c8, c7, 1 @ invalidate TLB entry
add r0, r0, #PAGE_SZ add r0, r0, #PAGE_SZ
cmp r0, r1 cmp r0, r1
blo 1b blo 1b
tst ip, #VM_EXEC
mcrne p15, 0, r3, c8, c5, 0 @ invalidate I TLB
mov pc, lr mov pc, lr
/* /*
...@@ -80,9 +79,8 @@ ENTRY(v4_flush_user_tlb_page) ...@@ -80,9 +79,8 @@ ENTRY(v4_flush_user_tlb_page)
teq r2, r3 @ equal teq r2, r3 @ equal
movne pc, lr @ no movne pc, lr @ no
vma_vm_flags r2, r1 vma_vm_flags r2, r1
mcr p15, 0, r0, c8, c6, 1 @ invalidate D TLB entry .v4_flush_kern_tlb_page:
tst r2, #VM_EXEC mcr p15, 0, r0, c8, c7, 1 @ invalidate TLB entry
mcrne p15, 0, r3, c8, c5, 0 @ invalidate I TLB
mov pc, lr mov pc, lr
/* /*
...@@ -94,16 +92,8 @@ ENTRY(v4_flush_user_tlb_page) ...@@ -94,16 +92,8 @@ ENTRY(v4_flush_user_tlb_page)
* - start - virtual address (may not be aligned) * - start - virtual address (may not be aligned)
* - end - virtual address (may not be aligned) * - end - virtual address (may not be aligned)
*/ */
.align 5 .globl v4_flush_kern_tlb_range
ENTRY(v4_flush_kern_tlb_range) .equ v4_flush_kern_tlb_range, .v4_flush_kern_tlb_range
bic r0, r0, #0x0ff
bic r0, r0, #0xf00
1: mcr p15, 0, r0, c8, c6, 1 @ invalidate D TLB entry
add r0, r0, #PAGE_SZ
cmp r0, r1
blo 1b
mcr p15, 0, r3, c8, c5, 0 @ invalidate I TLB
mov pc, lr
/* /*
...@@ -115,9 +105,8 @@ ENTRY(v4_flush_kern_tlb_range) ...@@ -115,9 +105,8 @@ ENTRY(v4_flush_kern_tlb_range)
* *
* - kaddr - Kernel virtual memory address * - kaddr - Kernel virtual memory address
*/ */
ENTRY(v4_flush_kern_tlb_page) .globl v4_flush_kern_tlb_page
mcr p15, 0, r0, c8, c6, 1 @ invalidate D TLB entry .equ v4_flush_kern_tlb_page, .v4_flush_kern_tlb_page
mov pc, lr
.section ".text.init", #alloc, #execinstr .section ".text.init", #alloc, #execinstr
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
*/ */
OUTPUT_ARCH(arm) OUTPUT_ARCH(arm)
ENTRY(stext) ENTRY(stext)
jiffies = jiffies_64 + 4; jiffies = jiffies_64;
SECTIONS SECTIONS
{ {
. = TEXTADDR; . = TEXTADDR;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
*/ */
OUTPUT_ARCH(arm) OUTPUT_ARCH(arm)
ENTRY(stext) ENTRY(stext)
jiffies = jiffies_64 + 4; jiffies = jiffies_64;
SECTIONS SECTIONS
{ {
. = TEXTADDR; . = TEXTADDR;
......
...@@ -8,10 +8,7 @@ ...@@ -8,10 +8,7 @@
# #
# Note 2! The CFLAGS definitions are now in the main makefile... # Note 2! The CFLAGS definitions are now in the main makefile...
# These assembly files can't be assembld with -traditional, so we USE_STANDARD_AS_RULE := true
# need another build rule than the one in the toplevel Makefile.
.S.o:
$(CC) $(AFLAGS) -c $< -o $*.o
all: kernel.o head.o all: kernel.o head.o
......
...@@ -299,7 +299,9 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu) ...@@ -299,7 +299,9 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
asmlinkage int sys_fork(long r10, long r11, long r12, long r13, long mof, long srp, asmlinkage int sys_fork(long r10, long r11, long r12, long r13, long mof, long srp,
struct pt_regs *regs) struct pt_regs *regs)
{ {
return do_fork(SIGCHLD, rdusp(), regs, 0); struct task_struct *p;
p = do_fork(SIGCHLD, rdusp(), regs, 0);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
/* if newusp is 0, we just grab the old usp */ /* if newusp is 0, we just grab the old usp */
...@@ -308,9 +310,11 @@ asmlinkage int sys_clone(unsigned long newusp, unsigned long flags, ...@@ -308,9 +310,11 @@ asmlinkage int sys_clone(unsigned long newusp, unsigned long flags,
long r12, long r13, long mof, long srp, long r12, long r13, long mof, long srp,
struct pt_regs *regs) struct pt_regs *regs)
{ {
struct task_struct *p;
if (!newusp) if (!newusp)
newusp = rdusp(); newusp = rdusp();
return do_fork(flags, newusp, regs, 0); p = do_fork(flags & ~CLONE_IDLETASK, newusp, regs, 0);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
/* vfork is a system call in i386 because of register-pressure - maybe /* vfork is a system call in i386 because of register-pressure - maybe
...@@ -320,7 +324,9 @@ asmlinkage int sys_clone(unsigned long newusp, unsigned long flags, ...@@ -320,7 +324,9 @@ asmlinkage int sys_clone(unsigned long newusp, unsigned long flags,
asmlinkage int sys_vfork(long r10, long r11, long r12, long r13, long mof, long srp, asmlinkage int sys_vfork(long r10, long r11, long r12, long r13, long mof, long srp,
struct pt_regs *regs) struct pt_regs *regs)
{ {
return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), regs, 0); struct task_struct *p;
p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), regs, 0);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
/* /*
......
...@@ -2,10 +2,12 @@ ...@@ -2,10 +2,12 @@
# Makefile for Etrax-specific library files.. # Makefile for Etrax-specific library files..
# #
.S.o: USE_STANDARD_AS_RULE := true
$(CC) -D__ASSEMBLY__ $(AFLAGS) -traditional -c $< -o $*.o
L_TARGET = lib.a L_TARGET = lib.a
EXTRA_AFLAGS := -traditional
obj-y = checksum.o checksumcopy.o string.o usercopy.o memset.o csumcpfruser.o obj-y = checksum.o checksumcopy.o string.o usercopy.o memset.o csumcpfruser.o
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
...@@ -711,11 +711,15 @@ void __switch_to(struct task_struct *prev_p, struct task_struct *next_p) ...@@ -711,11 +711,15 @@ void __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
asmlinkage int sys_fork(struct pt_regs regs) asmlinkage int sys_fork(struct pt_regs regs)
{ {
return do_fork(SIGCHLD, regs.esp, &regs, 0); struct task_struct *p;
p = do_fork(SIGCHLD, regs.esp, &regs, 0);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
asmlinkage int sys_clone(struct pt_regs regs) asmlinkage int sys_clone(struct pt_regs regs)
{ {
struct task_struct *p;
unsigned long clone_flags; unsigned long clone_flags;
unsigned long newsp; unsigned long newsp;
...@@ -723,7 +727,8 @@ asmlinkage int sys_clone(struct pt_regs regs) ...@@ -723,7 +727,8 @@ asmlinkage int sys_clone(struct pt_regs regs)
newsp = regs.ecx; newsp = regs.ecx;
if (!newsp) if (!newsp)
newsp = regs.esp; newsp = regs.esp;
return do_fork(clone_flags, newsp, &regs, 0); p = do_fork(clone_flags & ~CLONE_IDLETASK, newsp, &regs, 0);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
/* /*
...@@ -738,7 +743,10 @@ asmlinkage int sys_clone(struct pt_regs regs) ...@@ -738,7 +743,10 @@ asmlinkage int sys_clone(struct pt_regs regs)
*/ */
asmlinkage int sys_vfork(struct pt_regs regs) asmlinkage int sys_vfork(struct pt_regs regs)
{ {
return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.esp, &regs, 0); struct task_struct *p;
p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.esp, &regs, 0);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
/* /*
......
...@@ -2153,11 +2153,6 @@ static void __init init_intel(struct cpuinfo_x86 *c) ...@@ -2153,11 +2153,6 @@ static void __init init_intel(struct cpuinfo_x86 *c)
strcpy(c->x86_model_id, p); strcpy(c->x86_model_id, p);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
/* PGE CPUID bug: Pentium4 supports PGE, but seems to have SMP bugs.. */
if ( c->x86 == 15 )
clear_bit(X86_FEATURE_PGE, c->x86_capability);
if (test_bit(X86_FEATURE_HT, c->x86_capability)) { if (test_bit(X86_FEATURE_HT, c->x86_capability)) {
extern int phys_proc_id[NR_CPUS]; extern int phys_proc_id[NR_CPUS];
......
...@@ -529,14 +529,14 @@ extern struct { ...@@ -529,14 +529,14 @@ extern struct {
unsigned short ss; unsigned short ss;
} stack_start; } stack_start;
static int __init fork_by_hand(void) static struct task_struct * __init fork_by_hand(void)
{ {
struct pt_regs regs; struct pt_regs regs;
/* /*
* don't care about the eip and regs settings since * don't care about the eip and regs settings since
* we'll never reschedule the forked task. * we'll never reschedule the forked task.
*/ */
return do_fork(CLONE_VM|CLONE_PID, 0, &regs, 0); return do_fork(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0);
} }
/* which physical APIC ID maps to which logical CPU number */ /* which physical APIC ID maps to which logical CPU number */
...@@ -822,17 +822,14 @@ static void __init do_boot_cpu (int apicid) ...@@ -822,17 +822,14 @@ static void __init do_boot_cpu (int apicid)
* We can't use kernel_thread since we must avoid to * We can't use kernel_thread since we must avoid to
* reschedule the child. * reschedule the child.
*/ */
if (fork_by_hand() < 0) idle = fork_by_hand();
if (IS_ERR(idle))
panic("failed fork for CPU %d", cpu); panic("failed fork for CPU %d", cpu);
/* /*
* We remove it from the pidhash and the runqueue * We remove it from the pidhash and the runqueue
* once we got the process: * once we got the process:
*/ */
idle = prev_task(&init_task);
if (!idle)
panic("No idle process for CPU %d", cpu);
init_idle(idle, cpu); init_idle(idle, cpu);
map_cpu_to_boot_apicid(cpu, apicid); map_cpu_to_boot_apicid(cpu, apicid);
......
...@@ -41,7 +41,7 @@ ENTRY(ia32_clone) ...@@ -41,7 +41,7 @@ ENTRY(ia32_clone)
mov out3=16 // stacksize (compensates for 16-byte scratch area) mov out3=16 // stacksize (compensates for 16-byte scratch area)
adds out2=IA64_SWITCH_STACK_SIZE+16,sp // out2 = &regs adds out2=IA64_SWITCH_STACK_SIZE+16,sp // out2 = &regs
zxt4 out0=in0 // out0 = clone_flags zxt4 out0=in0 // out0 = clone_flags
br.call.sptk.many rp=do_fork br.call.sptk.many rp=do_fork_WITHOUT_CLONE_IDLETASK // FIXME: mask out CLONE_IDLETASK from flags, and return value now task_struct *.
.ret0: .restore sp .ret0: .restore sp
adds sp=IA64_SWITCH_STACK_SIZE,sp // pop the switch stack adds sp=IA64_SWITCH_STACK_SIZE,sp // pop the switch stack
mov ar.pfs=loc1 mov ar.pfs=loc1
...@@ -167,7 +167,7 @@ GLOBAL_ENTRY(sys32_fork) ...@@ -167,7 +167,7 @@ GLOBAL_ENTRY(sys32_fork)
mov out1=0 mov out1=0
mov out3=0 mov out3=0
adds out2=IA64_SWITCH_STACK_SIZE+16,sp // out2 = &regs adds out2=IA64_SWITCH_STACK_SIZE+16,sp // out2 = &regs
br.call.sptk.few rp=do_fork br.call.sptk.few rp=do_fork_FIXME_RETURNS_TASK_STRUCT
.ret5: mov ar.pfs=loc1 .ret5: mov ar.pfs=loc1
.restore sp .restore sp
adds sp=IA64_SWITCH_STACK_SIZE,sp // pop the switch stack adds sp=IA64_SWITCH_STACK_SIZE,sp // pop the switch stack
......
...@@ -101,7 +101,7 @@ GLOBAL_ENTRY(sys_clone2) ...@@ -101,7 +101,7 @@ GLOBAL_ENTRY(sys_clone2)
mov out3=in2 mov out3=in2
adds out2=IA64_SWITCH_STACK_SIZE+16,sp // out2 = &regs adds out2=IA64_SWITCH_STACK_SIZE+16,sp // out2 = &regs
mov out0=in0 // out0 = clone_flags mov out0=in0 // out0 = clone_flags
br.call.sptk.many rp=do_fork br.call.sptk.many rp=do_fork_WITHOUT_CLONE_IDLETASK // FIXME: mask out CLONE_IDLETASK from flags, and now returns task_struct *.
.ret1: .restore sp .ret1: .restore sp
adds sp=IA64_SWITCH_STACK_SIZE,sp // pop the switch stack adds sp=IA64_SWITCH_STACK_SIZE,sp // pop the switch stack
mov ar.pfs=loc1 mov ar.pfs=loc1
...@@ -120,7 +120,7 @@ GLOBAL_ENTRY(sys_clone) ...@@ -120,7 +120,7 @@ GLOBAL_ENTRY(sys_clone)
mov out3=16 // stacksize (compensates for 16-byte scratch area) mov out3=16 // stacksize (compensates for 16-byte scratch area)
adds out2=IA64_SWITCH_STACK_SIZE+16,sp // out2 = &regs adds out2=IA64_SWITCH_STACK_SIZE+16,sp // out2 = &regs
mov out0=in0 // out0 = clone_flags mov out0=in0 // out0 = clone_flags
br.call.sptk.many rp=do_fork br.call.sptk.many rp=do_fork_WITHOUT_CLONE_IDLETASK // FIXME: mask out CLONE_IDLETASK from flags, and now return task_struct *.
.ret2: .restore sp .ret2: .restore sp
adds sp=IA64_SWITCH_STACK_SIZE,sp // pop the switch stack adds sp=IA64_SWITCH_STACK_SIZE,sp // pop the switch stack
mov ar.pfs=loc1 mov ar.pfs=loc1
......
...@@ -391,14 +391,14 @@ start_secondary (void *unused) ...@@ -391,14 +391,14 @@ start_secondary (void *unused)
return cpu_idle(); return cpu_idle();
} }
static int __init static struct task_struct * __init
fork_by_hand (void) fork_by_hand (void)
{ {
/* /*
* don't care about the eip and regs settings since * don't care about the eip and regs settings since
* we'll never reschedule the forked task. * we'll never reschedule the forked task.
*/ */
return do_fork(CLONE_VM|CLONE_PID, 0, 0, 0); return do_fork(CLONE_VM|CLONE_IDLETASK, 0, 0, 0);
} }
static void __init static void __init
...@@ -412,17 +412,14 @@ do_boot_cpu (int sapicid) ...@@ -412,17 +412,14 @@ do_boot_cpu (int sapicid)
* We can't use kernel_thread since we must avoid to * We can't use kernel_thread since we must avoid to
* reschedule the child. * reschedule the child.
*/ */
if (fork_by_hand() < 0) idle = fork_by_hand();
if (IS_ERR(idle))
panic("failed fork for CPU %d", cpu); panic("failed fork for CPU %d", cpu);
/* /*
* We remove it from the pidhash and the runqueue * We remove it from the pidhash and the runqueue
* once we got the process: * once we got the process:
*/ */
idle = prev_task(&init_task);
if (!idle)
panic("No idle process for CPU %d", cpu);
init_idle(idle, cpu); init_idle(idle, cpu);
ia64_cpu_to_sapicid[cpu] = sapicid; ia64_cpu_to_sapicid[cpu] = sapicid;
......
...@@ -7,8 +7,9 @@ ...@@ -7,8 +7,9 @@
# #
# Note 2! The CFLAGS definitions are now in the main makefile... # Note 2! The CFLAGS definitions are now in the main makefile...
.S.o: USE_STANDARD_AS_RULE := true
$(CC) $(AFLAGS) -traditional -c -o $*.o $<
EXTRA_AFLAGS := -traditional
OS_TARGET := fpsp.o OS_TARGET := fpsp.o
......
...@@ -4,8 +4,9 @@ ...@@ -4,8 +4,9 @@
# License. See the file "README.legal" in the main directory of this archive # License. See the file "README.legal" in the main directory of this archive
# for more details. # for more details.
.S.o: USE_STANDARD_AS_RULE := true
$(CC) $(AFLAGS) -traditional -c -o $*.o $<
EXTRA_AFLAGS := -traditional
OS_TARGET := ifpsp.o OS_TARGET := ifpsp.o
......
...@@ -7,8 +7,9 @@ ...@@ -7,8 +7,9 @@
# #
# Note 2! The CFLAGS definitions are now in the main makefile... # Note 2! The CFLAGS definitions are now in the main makefile...
.S.o: USE_STANDARD_AS_RULE := true
$(CC) $(AFLAGS) -traditional -c $< -o $*.o
EXTRA_AFLAGS := -traditional
ifndef CONFIG_SUN3 ifndef CONFIG_SUN3
all: head.o kernel.o all: head.o kernel.o
......
...@@ -177,25 +177,31 @@ void flush_thread(void) ...@@ -177,25 +177,31 @@ void flush_thread(void)
asmlinkage int m68k_fork(struct pt_regs *regs) asmlinkage int m68k_fork(struct pt_regs *regs)
{ {
return do_fork(SIGCHLD, rdusp(), regs, 0); struct task_struct *p;
p = do_fork(SIGCHLD, rdusp(), regs, 0);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
asmlinkage int m68k_vfork(struct pt_regs *regs) asmlinkage int m68k_vfork(struct pt_regs *regs)
{ {
return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), regs, 0); struct task_struct *p;
p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), regs, 0);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
asmlinkage int m68k_clone(struct pt_regs *regs) asmlinkage int m68k_clone(struct pt_regs *regs)
{ {
unsigned long clone_flags; unsigned long clone_flags;
unsigned long newsp; unsigned long newsp;
struct task_struct *p;
/* syscall2 puts clone_flags in d1 and usp in d2 */ /* syscall2 puts clone_flags in d1 and usp in d2 */
clone_flags = regs->d1; clone_flags = regs->d1;
newsp = regs->d2; newsp = regs->d2;
if (!newsp) if (!newsp)
newsp = rdusp(); newsp = rdusp();
return do_fork(clone_flags, newsp, regs, 0); p = do_fork(clone_flags & ~CLONE_IDLETASK, newsp, regs, 0);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
......
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
# Makefile for m68k-specific library files.. # Makefile for m68k-specific library files..
# #
.S.o: USE_STANDARD_AS_RULE := true
$(CC) $(AFLAGS) -traditional -c $< -o $@
L_TARGET = lib.a L_TARGET = lib.a
EXTRA_AFLAGS := -traditional
obj-y := ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \ obj-y := ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \
checksum.o memcmp.o memcpy.o memset.o semaphore.o checksum.o memcmp.o memcpy.o memset.o semaphore.o
......
...@@ -7,10 +7,12 @@ ...@@ -7,10 +7,12 @@
# #
# Note 2! The CFLAGS definitions are now in the main makefile... # Note 2! The CFLAGS definitions are now in the main makefile...
.S.o: USE_STANDARD_AS_RULE := true
$(CC) $(EXTRA_CFLAGS) $(AFLAGS) -traditional -c $< -o $*.o
#EXTRA_CFLAGS=-DFPU_EMU_DEBUG EXTRA_AFLAGS := -traditional
#EXTRA_AFLAGS += -DFPU_EMU_DEBUG
#EXTRA_CFLAGS += -DFPU_EMU_DEBUG
O_TARGET := mathemu.o O_TARGET := mathemu.o
......
# q#
# Makefile for Linux arch/m68k/sun3 source directory # Makefile for Linux arch/m68k/sun3 source directory
# #
# Note! Dependencies are done automagically by 'make dep', which also # Note! Dependencies are done automagically by 'make dep', which also
...@@ -7,9 +7,6 @@ ...@@ -7,9 +7,6 @@
# #
# Note 2! The CFLAGS definitions are now in the main makefile... # Note 2! The CFLAGS definitions are now in the main makefile...
.S.o:
$(CC) $(AFLAGS) -traditional -Wa,-m68020 -c $< -o $*.o
O_TARGET := sun3.o O_TARGET := sun3.o
export-objs := sun3_ksyms.o export-objs := sun3_ksyms.o
......
...@@ -10,10 +10,9 @@ ...@@ -10,10 +10,9 @@
# unless it's something special (ie not a .c file). # unless it's something special (ie not a .c file).
# #
.S.s: USE_STANDARD_AS_RULE := true
$(CPP) $(CFLAGS) $< -o $*.s
.S.o: EXTRA_AFLAGS := $(CFLAGS)
$(CC) $(CFLAGS) -c $< -o $*.o
all: au1000.o all: au1000.o
......
...@@ -10,11 +10,6 @@ ...@@ -10,11 +10,6 @@
# unless it's something special (ie not a .c file). # unless it's something special (ie not a .c file).
# #
.S.s:
$(CPP) $(CFLAGS) $< -o $*.s
.S.o:
$(CC) $(CFLAGS) -c $< -o $*.o
all: pb1000.o all: pb1000.o
O_TARGET := pb1000.o O_TARGET := pb1000.o
......
...@@ -6,11 +6,6 @@ ...@@ -6,11 +6,6 @@
# Copyright (C) 1995, 1998, 2001 by Ralf Baechle # Copyright (C) 1995, 1998, 2001 by Ralf Baechle
# #
.S.s:
$(CPP) $(CFLAGS) $< -o $*.s
.S.o:
$(CC) $(CFLAGS) -c $< -o $*.o
OBJS = milo.o a.out.o OBJS = milo.o a.out.o
# #
......
...@@ -9,10 +9,9 @@ ...@@ -9,10 +9,9 @@
# Note 2! The CFLAGS definitions are now in the main makefile... # Note 2! The CFLAGS definitions are now in the main makefile...
# #
.S.s: USE_STANDARD_AS_RULE := true
$(CPP) $(CFLAGS) $< -o $*.s
.S.o: EXTRA_AFLAGS := $(CFLAGS)
$(CC) $(CFLAGS) -c $< -o $*.o
O_TARGET = ddb5074.a O_TARGET = ddb5074.a
......
...@@ -9,10 +9,9 @@ ...@@ -9,10 +9,9 @@
# Note 2! The CFLAGS definitions are now in the main makefile... # Note 2! The CFLAGS definitions are now in the main makefile...
# #
.S.s: USE_STANDARD_AS_RULE := true
$(CPP) $(CFLAGS) $< -o $*.s
.S.o: EXTRA_AFLAGS := $(CFLAGS)
$(CC) $(CFLAGS) -c $< -o $*.o
O_TARGET = ddb5476.a O_TARGET = ddb5476.a
......
...@@ -6,11 +6,6 @@ ...@@ -6,11 +6,6 @@
# unless it's something special (ie not a .c file). # unless it's something special (ie not a .c file).
# #
.S.s:
$(CPP) $(CFLAGS) $< -o $*.s
.S.o:
$(CC) $(CFLAGS) -c $< -o $*.o
O_TARGET:= ddb5xxx.o O_TARGET:= ddb5xxx.o
obj-y += irq.o irq_cpu.o nile4.o prom.o pci.o pci_auto.o rtc_ds1386.o obj-y += irq.o irq_cpu.o nile4.o prom.o pci.o pci_auto.o rtc_ds1386.o
......
...@@ -6,10 +6,9 @@ ...@@ -6,10 +6,9 @@
# unless it's something special (ie not a .c file). # unless it's something special (ie not a .c file).
# #
.S.s: USE_STANDARD_AS_RULE := true
$(CPP) $(CFLAGS) $< -o $*.s
.S.o: EXTRA_AFLAGS := $(CFLAGS)
$(CC) $(CFLAGS) -c $< -o $*.o
O_TARGET:= ddb5477.o O_TARGET:= ddb5477.o
......
...@@ -6,10 +6,7 @@ ...@@ -6,10 +6,7 @@
# unless it's something special (ie not a .c file). # unless it's something special (ie not a .c file).
# #
.S.s: USE_STANDARD_AS_RULE := true
$(CPP) $(AFLAGS) $< -o $@
.S.o:
$(CC) $(AFLAGS) -c $< -o $@
O_TARGET := dec.o O_TARGET := dec.o
......
...@@ -6,11 +6,6 @@ ...@@ -6,11 +6,6 @@
# unless it's something special (ie not a .c file). # unless it's something special (ie not a .c file).
# #
.S.s:
$(CPP) $(CFLAGS) $< -o $*.s
.S.o:
$(CC) $(CFLAGS) -c $< -o $*.o
netboot: all netboot: all
mipsel-linux-ld -N -G 0 -T ld.ecoff ../../boot/zImage \ mipsel-linux-ld -N -G 0 -T ld.ecoff ../../boot/zImage \
dec_boot.o ramdisk.img -o nbImage dec_boot.o ramdisk.img -o nbImage
......
...@@ -8,10 +8,9 @@ ...@@ -8,10 +8,9 @@
# #
# Note 2! The CFLAGS definitions are now in the main makefile... # Note 2! The CFLAGS definitions are now in the main makefile...
.S.s: USE_STANDARD_AS_RULE := true
$(CPP) $(CFLAGS) $< -o $*.s
.S.o: EXTRA_AFLAGS := $(CFLAGS)
$(CC) $(CFLAGS) -c $< -o $*.o
OBJS = init.o memory.o cmdline.o identify.o locore.o OBJS = init.o memory.o cmdline.o identify.o locore.o
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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