diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2001-01-10 17:17:53 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2001-01-10 17:17:53 +0000 |
commit | b2ad5f821b1381492d792ca10b1eb7a107b48f14 (patch) | |
tree | 954a648692e7da983db1d2470953705f6a729264 /arch/sh | |
parent | c9c06167e7933d93a6e396174c68abf242294abb (diff) |
Merge with Linux 2.4.0-prerelease. Big Makefile rewrite, test your
Makefiles.
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/Makefile | 6 | ||||
-rw-r--r-- | arch/sh/boot/compressed/head.S | 19 | ||||
-rw-r--r-- | arch/sh/kernel/Makefile | 81 | ||||
-rw-r--r-- | arch/sh/kernel/ptrace.c | 16 | ||||
-rw-r--r-- | arch/sh/kernel/setup.c | 3 | ||||
-rw-r--r-- | arch/sh/kernel/sh_ksyms.c | 17 | ||||
-rw-r--r-- | arch/sh/lib/Makefile | 9 | ||||
-rw-r--r-- | arch/sh/mm/Makefile | 2 | ||||
-rw-r--r-- | arch/sh/vmlinux.lds.S | 4 |
9 files changed, 85 insertions, 72 deletions
diff --git a/arch/sh/Makefile b/arch/sh/Makefile index 7be14e899..fa0beb807 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile @@ -46,8 +46,8 @@ CFLAGS += -m3 AFLAGS += -m3 endif ifdef CONFIG_CPU_SH4 -CFLAGS += -m4 -AFLAGS += -m4 +CFLAGS += -m4-nofpu +AFLAGS += -m4-nofpu endif # @@ -78,7 +78,7 @@ MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot vmlinux: arch/sh/vmlinux.lds arch/sh/vmlinux.lds: arch/sh/vmlinux.lds.S FORCE - $(CPP) -C -P -I$(HPATH) -Ush arch/sh/vmlinux.lds.S >arch/sh/vmlinux.lds + $(CPP) -traditional -C -P -I$(HPATH) -Ush arch/sh/vmlinux.lds.S >arch/sh/vmlinux.lds FORCE: ; diff --git a/arch/sh/boot/compressed/head.S b/arch/sh/boot/compressed/head.S index 86a3acf82..75d8b4ef9 100644 --- a/arch/sh/boot/compressed/head.S +++ b/arch/sh/boot/compressed/head.S @@ -50,3 +50,22 @@ decompress_kernel_addr: .long decompress_kernel kernel_start_addr: .long _text+0x1000 + + .align 9 +fake_headers_as_bzImage: + .word 0 + .ascii "HdrS" ! header signature + .word 0x0202 ! header version number (>= 0x0105) + ! or else old loadlin-1.5 will fail) + .word 0 ! default_switch + .word 0 ! SETUPSEG + .word 0x1000 + .word 0 ! pointing to kernel version string + .byte 0 ! = 0, old one (LILO, Loadlin, + ! 0xTV: T=0 for LILO + ! V = version + .byte 1 ! Load flags bzImage=1 + .word 0x8000 ! size to move, when setup is not + .long 0x100000 ! 0x100000 = default for big kernel + .long 0 ! address of loaded ramdisk image + .long 0 # its size in bytes diff --git a/arch/sh/kernel/Makefile b/arch/sh/kernel/Makefile index c9de70daf..49fab469c 100644 --- a/arch/sh/kernel/Makefile +++ b/arch/sh/kernel/Makefile @@ -6,73 +6,46 @@ # unless it's something special (ie not a .c file). # -.S.o: - $(CC) $(AFLAGS) -traditional -c $< -o $*.o - -O_TARGET := kernel.o -O_OBJS := process.o signal.o entry.o traps.o irq.o irq_ipr.o \ - ptrace.o setup.o time.o sys_sh.o semaphore.o \ - irq_imask.o io.o -OX_OBJS := sh_ksyms.o -MX_OBJS := - -ifdef CONFIG_CF_ENABLER -O_OBJS += cf-enabler.o -endif - -ifdef CONFIG_SH_GENERIC +all: kernel.o head.o init_task.o -O_OBJS += mach_se.o setup_se.o setup_cqreek.o io_se.o led_se.o \ - mach_hp600.o io_hd64461.o \ - mach_unknown.o io_unknown.o \ - io_generic.o +clean: -else +O_TARGET := kernel.o -ifdef CONFIG_SH_HP600 -O_OBJS += mach_hp600.o io_hd64461.o io_generic.o -endif +export-objs := io.o io_generic.o io_hd64461.o setup_hd64461.o sh_ksyms.o -ifdef CONFIG_SH_OVERDRIVE -O_OBJS += io_generic.o -endif +obj-y := process.o signal.o entry.o traps.o irq.o irq_ipr.o \ + ptrace.o setup.o time.o sys_sh.o semaphore.o \ + irq_imask.o io.o io_generic.o sh_ksyms.o -ifdef CONFIG_SH_SOLUTION_ENGINE -O_OBJS += mach_se.o setup_se.o io_se.o io_generic.o led_se.o -endif +obj-$(CONFIG_CF_ENABLER) += cf-enabler.o +obj-$(CONFIG_CPU_SH4) += fpu.o +obj-$(CONFIG_PCI) += pci-sh.o +obj-$(CONFIG_SH_STANDARD_BIOS) += sh_bios.o -ifdef CONFIG_SH_CQREEK -O_OBJS += setup_cqreek.o -endif +obj-$(CONFIG_SH_HP600) += mach_hp600.o +machine-specific-objs += mach_hp600.o -ifdef CONFIG_SH_UNKNOWN -O_OBJS += mach_unknown.o io_unknown.o io_generic.o -endif +obj-$(CONFIG_SH_SOLUTION_ENGINE)+= mach_se.o setup_se.o io_se.o led_se.o +machine-specific-objs += mach_se.o setup_se.o io_se.o led_se.o -endif +obj-$(CONFIG_SH_CQREEK) += setup_cqreek.o +machine-specific-objs += setup_cqreek.o -ifdef CONFIG_CPU_SH4 -O_OBJS += fpu.o -endif +obj-$(CONFIG_SH_UNKNOWN) += mach_unknown.o io_unknown.o +machine-specific-objs += mach_unknown.o io_unknown.o -ifdef CONFIG_PCI -O_OBJS += pci-sh.o -endif +obj-$(CONFIG_HD64461) += setup_hd64461.o io_hd64461.o +machine-specific-objs += setup_hd64461.o io_hd64461.o -ifneq ($(CONFIG_SH_GENERIC)$(CONFIG_HD64461),) -O_OBJS += setup_hd64461.o -endif +# Doesn't compile well, so don't include in machine-specific-objs +obj-$(CONFIG_HD64465) += setup_hd64465.o io_hd64465.o +obj-$(CONFIG_SH_FOOBAR) += mach_foobar.o -ifdef CONFIG_SH_STANDARD_BIOS -O_OBJS += sh_bios.o +ifeq ($(CONFIG_SH_GENERIC),y) +obj-y += $(machine-specific-objs) endif -all: kernel.o head.o init_task.o - -entry.o: entry.S - -head.o: head.S - -clean: +USE_STANDARD_AS_RULE := true include $(TOPDIR)/Rules.make diff --git a/arch/sh/kernel/ptrace.c b/arch/sh/kernel/ptrace.c index 7f42367e2..e4228bb3e 100644 --- a/arch/sh/kernel/ptrace.c +++ b/arch/sh/kernel/ptrace.c @@ -366,7 +366,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) ret = -EIO; if ((unsigned long) data > _NSIG) break; - child->ptrace &= ~(PT_PTRACED|PT_TRACESYS); + child->ptrace = 0; child->exit_code = data; write_lock_irq(&tasklist_lock); REMOVE_LINKS(child); @@ -378,6 +378,15 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) break; } + case PTRACE_SETOPTIONS: { + if (data & PTRACE_O_TRACESYSGOOD) + child->ptrace |= PT_TRACESYSGOOD; + else + child->ptrace &= ~PT_TRACESYSGOOD; + ret = 0; + break; + } + default: ret = -EIO; break; @@ -396,7 +405,10 @@ asmlinkage void syscall_trace(void) if ((tsk->ptrace & (PT_PTRACED|PT_TRACESYS)) != (PT_PTRACED|PT_TRACESYS)) return; - tsk->exit_code = SIGTRAP; + /* the 0x80 provides a way for the tracing parent to distinguish + between a syscall stop and SIGTRAP delivery */ + tsk->exit_code = SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) + ? 0x80 : 0); tsk->state = TASK_STOPPED; notify_parent(tsk, SIGCHLD); schedule(); diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 2f9e722fe..5b19ac86e 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c @@ -49,6 +49,7 @@ */ struct sh_cpuinfo boot_cpu_data = { CPU_SH_NONE, 0, 0, 0, }; +struct screen_info screen_info; #ifdef CONFIG_BLK_DEV_RAM extern int rd_doload; /* 1 = load ramdisk, 0 = don't load */ @@ -259,6 +260,7 @@ static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE], void __init setup_arch(char **cmdline_p) { + extern struct sh_machine_vector mv_unknown; struct sh_machine_vector *mv = NULL; char mv_name[MV_NAME_SIZE] = ""; unsigned long mv_io_base = 0; @@ -294,7 +296,6 @@ void __init setup_arch(char **cmdline_p) #ifdef CONFIG_SH_GENERIC if (mv == NULL) { - extern struct sh_machine_vector mv_unknown; mv = &mv_unknown; if (*mv_name != '\0') { printk("Warning: Unsupported machine %s, using unknown\n", diff --git a/arch/sh/kernel/sh_ksyms.c b/arch/sh/kernel/sh_ksyms.c index de03cfb19..d6bbbe34d 100644 --- a/arch/sh/kernel/sh_ksyms.c +++ b/arch/sh/kernel/sh_ksyms.c @@ -8,6 +8,7 @@ #include <linux/in6.h> #include <linux/interrupt.h> #include <linux/smp_lock.h> +#include <linux/vmalloc.h> #include <asm/semaphore.h> #include <asm/processor.h> @@ -16,11 +17,11 @@ #include <asm/io.h> #include <asm/hardirq.h> #include <asm/delay.h> -#include <asm/irq.h> -#include <asm/pgtable.h> +#include <linux/irq.h> extern void dump_thread(struct pt_regs *, struct user *); extern int dump_fpu(elf_fpregset_t *); +extern struct hw_interrupt_type no_irq_type; /* platform dependent support */ EXPORT_SYMBOL(dump_thread); @@ -29,6 +30,9 @@ EXPORT_SYMBOL(iounmap); EXPORT_SYMBOL(enable_irq); EXPORT_SYMBOL(disable_irq); EXPORT_SYMBOL(kernel_thread); +EXPORT_SYMBOL(disable_irq_nosync); +EXPORT_SYMBOL(irq_desc); +EXPORT_SYMBOL(no_irq_type); /* Networking helper routines. */ EXPORT_SYMBOL(csum_partial_copy); @@ -37,21 +41,22 @@ EXPORT_SYMBOL(strtok); EXPORT_SYMBOL(strpbrk); EXPORT_SYMBOL(strstr); EXPORT_SYMBOL(strlen); +EXPORT_SYMBOL(strchr); /* mem exports */ +EXPORT_SYMBOL(memchr); EXPORT_SYMBOL(memcpy); EXPORT_SYMBOL(memset); EXPORT_SYMBOL(memmove); - -/* this is not provided by arch/sh/lib/*.S but is - potentially needed by modules (af_packet.o/unix.o - use memcmp, for instance) */ EXPORT_SYMBOL(memcmp); #ifdef CONFIG_VT EXPORT_SYMBOL(screen_info); #endif +EXPORT_SYMBOL(boot_cpu_data); + +EXPORT_SYMBOL(get_vm_area); #define DECLARE_EXPORT(name) extern void name(void);EXPORT_SYMBOL_NOVERS(name) diff --git a/arch/sh/lib/Makefile b/arch/sh/lib/Makefile index a0d344cb9..3be152297 100644 --- a/arch/sh/lib/Makefile +++ b/arch/sh/lib/Makefile @@ -2,11 +2,10 @@ # Makefile for SuperH-specific library files.. # -.S.o: - $(CC) $(AFLAGS) -traditional -c $< -o $*.o - L_TARGET = lib.a -L_OBJS = delay.o memcpy.o memset.o memmove.o memchr.o old-checksum.o \ - checksum.o strcasecmp.o +obj-y = delay.o memcpy.o memset.o memmove.o memchr.o old-checksum.o \ + checksum.o strcasecmp.o + +USE_STANDARD_AS_RULE := true include $(TOPDIR)/Rules.make diff --git a/arch/sh/mm/Makefile b/arch/sh/mm/Makefile index 1f1815600..a8f60d28c 100644 --- a/arch/sh/mm/Makefile +++ b/arch/sh/mm/Makefile @@ -8,6 +8,6 @@ # Note 2! The CFLAGS definition is now in the main makefile... O_TARGET := mm.o -O_OBJS := init.o fault.o extable.o cache.o # ioremap.o +obj-y := init.o fault.o extable.o cache.o # ioremap.o include $(TOPDIR)/Rules.make diff --git a/arch/sh/vmlinux.lds.S b/arch/sh/vmlinux.lds.S index 93ea453cb..5d3f8a66d 100644 --- a/arch/sh/vmlinux.lds.S +++ b/arch/sh/vmlinux.lds.S @@ -36,6 +36,10 @@ SECTIONS __ksymtab : { *(__ksymtab) } __stop___ksymtab = .; + __start___kallsyms = .; /* All kernel symbols */ + __kallsyms : { *(__kallsyms) } + __stop___kallsyms = .; + _etext = .; /* End of text section */ .data : { /* Data */ |