# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet v2.6.0-test4 -> 1.1291 # arch/ppc/boot/simple/Makefile 1.19 -> 1.20 # include/asm-ppc/processor.h 1.32 -> 1.33 # sound/pcmcia/vx/vx_entry.c 1.2 -> 1.3 # arch/ppc/Makefile 1.41 -> 1.42 # arch/ppc/8260_io/uart.c 1.24 -> 1.26 # arch/ppc/boot/simple/embed_config.c 1.7 -> 1.8 # arch/ppc/boot/simple/misc-embedded.c 1.8 -> 1.9 # include/asm-ppc/unistd.h 1.25 -> 1.26 # arch/ppc/configs/power3_defconfig 1.14 -> 1.15 # arch/ppc/configs/common_defconfig 1.23 -> 1.24 # arch/ppc/platforms/sandpoint.h 1.4 -> 1.5 # arch/ppc/boot/simple/relocate.S 1.5 -> 1.6 # drivers/ide/ide-cd.c 1.57 -> 1.58 # include/asm-ppc/cpm_8260.h 1.4 -> 1.5 # arch/ppc/configs/ibmchrp_defconfig 1.14 -> 1.15 # arch/ppc/boot/simple/misc-spruce.c 1.5 -> 1.6 # drivers/input/input.c 1.33 -> 1.34 # arch/ppc/configs/mcpn765_defconfig 1.8 -> 1.9 # arch/ppc/platforms/mcpn765_setup.c 1.11 -> 1.12 # arch/ppc/8xx_io/uart.c 1.30 -> 1.31 # arch/ppc/platforms/mcpn765_serial.h 1.3 -> 1.4 # arch/ppc/boot/simple/misc.c 1.11 -> 1.12 # arch/ppc/defconfig 1.22 -> 1.23 # arch/ppc/boot/utils/mktree.c 1.2 -> 1.3 # arch/ppc/kernel/ppc-stub.c 1.9 -> 1.10 # arch/ppc/configs/pmac_defconfig 1.15 -> 1.16 # arch/ppc/kernel/ppc_ksyms.c 1.42 -> 1.43 # arch/ppc/kernel/misc.S 1.45 -> 1.46 # arch/ppc/kernel/smp.c 1.35 -> 1.36 # arch/ppc/kernel/syscalls.c 1.12 -> 1.13 # arch/ppc/boot/common/ns16550.c 1.5 -> 1.6 # arch/ppc/Kconfig 1.32 -> 1.33 # arch/ppc/platforms/sandpoint.c 1.14 -> 1.15 # arch/ppc/boot/common/util.S 1.5 -> 1.6 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/08/22 torvalds@home.osdl.org 1.1276.1.40 # Linux 2.6.0-test4 # -------------------------------------------- # 03/08/23 paulus@samba.org 1.1285 # Merge samba.org:/home/paulus/kernel/linux-2.5 # into samba.org:/home/paulus/kernel/for-linus-ppc # -------------------------------------------- # 03/08/22 andersen@codepoet.org 1.1276.1.41 # [PATCH] Fix cdrom error handling in 2.6 # # In both 2.4 and in 2.6, error handling for bad cdrom media is # wrong. And it is my fault I'm afraid, since I botched an earlier # fix for the problem by putting the fix in the wrong spot. # # My kids have a "Jumpstart Toddlers" cd they have long since # completely killed, which makes a great test disc. Without this # fix, the best time projection I can get for completing a dd type # sector copy is about 2 years... Most of that is spent thrashing # about in kernel space trying to re-read sectors we already know # are not correctable.... After the fix, I was able to rip a copy # the CD (or rather muddle through it getting lots of EIO errors) # in about 15 minutes. # # Attached is the fix for 2.6.x, # -------------------------------------------- # 03/08/23 paulus@samba.org 1.1286 # PPC32: Add the fadvise64_64 system call. # # On PPC32 we reorder the arguments so they fit into 6 registers. Glibc will # need a two-line stub to change them from the standard order to the ordering # used by the system call: (fd, advice, offset, len). # -------------------------------------------- # 03/08/23 paulus@samba.org 1.1287 # PPC32: Declare cpu_online_map and cpu_possible_map as cpumask_t. # -------------------------------------------- # 03/08/23 paulus@samba.org 1.1288 # Merge samba.org:/home/paulus/kernel/linux-2.5 # into samba.org:/home/paulus/kernel/for-linus-ppc # -------------------------------------------- # 03/08/23 paulus@samba.org 1.1289 # PPC32: Update some of the example configs # -------------------------------------------- # 03/08/23 torvalds@home.osdl.org 1.1290 # Input: typo in device matching. # # Too much cut-and-paste, noticed by Dmitry Torokhov # -------------------------------------------- # 03/08/23 vinay-rc@naturesoft.net 1.1291 # [PATCH] vx_entry.c: remove release timer # # sound/pcmcia/vx/vx_entry.c: # # This patch removes the PCMCIA timer release functionality which is no # longer required. Without this the module does not compile. # -------------------------------------------- # diff -Nru a/arch/ppc/8260_io/uart.c b/arch/ppc/8260_io/uart.c --- a/arch/ppc/8260_io/uart.c Sat Aug 23 16:02:05 2003 +++ b/arch/ppc/8260_io/uart.c Sat Aug 23 16:02:05 2003 @@ -50,6 +50,10 @@ #include #include +#ifdef CONFIG_MAGIC_SYSRQ +#include +#endif + #ifdef CONFIG_SERIAL_CONSOLE #include @@ -77,6 +81,14 @@ static struct tty_driver *serial_driver; static int serial_console_setup(struct console *co, char *options); +static void serial_console_write(struct console *c, const char *s, + unsigned count); +static kdev_t serial_console_device(struct console *c); + +#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) +static unsigned long break_pressed; /* break, really ... */ +#endif + /* * Serial driver configuration section. Here are the various options: */ @@ -208,6 +220,15 @@ cbd_t *tx_cur; } ser_info_t; +static struct console sercons = { + .name = "ttyS", + .write = serial_console_write, + .device = serial_console_device, + .setup = serial_console_setup, + .flags = CON_PRINTBUFFER, + .index = CONFIG_SERIAL_CONSOLE_PORT, +}; + static void change_speed(ser_info_t *info); static void rs_8xx_wait_until_sent(struct tty_struct *tty, int timeout); @@ -328,7 +349,7 @@ schedule_work(&info->tqueue); } -static _INLINE_ void receive_chars(ser_info_t *info) +static _INLINE_ void receive_chars(ser_info_t *info, struct pt_regs *regs) { struct tty_struct *tty = info->tty; unsigned char ch, *cp; @@ -450,6 +471,19 @@ } } } + +#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) + if (break_pressed && info->line == sercons.index) { + if (ch != 0 && time_before(jiffies, + break_pressed + HZ*5)) { + handle_sysrq(ch, regs, NULL, NULL); + break_pressed = 0; + goto ignore_char; + } else + break_pressed = 0; + } +#endif + if (tty->flip.count >= TTY_FLIPBUF_SIZE) break; @@ -458,6 +492,10 @@ tty->flip.count++; } +#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) + ignore_char: +#endif + /* This BD is ready to be used again. Clear status. * Get next BD. */ @@ -475,7 +513,36 @@ schedule_delayed_work(&tty->flip.work, 1); } -static _INLINE_ void transmit_chars(ser_info_t *info) +static _INLINE_ void receive_break(ser_info_t *info, struct pt_regs *regs) +{ + struct tty_struct *tty = info->tty; + + info->state->icount.brk++; + +#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) + if (info->line == sercons.index) { + if (!break_pressed) { + break_pressed = jiffies; + return; + } else + break_pressed = 0; + } +#endif + + /* Check to see if there is room in the tty buffer for + * the break. If not, we exit now, losing the break. FIXME + */ + if ((tty->flip.count + 1) >= TTY_FLIPBUF_SIZE) + return; + *(tty->flip.flag_buf_ptr++) = TTY_BREAK; + *(tty->flip.char_buf_ptr++) = 0; + tty->flip.count++; + + queue_task(&tty->flip.tqueue, &tq_timer); +} + + +static _INLINE_ void transmit_chars(ser_info_t *info, struct pt_regs *regs) { if (info->flags & TX_WAKEUP) { @@ -575,19 +642,23 @@ if ((idx = info->state->smc_scc_num) < SCC_NUM_BASE) { smcp = &immr->im_smc[idx]; events = smcp->smc_smce; + if (events & SMCM_BRKE) + receive_break(info, regs); if (events & SMCM_RX) - receive_chars(info); + receive_chars(info, regs); if (events & SMCM_TX) - transmit_chars(info); + transmit_chars(info, regs); smcp->smc_smce = events; } else { sccp = &immr->im_scc[idx - SCC_IDX_BASE]; events = sccp->scc_scce; + if (events & SMCM_BRKE) + receive_break(info, regs); if (events & SCCM_RX) - receive_chars(info); + receive_chars(info, regs); if (events & SCCM_TX) - transmit_chars(info); + transmit_chars(info, regs); sccp->scc_scce = events; } @@ -2207,7 +2278,7 @@ static void serial_console_write(struct console *c, const char *s, unsigned count) { -#if defined(CONFIG_KGDB) && !defined(CONFIG_USE_SERIAL2_KGDB) +#if defined(CONFIG_KGDB_CONSOLE) && !defined(CONFIG_USE_SERIAL2_KGDB) /* Try to let stub handle output. Returns true if it did. */ if (kgdb_output_string(s, count)) return; @@ -2396,16 +2467,6 @@ *index = c->index; return serial_driver; } - - -static struct console sercons = { - .name = "ttyS", - .write = serial_console_write, - .device = serial_console_device, - .setup = serial_console_setup, - .flags = CON_PRINTBUFFER, - .index = CONFIG_SERIAL_CONSOLE_PORT, -}; /* * Register console. diff -Nru a/arch/ppc/8xx_io/uart.c b/arch/ppc/8xx_io/uart.c --- a/arch/ppc/8xx_io/uart.c Sat Aug 23 16:02:05 2003 +++ b/arch/ppc/8xx_io/uart.c Sat Aug 23 16:02:05 2003 @@ -1068,7 +1068,7 @@ volatile cbd_t *bdp; unsigned char *cp; -#ifdef CONFIG_KGDB +#ifdef CONFIG_KGDB_CONSOLE /* Try to let stub handle output. Returns true if it did. */ if (kgdb_output_string(buf, count)) return ret; @@ -2271,7 +2271,7 @@ static void serial_console_write(struct console *c, const char *s, unsigned count) { -#ifdef CONFIG_KGDB +#ifdef CONFIG_KGDB_CONSOLE /* Try to let stub handle output. Returns true if it did. */ if (kgdb_output_string(s, count)) return; diff -Nru a/arch/ppc/Kconfig b/arch/ppc/Kconfig --- a/arch/ppc/Kconfig Sat Aug 23 16:02:05 2003 +++ b/arch/ppc/Kconfig Sat Aug 23 16:02:05 2003 @@ -1426,20 +1426,12 @@ config KGDB bool "Include kgdb kernel debugger" depends on DEBUG_KERNEL + select DEBUG_INFO help Include in-kernel hooks for kgdb, the Linux kernel source level debugger. See for more information. Unless you are intending to debug the kernel, say N here. -config DEBUG_INFO - bool "Compile the kernel with debug info" - depends on DEBUG_KERNEL - help - If you say Y here the resulting kernel image will include - debugging info resulting in a larger kernel image. - Say Y here only if you plan to use gdb to debug the kernel. - If you don't debug the kernel, you can say N. - choice prompt "Serial Port" depends on KGDB @@ -1459,6 +1451,14 @@ endchoice +config KGDB_CONSOLE + bool "Enable serial console thru kgdb port" + depends on KGDB && 8xx || 8260 + help + If you enable this, all serial console messages will be sent + over the gdb stub. + If unsure, say N. + config XMON bool "Include xmon kernel debugger" depends on DEBUG_KERNEL @@ -1474,18 +1474,16 @@ Unless you are intending to debug the kernel with one of these machines, say N here. -config MORE_COMPILE_OPTIONS - bool "Add any additional compile options" - depends on DEBUG_KERNEL && (KGDB || XMON || BDI_SWITCH) +config DEBUG_INFO + bool "Compile the kernel with debug info" + depends on DEBUG_KERNEL + default y if BDI_SWITCH || XMON help - If you want to add additional CFLAGS to the kernel build, such as -g - for KGDB or the BDI2000, enable this option and then enter what you - would like to add in the next question. - -config COMPILE_OPTIONS - string "Additional compile arguments" - depends on MORE_COMPILE_OPTIONS - default "-g -ggdb" + If you say Y here the resulting kernel image will include + debugging info resulting in a larger kernel image. + Say Y here only if you plan to use some sort of debugger to + debug the kernel. + If you don't debug the kernel, you can say N. config BOOTX_TEXT bool "Support for early boot text console (BootX or OpenFirmware only)" diff -Nru a/arch/ppc/Makefile b/arch/ppc/Makefile --- a/arch/ppc/Makefile Sat Aug 23 16:02:05 2003 +++ b/arch/ppc/Makefile Sat Aug 23 16:02:05 2003 @@ -22,9 +22,6 @@ cflags-$(CONFIG_4xx) += -Wa,-m405 cflags-$(CONFIG_PPC64BRIDGE) += -Wa,-mppc64bridge -# Use sed to remove the quotes. -cflags-$(CONFIG_MORE_COMPILE_OPTIONS) += \ - $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g') CFLAGS += $(cflags-y) diff -Nru a/arch/ppc/boot/common/ns16550.c b/arch/ppc/boot/common/ns16550.c --- a/arch/ppc/boot/common/ns16550.c Sat Aug 23 16:02:05 2003 +++ b/arch/ppc/boot/common/ns16550.c Sat Aug 23 16:02:05 2003 @@ -60,7 +60,7 @@ else { /* Input clock. */ outb(com_port + (UART_DLL << shift), - (BASE_BAUD / SERIAL_BAUD)); + (BASE_BAUD / SERIAL_BAUD) & 0xFF); outb(com_port + (UART_DLM << shift), (BASE_BAUD / SERIAL_BAUD) >> 8); /* 8 data, 1 stop, no parity */ diff -Nru a/arch/ppc/boot/common/util.S b/arch/ppc/boot/common/util.S --- a/arch/ppc/boot/common/util.S Sat Aug 23 16:02:05 2003 +++ b/arch/ppc/boot/common/util.S Sat Aug 23 16:02:05 2003 @@ -160,9 +160,22 @@ blr +/* udelay (on non-601 processors) needs to know the period of the + * timebase in nanoseconds. This used to be hardcoded to be 60ns + * (period of 66MHz/4). Now a variable is used that is initialized to + * 60 for backward compatibility, but it can be overridden as necessary + * with code something like this: + * extern unsigned long timebase_period_ns; + * timebase_period_ns = 1000000000 / bd->bi_tbfreq; + */ + .data + .globl timebase_period_ns +timebase_period_ns: + .long 60 + + .text /* * Delay for a number of microseconds - * -- Use the BUS timer (assumes 66MHz) */ .globl udelay udelay: @@ -180,8 +193,13 @@ .udelay_not_601: mulli r4,r3,1000 /* nanoseconds */ - addi r4,r4,59 - li r5,60 + /* Change r4 to be the number of ticks using: + * (nanoseconds + (timebase_period_ns - 1 )) / timebase_period_ns + * timebase_period_ns defaults to 60 (16.6MHz) */ + lis r5,timebase_period_ns@h + lwz r5,timebase_period_ns@l(r5) + addi r4,r4,r5 + addi r4,r4,-1 divw r4,r4,r5 /* BUS ticks */ 1: mftbu r5 mftb r6 diff -Nru a/arch/ppc/boot/simple/Makefile b/arch/ppc/boot/simple/Makefile --- a/arch/ppc/boot/simple/Makefile Sat Aug 23 16:02:05 2003 +++ b/arch/ppc/boot/simple/Makefile Sat Aug 23 16:02:05 2003 @@ -22,7 +22,6 @@ # get_mem_size(), which is memory controller dependent. Add in the correct # XXX_memory.o file for this to work, as well as editing the $(MISC) file. -boot: zImage boot := arch/ppc/boot common := $(boot)/common @@ -32,86 +31,90 @@ # Normally, we use the 'misc.c' file for decompress_kernel and # whatnot. Sometimes we need to override this however. -MISC := misc.o -ifeq ($(CONFIG_IBM_OPENBIOS),y) -ZIMAGE := zImage-TREE -ZIMAGEINITRD := zImage.initrd-TREE -END := treeboot -TFTPIMAGE := /tftpboot/zImage.$(END) -MISC := misc-embedded.o -endif -ifeq ($(CONFIG_EMBEDDEDBOOT),y) -TFTPIMAGE := /tftpboot/zImage.embedded -MISC := misc-embedded.o -endif -ifeq ($(CONFIG_EBONY),y) -ZIMAGE := zImage-TREE -ZIMAGEINITRD := zImage.initrd-TREE -END := ebony -ENTRYPOINT := 0x01000000 -TFTPIMAGE := /tftpboot/zImage.$(END) -endif -ifeq ($(CONFIG_EV64260),y) -EXTRA := misc-ev64260.o -TFTPIMAGE := /tftpboot/zImage.ev64260 -endif -ifeq ($(CONFIG_GEMINI),y) -ZIMAGE := zImage-STRIPELF -ZIMAGEINITRD := zImage.initrd-STRIPELF -END := gemini -TFTPIMAGE := /tftpboot/zImage.$(END) -endif -ifeq ($(CONFIG_K2),y) -EXTRA := legacy.o -TFTPIMAGE := /tftpboot/zImage.k2 -endif -# kbuild-2.4 'feature', only one of these will ever by 'y' at a time. +misc-y := misc.o + +# +# See arch/ppc/kconfig and arch/ppc/platforms/Kconfig +# for definition of what platform each config option refer to. +#---------------------------------------------------------------------------- + zimage-$(CONFIG_IBM_OPENBIOS) := zImage-TREE +zimageinitrd-$(CONFIG_IBM_OPENBIOS) := zImage.initrd-TREE + end-$(CONFIG_IBM_OPENBIOS) := treeboot + tftpimage-$(CONFIG_IBM_OPENBIOS) := /tftpboot/zImage.$(end-y) + misc-$(CONFIG_IBM_OPENBIOS) := misc-embedded.o + + tftpimage-$(CONFIG_EMBEDDEDBOOT) := /tftpboot/zImage.embedded + misc-$(CONFIG_EMBEDDEDBOOT) := misc-embedded.o + + zimage-$(CONFIG_EBONY) := zImage-TREE +zimageinitrd-$(CONFIG_EBONY) := zImage.initrd-TREE + extra.o-$(CONFIG_EBONY) := direct.o + end-$(CONFIG_EBONY) := ebony + entrypoint-$(CONFIG_EBONY) := 0x01000000 + tftpimage-$(CONFIG_EBONY) := /tftpboot/zImage.$(end-y) + + extra.o-$(CONFIG_EV64260) := direct.o misc-ev64260.o + tftpimage-$(CONFIG_EV64260) := /tftpboot/zImage.ev64260 + + zimage-$(CONFIG_GEMINI) := zImage-STRIPELF +zimageinitrd-$(CONFIG_GEMINI) := zImage.initrd-STRIPELF + end-$(CONFIG_GEMINI) := gemini + tftpimage-$(CONFIG_GEMINI) := /tftpboot/zImage.$(end-y) + + extra.o-$(CONFIG_K2) := legacy.o + tftpimage-$(CONFIG_K2) := /tftpboot/zImage.k2 + +# kconfig 'feature', only one of these will ever by 'y' at a time. # The rest will be unset. -ifeq ($(CONFIG_MCPN765)$(CONFIG_MVME5100)$(CONFIG_PRPMC750)$(CONFIG_PRPMC800)$(CONFIG_LOPEC)$(CONFIG_PPLUS),y) -ZIMAGE := zImage-PPLUS -ZIMAGEINITRD := zImage.initrd-PPLUS -TFTPIMAGE := /tftpboot/zImage.pplus -ZNETBOOT := zImage.pplus -ZNETBOOTRD := zImage.initrd.pplus -endif -ifeq ($(CONFIG_PPLUS),y) -EXTRA := legacy.o -endif -ifeq ($(CONFIG_PCORE)$(CONFIG_POWERPMC250),y) -ZIMAGE := zImage-STRIPELF -ZIMAGEINITRD := zImage.initrd-STRIPELF -EXTRA := chrpmap.o -END := pcore -TFTPIMAGE := /tftpboot/zImage.$(END) -endif -ifeq ($(CONFIG_SANDPOINT),y) -TFTPIMAGE := /tftpboot/zImage.sandpoint -endif -ifeq ($(CONFIG_SPRUCE),y) -ZIMAGE := zImage-TREE -ZIMAGEINITRD := zImage.initrd-TREE -END := spruce -ENTRYPOINT := 0x00800000 -MISC := misc-spruce.o -TFTPIMAGE := /tftpboot/zImage.$(END) -endif -ifeq ($(CONFIG_SMP),y) -TFTPIMAGE += .smp -endif -ifeq ($(CONFIG_REDWOOD_4),y) +multi := $(CONFIG_MCPN765)$(CONFIG_MVME5100)$(CONFIG_PRPMC750) \ +$(CONFIG_PRPMC800)$(CONFIG_LOPEC)$(CONFIG_PPLUS) + zimage-$(multi) := zImage-PPLUS +zimageinitrd-$(multi) := zImage.initrd-PPLUS + tftpimage-$(multi) := /tftpboot/zImage.pplus + znetboot-$(multi) := zImage.pplus + znetbootrd-$(multi) := zImage.initrd.pplus + +# Overrides previous assingment + extra.o-$(CONFIG_PPLUS) := legacy.o + + zimage-$(CONFIG_PCORE) := zImage-STRIPELF +zimageinitrd-$(CONFIG_PCORE) := zImage.initrd-STRIPELF + extra.o-$(CONFIG_PCORE) := chrpmap.o + end-$(CONFIG_PCORE) := pcore + tftpimage-$(CONFIG_PCORE) := /tftpboot/zImage.$(end-y) + + zimage-$(CONFIG_POWERPMC250) := zImage-STRIPELF +zimageinitrd-$(CONFIG_POWERPMC250) := zImage.initrd-STRIPELF + extra.o-$(CONFIG_POWERPMC250) := chrpmap.o + end-$(CONFIG_POWERPMC250) := pcore + tftpimage-$(CONFIG_POWERPMC250) := /tftpboot/zImage.$(end-y) + + tftpimage-$(CONFIG_SANDPOINT) := /tftpboot/zImage.sandpoint + + zimage-$(CONFIG_SPRUCE) := zImage-TREE +zimageinitrd-$(CONFIG_SPRUCE) := zImage.initrd-TREE + end-$(CONFIG_SPRUCE) := spruce + entrypoint-$(CONFIG_SPRUCE) := 0x00800000 + misc-$(CONFIG_SPRUCE) := misc-spruce.o + tftpimage-$(CONFIG_SPRUCE) := /tftpboot/zImage.$(end-y) + + +# tftp image is prefixed with .smp if compiled for SMP +tftpimage-$(CONFIG_SMP) += .smp + # This is a treeboot that needs init functions until the # boot rom is sorted out (i.e. this is short lived) -EXTRA_AFLAGS := -Wa,-m405 -EXTRA := rw4/rw4_init.o rw4/rw4_init_brd.o -endif +extra-aflags-$(CONFIG_REDWOOD_4) := -Wa,-m405 +extra.o-$(CONFIG_REDWOOD_4) := rw4/rw4_init.o rw4/rw4_init_brd.o +EXTRA_AFLAGS := $(extra-aflags-y) # Linker args. This specifies where the image will be run at. -LD_ARGS = -T $(boot)/ld.script \ - -Ttext $(CONFIG_BOOT_LOAD) -Bstatic +LD_ARGS := -T $(boot)/ld.script \ + -Ttext $(CONFIG_BOOT_LOAD) -Bstatic OBJCOPY_ARGS := -O elf32-powerpc # head.o and relocate.o must be at the start. -boot-y := head.o relocate.o $(EXTRA) $(MISC) +boot-y := head.o relocate.o $(extra.o-y) $(misc-y) boot-$(CONFIG_40x) += embed_config.o boot-$(CONFIG_8xx) += embed_config.o boot-$(CONFIG_8260) += embed_config.o @@ -160,40 +163,40 @@ -R .stabstr -R .sysmap # Sort-of dummy rules, that let us format the image we want. -zImage: $(images)/$(ZIMAGE) $(obj)/zvmlinux +zImage: $(images)/$(zimage-y) $(obj)/zvmlinux cp -f $(obj)/zvmlinux $(images)/zImage.elf rm -f $(obj)/zvmlinux -zImage.initrd: $(images)/$(ZIMAGEINITRD) $(obj)/zvmlinux.initrd +zImage.initrd: $(images)/$(zimageinitrd-y) $(obj)/zvmlinux.initrd cp -f $(obj)/zvmlinux.initrd $(images)/zImage.initrd.elf rm -f $(obj)/zvmlinux.initrd znetboot: zImage ifneq ($(ZNETBOOT),) - cp $(images)/$(ZNETBOOT) $(TFTPIMAGE) + cp $(images)/$(ZNETBOOT) $(tftpimage-y) else - cp $(images)/zImage.* $(TFTPIMAGE) + cp $(images)/zImage.* $(tftpimage-y) endif znetboot.initrd: zImage.initrd -ifneq ($(ZNETBOOTRD),) - cp $(images)/$(ZNETBOOTRD) $(TFTPIMAGE) +ifneq ($(znetbootrd-y),) + cp $(images)/$(znetbootrd-y) $(tftpimage-y) else - cp $(images)/zImage.* $(TFTPIMAGE) + cp $(images)/zImage.* $(tftpimage-y) endif $(images)/zImage-STRIPELF: $(obj)/zvmlinux - dd if=$(obj)/zvmlinux of=$(images)/zImage.$(END) skip=64 bs=1k + dd if=$(obj)/zvmlinux of=$(images)/zImage.$(end-y) skip=64 bs=1k $(images)/zImage.initrd-STRIPELF: $(obj)/zvmlinux.initrd - dd if=$(obj)/zvmlinux.initrd of=$(images)/zImage.initrd.$(END) \ + dd if=$(obj)/zvmlinux.initrd of=$(images)/zImage.initrd.$(end-y) \ skip=64 bs=1k $(images)/zImage-TREE: $(obj)/zvmlinux $(MKTREE) - $(MKTREE) $(obj)/zvmlinux $(images)/zImage.$(END) $(ENTRYPOINT) + $(MKTREE) $(obj)/zvmlinux $(images)/zImage.$(end-y) $(ENTRYPOINT) $(images)/zImage.initrd-TREE: $(obj)/zvmlinux.initrd $(MKTREE) - $(MKTREE) $(obj)/zvmlinux.initrd $(images)/zImage.initrd.$(END) \ + $(MKTREE) $(obj)/zvmlinux.initrd $(images)/zImage.initrd.$(end-y) \ $(ENTRYPOINT) $(images)/zImage-PPLUS: $(obj)/zvmlinux $(MKPREP) $(MKBUGBOOT) diff -Nru a/arch/ppc/boot/simple/embed_config.c b/arch/ppc/boot/simple/embed_config.c --- a/arch/ppc/boot/simple/embed_config.c Sat Aug 23 16:02:05 2003 +++ b/arch/ppc/boot/simple/embed_config.c Sat Aug 23 16:02:05 2003 @@ -20,6 +20,7 @@ #ifdef CONFIG_40x #include #endif +extern unsigned long timebase_period_ns; /* For those boards that don't provide one. */ @@ -768,6 +769,7 @@ #if defined(CONFIG_REDWOOD_5) || defined (CONFIG_REDWOOD_6) bd->bi_tbfreq = 27 * 1000 * 1000; #endif + timebase_period_ns = 1000000000 / bd->bi_tbfreq; } #endif /* CONFIG_BEECH */ #endif /* CONFIG_IBM_OPENBIOS */ diff -Nru a/arch/ppc/boot/simple/misc-embedded.c b/arch/ppc/boot/simple/misc-embedded.c --- a/arch/ppc/boot/simple/misc-embedded.c Sat Aug 23 16:02:05 2003 +++ b/arch/ppc/boot/simple/misc-embedded.c Sat Aug 23 16:02:05 2003 @@ -75,7 +75,7 @@ extern void embed_config(bd_t **bp); unsigned long -decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum, bd_t *bp) +load_kernel(unsigned long load_addr, int num_words, unsigned long cksum, bd_t *bp) { char *cp, ch; int timer = 0, zimage_size; diff -Nru a/arch/ppc/boot/simple/misc-spruce.c b/arch/ppc/boot/simple/misc-spruce.c --- a/arch/ppc/boot/simple/misc-spruce.c Sat Aug 23 16:02:05 2003 +++ b/arch/ppc/boot/simple/misc-spruce.c Sat Aug 23 16:02:05 2003 @@ -147,7 +147,7 @@ #define MEM_B2EA 0x60 unsigned long -decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum) +load_kernel(unsigned long load_addr, int num_words, unsigned long cksum) { int timer = 0; char *cp, ch; diff -Nru a/arch/ppc/boot/simple/misc.c b/arch/ppc/boot/simple/misc.c --- a/arch/ppc/boot/simple/misc.c Sat Aug 23 16:02:05 2003 +++ b/arch/ppc/boot/simple/misc.c Sat Aug 23 16:02:05 2003 @@ -252,3 +252,10 @@ return (struct bi_record *)rec_loc; } + +/* Allow decompress_kernel to be hooked into. This is the default. */ +void * __attribute__ ((weak)) +load_kernel(unsigned long load_addr, int num_words, unsigned long cksum) +{ + return decompress_kernel(load_addr, num_words, cksum); +} diff -Nru a/arch/ppc/boot/simple/relocate.S b/arch/ppc/boot/simple/relocate.S --- a/arch/ppc/boot/simple/relocate.S Sat Aug 23 16:02:05 2003 +++ b/arch/ppc/boot/simple/relocate.S Sat Aug 23 16:02:05 2003 @@ -183,7 +183,7 @@ mr r4,r7 /* Program length */ mr r5,r6 /* Checksum */ mr r6,r11 /* Residual data */ - bl decompress_kernel + bl load_kernel /* * Make sure the kernel knows we don't have things set in diff -Nru a/arch/ppc/boot/utils/mktree.c b/arch/ppc/boot/utils/mktree.c --- a/arch/ppc/boot/utils/mktree.c Sat Aug 23 16:02:05 2003 +++ b/arch/ppc/boot/utils/mktree.c Sat Aug 23 16:02:05 2003 @@ -86,7 +86,7 @@ } cksum = 0; - cp = (uint *)&bt; + cp = (void *)&bt; for (i=0; i #include +#include #include #include #include @@ -186,7 +187,7 @@ * return 0. */ static unsigned char * -mem2hex(char *mem, char *buf, int count) +mem2hex(const char *mem, char *buf, int count) { unsigned char ch; unsigned short tmp_s; @@ -828,11 +829,11 @@ return; } - asm(" .globl breakinst - breakinst: .long 0x7d821008 - "); + asm(" .globl breakinst \n\ + breakinst: .long 0x7d821008"); } +#ifdef CONFIG_KGDB_CONSOLE /* Output string in GDB O-packet format if GDB has connected. If nothing output, returns 0 (caller must then handle output). */ int @@ -852,3 +853,4 @@ return 1; } +#endif diff -Nru a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c --- a/arch/ppc/kernel/ppc_ksyms.c Sat Aug 23 16:02:05 2003 +++ b/arch/ppc/kernel/ppc_ksyms.c Sat Aug 23 16:02:05 2003 @@ -200,6 +200,7 @@ EXPORT_SYMBOL(flush_icache_user_range); EXPORT_SYMBOL(flush_dcache_page); EXPORT_SYMBOL(flush_tlb_kernel_range); +EXPORT_SYMBOL(flush_tlb_page); #ifdef CONFIG_ALTIVEC EXPORT_SYMBOL(last_task_used_altivec); EXPORT_SYMBOL(giveup_altivec); diff -Nru a/arch/ppc/kernel/smp.c b/arch/ppc/kernel/smp.c --- a/arch/ppc/kernel/smp.c Sat Aug 23 16:02:05 2003 +++ b/arch/ppc/kernel/smp.c Sat Aug 23 16:02:05 2003 @@ -47,8 +47,8 @@ DEFINE_PER_CPU(unsigned int, prof_multiplier); DEFINE_PER_CPU(unsigned int, prof_counter); unsigned long cache_decay_ticks = HZ/100; -unsigned long cpu_online_map = cpumask_of_cpu(0); -unsigned long cpu_possible_map = 1UL; +cpumask_t cpu_online_map; +cpumask_t cpu_possible_map; int smp_hw_index[NR_CPUS]; struct thread_info *secondary_ti; @@ -336,7 +336,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) { - int num_cpus; + int num_cpus, i; /* Fixup boot cpu */ smp_store_cpu_info(smp_processor_id()); @@ -350,7 +350,8 @@ /* Probe platform for CPUs: always linear. */ num_cpus = smp_ops->probe(); - cpu_possible_map = (1 << num_cpus)-1; + for (i = 0; i < num_cpus; ++i) + cpu_set(i, cpu_possible_map); /* Backup CPU 0 state */ __save_cpu_setup(); diff -Nru a/arch/ppc/kernel/syscalls.c b/arch/ppc/kernel/syscalls.c --- a/arch/ppc/kernel/syscalls.c Sat Aug 23 16:02:05 2003 +++ b/arch/ppc/kernel/syscalls.c Sat Aug 23 16:02:05 2003 @@ -262,4 +262,14 @@ return error; } +/* + * We put the arguments in a different order so we only use 6 + * registers for arguments, rather than 7 as sys_fadvise64_64 needs + * (because `offset' goes in r5/r6). + */ +long ppc_fadvise64_64(int fd, int advice, loff_t offset, loff_t len) +{ + return sys_fadvise64_64(fd, offset, len, advice); +} + cond_syscall(sys_pciconfig_iobase); diff -Nru a/arch/ppc/platforms/mcpn765_serial.h b/arch/ppc/platforms/mcpn765_serial.h --- a/arch/ppc/platforms/mcpn765_serial.h Sat Aug 23 16:02:05 2003 +++ b/arch/ppc/platforms/mcpn765_serial.h Sat Aug 23 16:02:05 2003 @@ -30,7 +30,8 @@ #endif /* Rate for the 1.8432 Mhz clock for the onboard serial chip */ -#define BASE_BAUD ( 1843200 / 16 ) +#define BASE_BAUD ( 1843200 / 16 ) +#define UART_CLK 1843200 #ifdef CONFIG_SERIAL_DETECT_IRQ #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ) diff -Nru a/arch/ppc/platforms/mcpn765_setup.c b/arch/ppc/platforms/mcpn765_setup.c --- a/arch/ppc/platforms/mcpn765_setup.c Sat Aug 23 16:02:05 2003 +++ b/arch/ppc/platforms/mcpn765_setup.c Sat Aug 23 16:02:05 2003 @@ -31,6 +31,9 @@ #include #include #include +#include +#include /* for linux/serial_core.h */ +#include #include #include @@ -49,36 +52,94 @@ #include #include "mcpn765.h" +#include "mcpn765_serial.h" + static u_char mcpn765_openpic_initsenses[] __initdata = { - 0, /* 16: i8259 cascade (active high) */ - 1, /* 17: COM1,2,3,4 */ - 1, /* 18: Enet 1 (front panel) */ - 1, /* 19: HAWK WDT XXXX */ - 1, /* 20: 21554 PCI-PCI bridge */ - 1, /* 21: cPCI INTA# */ - 1, /* 22: cPCI INTB# */ - 1, /* 23: cPCI INTC# */ - 1, /* 24: cPCI INTD# */ - 1, /* 25: PMC1 INTA#, PMC2 INTB# */ - 1, /* 26: PMC1 INTB#, PMC2 INTC# */ - 1, /* 27: PMC1 INTC#, PMC2 INTD# */ - 1, /* 28: PMC1 INTD#, PMC2 INTA# */ - 1, /* 29: Enet 2 (connected to J3) */ - 1, /* 30: Abort Switch */ - 1, /* 31: RTC Alarm */ + (IRQ_SENSE_EDGE | IRQ_POLARITY_POSITIVE),/* 16: i8259 cascade */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 17: COM1,2,3,4 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 18: Enet 1 (front) */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 19: HAWK WDT XXXX */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 20: 21554 bridge */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 21: cPCI INTA# */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 22: cPCI INTB# */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 23: cPCI INTC# */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 24: cPCI INTD# */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 25: PMC1 INTA#,PMC2 INTB#*/ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 26: PMC1 INTB#,PMC2 INTC#*/ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 27: PMC1 INTC#,PMC2 INTD#*/ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 28: PMC1 INTD#,PMC2 INTA#*/ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 29: Enet 2 (J3) */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 30: Abort Switch */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 31: RTC Alarm */ }; extern u_int openpic_irq(void); extern char cmd_line[]; +extern void gen550_progress(char *, unsigned short); +extern void gen550_init(int, struct uart_port *); + int use_of_interrupt_tree = 0; static void mcpn765_halt(void); TODC_ALLOC(); +#if defined(CONFIG_SERIAL_8250) && \ + (defined(CONFIG_KGDB) || defined(CONFIG_SERIAL_TEXT_DEBUG)) +static void __init +mcpn765_early_serial_map(void) +{ + struct uart_port serial_req; + + /* Setup serial port access */ + memset(&serial_req, 0, sizeof(serial_req)); + serial_req.uartclk = UART_CLK; + serial_req.irq = 17; + serial_req.flags = STD_COM_FLAGS; + serial_req.iotype = SERIAL_IO_MEM; + serial_req.membase = (u_char *)MCPN765_SERIAL_1; + serial_req.regshift = 4; + + gen550_init(0, &serial_req); + + if (early_serial_setup(&serial_req) != 0) + printk(KERN_ERR "Early serial init of port 0 failed\n"); + + /* Assume early_serial_setup() doesn't modify serial_req */ + serial_req.line = 1; + serial_req.irq = 17; + serial_req.membase = (u_char *)MCPN765_SERIAL_2; + + gen550_init(1, &serial_req); + + if (early_serial_setup(&serial_req) != 0) + printk(KERN_ERR "Early serial init of port 1 failed\n"); + + /* Assume early_serial_setup() doesn't modify serial_req */ + serial_req.line = 2; + serial_req.irq = 17; + serial_req.membase = (u_char *)MCPN765_SERIAL_3; + + gen550_init(2, &serial_req); + + if (early_serial_setup(&serial_req) != 0) + printk(KERN_ERR "Early serial init of port 2 failed\n"); + + /* Assume early_serial_setup() doesn't modify serial_req */ + serial_req.line = 3; + serial_req.irq = 17; + serial_req.membase = (u_char *)MCPN765_SERIAL_4; + + gen550_init(3, &serial_req); + + if (early_serial_setup(&serial_req) != 0) + printk(KERN_ERR "Early serial init of port 3 failed\n"); +} +#endif + static void __init mcpn765_setup_arch(void) { @@ -187,12 +248,12 @@ if ( ppc_md.progress ) ppc_md.progress("init_irq: enter", 0); - openpic_init(1, NUM_8259_INTERRUPTS, NULL, -1); + openpic_init(NUM_8259_INTERRUPTS); for(i=0; i < NUM_8259_INTERRUPTS; i++) irq_desc[i].handler = &i8259_pic; - i8259_init(NULL); + i8259_init(0); if ( ppc_md.progress ) ppc_md.progress("init_irq: exit", 0); @@ -361,65 +422,15 @@ static __inline__ void mcpn765_set_bat(void) { - unsigned long bat3u, bat3l; - static int mapping_set = 0; - - if (!mapping_set) { - - __asm__ __volatile__( - " lis %0,0xf000\n \ - ori %1,%0,0x002a\n \ - ori %0,%0,0x1ffe\n \ - mtspr 0x21e,%0\n \ - mtspr 0x21f,%1\n \ - isync\n \ - sync " - : "=r" (bat3u), "=r" (bat3l)); - - mapping_set = 1; - } - - return; -} - -#ifdef CONFIG_SERIAL_TEXT_DEBUG -#include -#include -#include - -static struct serial_state rs_table[RS_TABLE_SIZE] = { - SERIAL_PORT_DFNS /* Defined in */ -}; - -static void -mcpn765_progress(char *s, unsigned short hex) -{ - volatile char c; - volatile unsigned long com_port; - u16 shift; - - com_port = rs_table[0].port; - shift = rs_table[0].iomem_reg_shift; - - while ((c = *s++) != 0) { - while ((*((volatile unsigned char *)com_port + - (UART_LSR << shift)) & UART_LSR_THRE) == 0) - ; - *(volatile unsigned char *)com_port = c; - - if (c == '\n') { - while ((*((volatile unsigned char *)com_port + - (UART_LSR << shift)) & UART_LSR_THRE) == 0) - ; - *(volatile unsigned char *)com_port = '\r'; - } - } + mb(); + mtspr(DBAT1U, 0xfe8000fe); + mtspr(DBAT1L, 0xfe80002a); + mb(); } -#endif /* CONFIG_SERIAL_TEXT_DEBUG */ void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, - unsigned long r6, unsigned long r7) + unsigned long r6, unsigned long r7) { parse_bootinfo(find_bootinfo()); @@ -458,11 +469,13 @@ ppc_md.heartbeat_reset = 0; ppc_md.heartbeat_count = 0; -#ifdef CONFIG_SERIAL_TEXT_DEBUG - ppc_md.progress = mcpn765_progress; -#else /* !CONFIG_SERIAL_TEXT_DEBUG */ - ppc_md.progress = NULL; -#endif /* CONFIG_SERIAL_TEXT_DEBUG */ +#if defined(CONFIG_SERIAL_8250) && \ + (defined(CONFIG_KGDB) || defined(CONFIG_SERIAL_TEXT_DEBUG)) + mcpn765_early_serial_map(); +#ifdef CONFIG_SERIAL_TEXT_DEBUG + ppc_md.progress = gen550_progress; +#endif +#endif #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) ppc_ide_md.default_irq = mcpn765_ide_default_irq; diff -Nru a/arch/ppc/platforms/sandpoint.c b/arch/ppc/platforms/sandpoint.c --- a/arch/ppc/platforms/sandpoint.c Sat Aug 23 16:02:05 2003 +++ b/arch/ppc/platforms/sandpoint.c Sat Aug 23 16:02:05 2003 @@ -357,6 +357,21 @@ } /* + * Fix IDE interrupts. + */ +static int __init +sandpoint_fix_winbond_83553(void) +{ + /* Make all 8259 interrupt level sensitive */ + outb(0xf8, 0x4d0); + outb(0xde, 0x4d1); + + return 0; +} + +arch_initcall(sandpoint_fix_winbond_83553); + +/* * Initialize the ISA devices on the Nat'l PC87308VUL SuperIO chip. */ static int __init @@ -390,21 +405,6 @@ } arch_initcall(sandpoint_setup_natl_87308); - -/* - * Fix IDE interrupts. - */ -static int __init -sandpoint_fix_winbond_83553(void) -{ - /* Make all 8259 interrupt level sensitive */ - outb(0xf8, 0x4d0); - outb(0xde, 0x4d1); - - return 0; -} - -arch_initcall(sandpoint_fix_winbond_83553); static int __init sandpoint_request_io(void) diff -Nru a/arch/ppc/platforms/sandpoint.h b/arch/ppc/platforms/sandpoint.h --- a/arch/ppc/platforms/sandpoint.h Sat Aug 23 16:02:05 2003 +++ b/arch/ppc/platforms/sandpoint.h Sat Aug 23 16:02:05 2003 @@ -61,9 +61,9 @@ #define UART_CLK 1843200 #ifdef CONFIG_SERIAL_DETECT_IRQ -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ) +#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_AUTO_IRQ) #else -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST) +#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF) #endif #define STD_SERIAL_PORT_DFNS \ diff -Nru a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c --- a/drivers/ide/ide-cd.c Sat Aug 23 16:02:05 2003 +++ b/drivers/ide/ide-cd.c Sat Aug 23 16:02:05 2003 @@ -794,16 +794,16 @@ request or data protect error.*/ ide_dump_status (drive, "command error", stat); do_end_request = 1; - } else if ((err & ~ABRT_ERR) != 0) { - /* Go to the default handler - for other errors. */ - DRIVER(drive)->error(drive, "cdrom_decode_status",stat); - return 1; } else if (sense_key == MEDIUM_ERROR) { /* No point in re-trying a zillion times on a bad * sector... If we got here the error is not correctable */ ide_dump_status (drive, "media error (bad sector)", stat); do_end_request = 1; + } else if ((err & ~ABRT_ERR) != 0) { + /* Go to the default handler + for other errors. */ + DRIVER(drive)->error(drive, "cdrom_decode_status",stat); + return 1; } else if ((++rq->errors > ERROR_MAX)) { /* We've racked up too many retries. Abort. */ do_end_request = 1; diff -Nru a/drivers/input/input.c b/drivers/input/input.c --- a/drivers/input/input.c Sat Aug 23 16:02:05 2003 +++ b/drivers/input/input.c Sat Aug 23 16:02:05 2003 @@ -280,7 +280,7 @@ if (id->id.product != dev->id.product) continue; - if (id->flags & INPUT_DEVICE_ID_MATCH_BUS) + if (id->flags & INPUT_DEVICE_ID_MATCH_VERSION) if (id->id.version != dev->id.version) continue; diff -Nru a/include/asm-ppc/cpm_8260.h b/include/asm-ppc/cpm_8260.h --- a/include/asm-ppc/cpm_8260.h Sat Aug 23 16:02:05 2003 +++ b/include/asm-ppc/cpm_8260.h Sat Aug 23 16:02:05 2003 @@ -195,7 +195,7 @@ /* SMC uart mode register (Internal memory map). */ -#define SMCMR_REN ((ushort)0x0001) +#define SMCMR_REN ((ushort)0x0001) #define SMCMR_TEN ((ushort)0x0002) #define SMCMR_DM ((ushort)0x000c) #define SMCMR_SM_GCI ((ushort)0x0000) @@ -212,10 +212,12 @@ /* SMC Event and Mask register. */ -#define SMCM_TXE ((unsigned char)0x10) -#define SMCM_BSY ((unsigned char)0x04) -#define SMCM_TX ((unsigned char)0x02) -#define SMCM_RX ((unsigned char)0x01) +#define SMCM_BRKE ((unsigned char)0x40) /* When in UART Mode */ +#define SMCM_BRK ((unsigned char)0x10) /* When in UART Mode */ +#define SMCM_TXE ((unsigned char)0x10) +#define SMCM_BSY ((unsigned char)0x04) +#define SMCM_TX ((unsigned char)0x02) +#define SMCM_RX ((unsigned char)0x01) /* Baud rate generators. */ @@ -314,10 +316,10 @@ /* SCC Event and Mask register. */ -#define SCCM_TXE ((unsigned char)0x10) -#define SCCM_BSY ((unsigned char)0x04) -#define SCCM_TX ((unsigned char)0x02) -#define SCCM_RX ((unsigned char)0x01) +#define SCCM_TXE ((unsigned char)0x10) +#define SCCM_BSY ((unsigned char)0x04) +#define SCCM_TX ((unsigned char)0x02) +#define SCCM_RX ((unsigned char)0x01) typedef struct scc_param { ushort scc_rbase; /* Rx Buffer descriptor base address */ diff -Nru a/include/asm-ppc/processor.h b/include/asm-ppc/processor.h --- a/include/asm-ppc/processor.h Sat Aug 23 16:02:05 2003 +++ b/include/asm-ppc/processor.h Sat Aug 23 16:02:05 2003 @@ -654,6 +654,7 @@ */ #define EISA_bus 0 #define MCA_bus 0 +#define MCA_bus__is_a_macro /* Lazy FPU handling on uni-processor */ extern struct task_struct *last_task_used_math; diff -Nru a/include/asm-ppc/unistd.h b/include/asm-ppc/unistd.h --- a/include/asm-ppc/unistd.h Sat Aug 23 16:02:05 2003 +++ b/include/asm-ppc/unistd.h Sat Aug 23 16:02:05 2003 @@ -258,8 +258,9 @@ #define __NR_utimes 251 #define __NR_statfs64 252 #define __NR_fstatfs64 253 +#define __NR_fadvise64_64 254 -#define __NR_syscalls 254 +#define __NR_syscalls 255 #define __NR(n) #n diff -Nru a/sound/pcmcia/vx/vx_entry.c b/sound/pcmcia/vx/vx_entry.c --- a/sound/pcmcia/vx/vx_entry.c Sat Aug 23 16:02:05 2003 +++ b/sound/pcmcia/vx/vx_entry.c Sat Aug 23 16:02:05 2003 @@ -34,10 +34,8 @@ static int vxpocket_event(event_t event, int priority, event_callback_args_t *args); -static void vxpocket_release(u_long arg) +static void vxpocket_release(dev_link_t* link) { - dev_link_t *link = (dev_link_t *)arg; - if (link->state & DEV_CONFIG) { /* release cs resources */ CardServices(ReleaseConfiguration, link->handle); @@ -56,7 +54,7 @@ struct snd_vxp_entry *hw; dev_link_t *link = &vxp->link; - vxpocket_release((u_long)link); + vxpocket_release(link); /* Break the link with Card Services */ if (link->handle) @@ -148,9 +146,6 @@ link->irq.Handler = &snd_vx_irq_handler; link->irq.Instance = chip; - link->release.function = &vxpocket_release; - link->release.data = (u_long)link; - link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.Vcc = 50; link->conf.IntType = INT_MEMORY_AND_IO; @@ -229,8 +224,6 @@ { vx_core_t *chip = snd_magic_cast(vx_core_t, link->priv, return); - del_timer(&link->release); - snd_printdd(KERN_DEBUG "vxpocket_detach called\n"); /* Remove the interface data from the linked list */ if (hw) { @@ -326,7 +319,6 @@ snd_printdd(KERN_DEBUG "CARD_REMOVAL..\n"); link->state &= ~DEV_PRESENT; if (link->state & DEV_CONFIG) { - mod_timer(&link->release, jiffies + HZ/20); chip->chip_status |= VX_STAT_IS_STALE; } break;