summaryrefslogtreecommitdiffstats
path: root/arch/ppc
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-07-05 23:09:37 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-07-05 23:09:37 +0000
commitaba344fdfed81b2c03d6114c54cfd73a486aa10b (patch)
treed032d8430bf1234c3ecc6f6330d6de6e887e5963 /arch/ppc
parent40c138bfc6d37dbff5339f84575db1e3cec6e34e (diff)
Merge with Linux 2.3.9.
Diffstat (limited to 'arch/ppc')
-rw-r--r--arch/ppc/Makefile6
-rw-r--r--arch/ppc/apus_defconfig2
-rw-r--r--arch/ppc/chrpboot/Makefile3
-rw-r--r--arch/ppc/chrpboot/main.c8
-rw-r--r--arch/ppc/coffboot/Makefile1
-rw-r--r--arch/ppc/common_defconfig12
-rw-r--r--arch/ppc/config.in2
-rw-r--r--arch/ppc/defconfig42
-rw-r--r--arch/ppc/kernel/Makefile6
-rw-r--r--arch/ppc/kernel/chrp_pci.c3
-rw-r--r--arch/ppc/kernel/chrp_setup.c37
-rw-r--r--arch/ppc/kernel/idle.c2
-rw-r--r--arch/ppc/kernel/irq.c6
-rw-r--r--arch/ppc/kernel/mbx_setup.c6
-rw-r--r--arch/ppc/kernel/misc.S12
-rw-r--r--arch/ppc/kernel/mk_defs.c1
-rw-r--r--arch/ppc/kernel/pmac_setup.c44
-rw-r--r--arch/ppc/kernel/ppc_htab.c7
-rw-r--r--arch/ppc/kernel/ppc_ksyms.c26
-rw-r--r--arch/ppc/kernel/prep_setup.c11
-rw-r--r--arch/ppc/kernel/process.c1
-rw-r--r--arch/ppc/kernel/prom.c8
-rw-r--r--arch/ppc/kernel/setup.c13
-rw-r--r--arch/ppc/kernel/signal.c1
-rw-r--r--arch/ppc/kernel/smp.c35
-rw-r--r--arch/ppc/kernel/syscalls.c7
-rw-r--r--arch/ppc/kernel/time.c14
-rw-r--r--arch/ppc/mbx_defconfig2
-rw-r--r--arch/ppc/mm/init.c25
-rw-r--r--arch/ppc/pmac_defconfig2
-rw-r--r--arch/ppc/xmon/start.c2
-rw-r--r--arch/ppc/xmon/xmon.c10
32 files changed, 220 insertions, 137 deletions
diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile
index e150d9325..25a2a0fb7 100644
--- a/arch/ppc/Makefile
+++ b/arch/ppc/Makefile
@@ -22,7 +22,8 @@ ASFLAGS =
LINKFLAGS = -T arch/ppc/vmlinux.lds -Ttext $(KERNELLOAD) -Bstatic
CFLAGSINC = -D__KERNEL__ -I$(TOPDIR)/include -D__powerpc__
CFLAGS := $(CFLAGS) -D__powerpc__ -fsigned-char -msoft-float -pipe \
- -fno-builtin -ffixed-r2 -Wno-uninitialized -mmultiple -mstring
+ -fno-builtin -ffixed-r2 -Wno-uninitialized -mmultiple \
+ -mstring
CPP = $(CC) -E $(CFLAGS)
ifdef CONFIG_8xx
@@ -30,8 +31,7 @@ CFLAGS := $(CFLAGS) -mcpu=860
endif
ifdef CONFIG_PPC64
-CFLAGS := $(CFLAGS) -Wa,-mppc64bridge #-Wa,-mppc64
-#CFLAGS := $(CFLAGS) -Wa,-mppc64 -mpowerpc64
+CFLAGS := $(CFLAGS) -Wa,-mppc64bridge #-mpowerpc64
endif
HEAD := arch/ppc/kernel/head.o
diff --git a/arch/ppc/apus_defconfig b/arch/ppc/apus_defconfig
index 5e75d496a..f86dbd55e 100644
--- a/arch/ppc/apus_defconfig
+++ b/arch/ppc/apus_defconfig
@@ -76,7 +76,7 @@ CONFIG_BLK_DEV_IDEFLOPPY=y
CONFIG_BLK_DEV_IDE_PMAC=y
CONFIG_BLK_DEV_IDEDMA_PMAC=y
CONFIG_BLK_DEV_IDEDMA=y
-CONFIG_PMAC_IDEDMA_AUTO=y
+CONFIG_IDEDMA_PMAC_AUTO=y
# CONFIG_IDE_CHIPSETS is not set
#
diff --git a/arch/ppc/chrpboot/Makefile b/arch/ppc/chrpboot/Makefile
index 53e30d65d..eb4720927 100644
--- a/arch/ppc/chrpboot/Makefile
+++ b/arch/ppc/chrpboot/Makefile
@@ -70,6 +70,9 @@ zImage: $(OBJS) no_initrd.o mknote
./mknote > note
$(OBJCOPY) $@ $@ --add-section=.note=note -R .comment
+mknote: mknote.c
+ $(HOSTCC) $(HOSTCFLAGS) -o $@ mknote.c
+
zImage.initrd: $(OBJS) initrd.o
$(LD) $(LD_ARGS) -o $@ $(OBJS) initrd.o $(LIBS)
diff --git a/arch/ppc/chrpboot/main.c b/arch/ppc/chrpboot/main.c
index 7d141d5c3..210dd43ad 100644
--- a/arch/ppc/chrpboot/main.c
+++ b/arch/ppc/chrpboot/main.c
@@ -19,12 +19,13 @@ void gunzip(void *, int, unsigned char *, int *);
#define RAM_START 0x00000000
#define RAM_END (8<<20)
-#define RAM_FREE (6<<20) /* after image of chrpboot */
+#define RAM_FREE ((unsigned long)(_end+0x1000)&~0xFFF)
#define PROG_START 0x00010000
char *avail_ram;
char *end_avail;
+extern char _end[];
extern char image_data[];
extern int image_len;
extern char initrd_data[];
@@ -47,8 +48,8 @@ chrpboot(int a1, int a2, void *prom)
initrd_start = (RAM_END - initrd_size) & ~0xFFF;
a1 = initrd_start;
a2 = initrd_size;
- printf("initial ramdisk at 0x%x (%u bytes)\n\r", initrd_start,
- initrd_size);
+ printf("initial ramdisk moving 0x%x <- 0x%x (%x bytes)\n\r", initrd_start,
+ initrd_data,initrd_size);
memcpy((char *)initrd_start, initrd_data, initrd_size);
end_avail = (char *)initrd_start;
} else
@@ -56,7 +57,6 @@ chrpboot(int a1, int a2, void *prom)
im = image_data;
len = image_len;
dst = (void *) PROG_START;
-
if (im[0] == 0x1f && im[1] == 0x8b) {
avail_ram = (char *)RAM_FREE;
printf("gunzipping (0x%x <- 0x%x:0x%0x)...", dst, im, im+len);
diff --git a/arch/ppc/coffboot/Makefile b/arch/ppc/coffboot/Makefile
index 915171746..81e21f3e3 100644
--- a/arch/ppc/coffboot/Makefile
+++ b/arch/ppc/coffboot/Makefile
@@ -3,7 +3,6 @@
#
# Paul Mackerras January 1997
-HOSTCC = gcc
HOSTCFLAGS = -O -I$(TOPDIR)/include
CC = $(CROSS_COMPILE)gcc
diff --git a/arch/ppc/common_defconfig b/arch/ppc/common_defconfig
index 7a9d6128a..9739f20da 100644
--- a/arch/ppc/common_defconfig
+++ b/arch/ppc/common_defconfig
@@ -81,13 +81,13 @@ CONFIG_BLK_DEV_SL82C105=y
CONFIG_BLK_DEV_IDE_PMAC=y
CONFIG_BLK_DEV_IDEDMA_PMAC=y
CONFIG_BLK_DEV_IDEDMA=y
-CONFIG_PMAC_IDEDMA_AUTO=y
+CONFIG_IDEDMA_PMAC_AUTO=y
# CONFIG_IDE_CHIPSETS is not set
#
# Additional Block Devices
#
-# CONFIG_BLK_DEV_LOOP is not set
+CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_MD is not set
CONFIG_BLK_DEV_RAM=y
@@ -131,6 +131,7 @@ CONFIG_SKB_LARGE=y
#
# CONFIG_IPX is not set
CONFIG_ATALK=m
+# CONFIG_DECNET is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_BRIDGE is not set
@@ -176,7 +177,8 @@ CONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AHA1740 is not set
CONFIG_SCSI_AIC7XXX=y
-# CONFIG_OVERRIDE_CMDS is not set
+# CONFIG_AIC7XXX_TCQ_ON_BY_DEFAULT is not set
+CONFIG_AIC7XXX_CMDS_PER_DEVICE=8
CONFIG_AIC7XXX_PROC_STATS=y
CONFIG_AIC7XXX_RESET_DELAY=15
# CONFIG_SCSI_ADVANSYS is not set
@@ -311,7 +313,7 @@ CONFIG_FB_CT65550=y
CONFIG_FB_MATROX=y
# CONFIG_FB_MATROX_MILLENIUM is not set
CONFIG_FB_MATROX_MYSTIQUE=y
-# CONFIG_FB_MATROX_G100 is not set
+CONFIG_FB_MATROX_G100=y
# CONFIG_FB_MATROX_MULTIHEAD is not set
# CONFIG_FB_ATY is not set
# CONFIG_FB_VIRTUAL is not set
@@ -425,6 +427,7 @@ CONFIG_LOCKD=y
CONFIG_MAC_PARTITION=y
# CONFIG_SMD_DISKLABEL is not set
# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_SGI_DISKLABEL is not set
# CONFIG_UNIXWARE_DISKLABEL is not set
CONFIG_NLS=y
@@ -464,6 +467,7 @@ CONFIG_NLS_CODEPAGE_437=y
#
CONFIG_SOUND=y
CONFIG_DMASOUND=y
+# CONFIG_SOUND_CMPCI is not set
# CONFIG_SOUND_ES1370 is not set
# CONFIG_SOUND_ES1371 is not set
# CONFIG_SOUND_SONICVIBES is not set
diff --git a/arch/ppc/config.in b/arch/ppc/config.in
index b5a02f1d1..05c69f6c4 100644
--- a/arch/ppc/config.in
+++ b/arch/ppc/config.in
@@ -65,7 +65,6 @@ bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
define_bool CONFIG_BINFMT_ELF y
define_bool CONFIG_KERNEL_ELF y
tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-tristate 'Kernel support for JAVA binaries (obsolete)' CONFIG_BINFMT_JAVA
tristate 'Parallel port support' CONFIG_PARPORT
if [ "$CONFIG_PARPORT" != "n" ]; then
@@ -176,7 +175,6 @@ source drivers/video/Config.in
endmenu
source drivers/char/Config.in
-source drivers/usb/Config.in
source fs/Config.in
mainmenu_option next_comment
diff --git a/arch/ppc/defconfig b/arch/ppc/defconfig
index d746c7e64..6b12d2309 100644
--- a/arch/ppc/defconfig
+++ b/arch/ppc/defconfig
@@ -35,7 +35,6 @@ CONFIG_SYSVIPC=y
CONFIG_BINFMT_ELF=y
CONFIG_KERNEL_ELF=y
# CONFIG_BINFMT_MISC is not set
-# CONFIG_BINFMT_JAVA is not set
# CONFIG_PARPORT is not set
CONFIG_VGA_CONSOLE=y
CONFIG_FB=y
@@ -81,13 +80,13 @@ CONFIG_BLK_DEV_SL82C105=y
CONFIG_BLK_DEV_IDE_PMAC=y
CONFIG_BLK_DEV_IDEDMA_PMAC=y
CONFIG_BLK_DEV_IDEDMA=y
-CONFIG_PMAC_IDEDMA_AUTO=y
+CONFIG_IDEDMA_PMAC_AUTO=y
# CONFIG_IDE_CHIPSETS is not set
#
# Additional Block Devices
#
-# CONFIG_BLK_DEV_LOOP is not set
+CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_MD is not set
CONFIG_BLK_DEV_RAM=y
@@ -131,6 +130,7 @@ CONFIG_SKB_LARGE=y
#
# CONFIG_IPX is not set
CONFIG_ATALK=m
+# CONFIG_DECNET is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_BRIDGE is not set
@@ -176,7 +176,8 @@ CONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AHA1740 is not set
CONFIG_SCSI_AIC7XXX=y
-# CONFIG_OVERRIDE_CMDS is not set
+# CONFIG_AIC7XXX_TCQ_ON_BY_DEFAULT is not set
+CONFIG_AIC7XXX_CMDS_PER_DEVICE=8
CONFIG_AIC7XXX_PROC_STATS=y
CONFIG_AIC7XXX_RESET_DELAY=15
# CONFIG_SCSI_ADVANSYS is not set
@@ -311,7 +312,7 @@ CONFIG_FB_CT65550=y
CONFIG_FB_MATROX=y
# CONFIG_FB_MATROX_MILLENIUM is not set
CONFIG_FB_MATROX_MYSTIQUE=y
-# CONFIG_FB_MATROX_G100 is not set
+CONFIG_FB_MATROX_G100=y
# CONFIG_FB_MATROX_MULTIHEAD is not set
# CONFIG_FB_ATY is not set
# CONFIG_FB_VIRTUAL is not set
@@ -425,6 +426,7 @@ CONFIG_LOCKD=y
CONFIG_MAC_PARTITION=y
# CONFIG_SMD_DISKLABEL is not set
# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_SGI_DISKLABEL is not set
# CONFIG_UNIXWARE_DISKLABEL is not set
CONFIG_NLS=y
@@ -464,12 +466,40 @@ CONFIG_NLS_CODEPAGE_437=y
#
CONFIG_SOUND=y
CONFIG_DMASOUND=y
+# CONFIG_SOUND_CMPCI is not set
# CONFIG_SOUND_ES1370 is not set
# CONFIG_SOUND_ES1371 is not set
# CONFIG_SOUND_SONICVIBES is not set
# CONFIG_SOUND_MSNDCLAS is not set
# CONFIG_SOUND_MSNDPIN is not set
-# CONFIG_SOUND_OSS is not set
+CONFIG_SOUND_OSS=y
+# CONFIG_SOUND_DMAP is not set
+# CONFIG_SOUND_PAS is not set
+# CONFIG_SOUND_SB is not set
+# CONFIG_SOUND_ADLIB is not set
+# CONFIG_SOUND_GUS is not set
+# CONFIG_SOUND_MPU401 is not set
+# CONFIG_SOUND_PSS is not set
+# CONFIG_SOUND_MSS is not set
+# CONFIG_SOUND_SSCAPE is not set
+# CONFIG_SOUND_TRIX is not set
+# CONFIG_SOUND_MAD16 is not set
+# CONFIG_SOUND_WAVEFRONT is not set
+CONFIG_SOUND_CS4232=m
+# CONFIG_SOUND_OPL3SA2 is not set
+# CONFIG_SOUND_MAUI is not set
+# CONFIG_SOUND_SGALAXY is not set
+# CONFIG_SOUND_AD1816 is not set
+# CONFIG_SOUND_OPL3SA1 is not set
+# CONFIG_SOUND_SOFTOSS is not set
+# CONFIG_SOUND_YM3812 is not set
+# CONFIG_SOUND_VMIDI is not set
+# CONFIG_SOUND_UART6850 is not set
+
+#
+# Additional low level sound drivers
+#
+# CONFIG_LOWLEVEL_SOUND is not set
#
# Kernel hacking
diff --git a/arch/ppc/kernel/Makefile b/arch/ppc/kernel/Makefile
index 1be8c322a..635dd91b5 100644
--- a/arch/ppc/kernel/Makefile
+++ b/arch/ppc/kernel/Makefile
@@ -56,16 +56,16 @@ ppc_defs.h: mk_defs.c ppc_defs.head \
$(TOPDIR)/include/asm/processor.h \
$(TOPDIR)/include/asm/pgtable.h \
$(TOPDIR)/include/asm/ptrace.h
- $(CC) ${CFLAGS} -S mk_defs.c
+ $(CC) $(CFLAGS) -S mk_defs.c
cp ppc_defs.head ppc_defs.h
grep '^#define' mk_defs.s >>ppc_defs.h
rm mk_defs.s
find_name : find_name.c
- $(HOSTCC) -o find_name find_name.c
+ $(HOSTCC) $(HOSTCFLAGS) -o find_name find_name.c
checks: checks.c
- $(HOSTCC) ${CFLAGS} -D__KERNEL__ -o checks checks.c
+ $(HOSTCC) $(HOSTCFLAGS) -D__KERNEL__ -o checks checks.c
./checks
include $(TOPDIR)/Rules.make
diff --git a/arch/ppc/kernel/chrp_pci.c b/arch/ppc/kernel/chrp_pci.c
index 575b65918..c82671947 100644
--- a/arch/ppc/kernel/chrp_pci.c
+++ b/arch/ppc/kernel/chrp_pci.c
@@ -354,7 +354,8 @@ chrp_setup_pci_ptrs(void)
}
else
{
- if ( !strncmp("IBM,7043-150", get_property(find_path_device("/"), "name", NULL),12) )
+ if ( !strncmp("IBM,7043-150", get_property(find_path_device("/"), "name", NULL),12) ||
+ !strncmp("IBM,7046-155", get_property(find_path_device("/"), "name", NULL),12) )
{
pci_dram_offset = 0;
isa_mem_base = 0x80000000;
diff --git a/arch/ppc/kernel/chrp_setup.c b/arch/ppc/kernel/chrp_setup.c
index 25c262d0e..1653ef0d7 100644
--- a/arch/ppc/kernel/chrp_setup.c
+++ b/arch/ppc/kernel/chrp_setup.c
@@ -48,6 +48,7 @@
#include <asm/irq.h>
#include <asm/adb.h>
#include <asm/hydra.h>
+#include <asm/keyboard.h>
#include "time.h"
#include "local_irq.h"
@@ -66,7 +67,6 @@ extern volatile unsigned char *chrp_int_ack_special;
unsigned long chrp_get_rtc_time(void);
int chrp_set_rtc_time(unsigned long nowtime);
-unsigned long rtas_event_scan_rate = 0, rtas_event_scan_ct = 0;
void chrp_calibrate_decr(void);
void chrp_time_init(void);
@@ -281,7 +281,7 @@ __initfunc(void
/*
* Fix the Super I/O configuration
*/
- /*sio_init();*/
+ sio_init();
#ifdef CONFIG_DUMMY_CONSOLE
conswitchp = &dummy_con;
#endif
@@ -295,15 +295,16 @@ __initfunc(void
struct property *p;
device = find_devices("rtas");
for ( p = device->properties;
- strncmp(p->name, "rtas-event-scan-rate", 20) && p ;
+ p && strncmp(p->name, "rtas-event-scan-rate", 20);
p = p->next )
/* nothing */ ;
if ( p && *(unsigned long *)p->value )
{
- rtas_event_scan_rate = (HZ/(*(unsigned long *)p->value)*30)-1;
- rtas_event_scan_ct = 1;
+ ppc_md.heartbeat = chrp_event_scan;
+ ppc_md.heartbeat_reset = (HZ/(*(unsigned long *)p->value)*30)-1;
+ ppc_md.heartbeat_count = 1;
printk("RTAS Event Scan Rate: %lu (%lu jiffies)\n",
- *(unsigned long *)p->value, rtas_event_scan_rate );
+ *(unsigned long *)p->value, ppc_md.heartbeat_reset );
}
}
}
@@ -312,11 +313,8 @@ void
chrp_event_scan(void)
{
unsigned char log[1024];
- if ( rtas_event_scan_rate && (rtas_event_scan_ct-- <= 0) )
- {
- call_rtas( "event-scan", 4, 1, NULL, 0x0, 1, __pa(log), 1024 );
- rtas_event_scan_ct = rtas_event_scan_rate;
- }
+ call_rtas( "event-scan", 4, 1, NULL, 0x0, 1, __pa(log), 1024 );
+ ppc_md.heartbeat_count = ppc_md.heartbeat_reset;
}
void
@@ -331,7 +329,7 @@ void
chrp_power_off(void)
{
/* allow power on only with power button press */
-#define PWR_FIELD(x) (0x8000000000000000 >> ((x)-96))
+#define PWR_FIELD(x) (0x8000000000000000ULL >> ((x)-96))
printk("RTAS power-off returned %d\n",
call_rtas("power-off", 2, 1, NULL,
((PWR_FIELD(96)|PWR_FIELD(97))>>32)&0xffffffff,
@@ -632,7 +630,8 @@ __initfunc(void
ppc_md.kbd_leds = pckbd_leds;
ppc_md.kbd_init_hw = pckbd_init_hw;
#ifdef CONFIG_MAGIC_SYSRQ
- ppc_md.kbd_sysrq_xlate = pckbd_sysrq_xlate;
+ ppc_md.ppc_kbd_sysrq_xlate = pckbd_sysrq_xlate;
+ SYSRQ_KEY = 0x54;
#endif
}
else
@@ -644,7 +643,8 @@ __initfunc(void
ppc_md.kbd_leds = mackbd_leds;
ppc_md.kbd_init_hw = mackbd_init_hw;
#ifdef CONFIG_MAGIC_SYSRQ
- ppc_md.kbd_sysrq_xlate = mackbd_sysrq_xlate;
+ ppc_md.ppc_kbd_sysrq_xlate = mackbd_sysrq_xlate;
+ SYSRQ_KEY = 0x69;
#endif
}
#else
@@ -655,7 +655,8 @@ __initfunc(void
ppc_md.kbd_leds = pckbd_leds;
ppc_md.kbd_init_hw = pckbd_init_hw;
#ifdef CONFIG_MAGIC_SYSRQ
- ppc_md.kbd_sysrq_xlate = pckbd_sysrq_xlate;
+ ppc_md.ppc_kbd_sysrq_xlate = pckbd_sysrq_xlate;
+ SYSRQ_KEY = 0x54;
#endif
#endif
#endif
@@ -665,9 +666,9 @@ __initfunc(void
ppc_ide_md.outsw = chrp_ide_outsw;
ppc_ide_md.default_irq = chrp_ide_default_irq;
ppc_ide_md.default_io_base = chrp_ide_default_io_base;
- ppc_ide_md.check_region = chrp_ide_check_region;
- ppc_ide_md.request_region = chrp_ide_request_region;
- ppc_ide_md.release_region = chrp_ide_release_region;
+ ppc_ide_md.ide_check_region = chrp_ide_check_region;
+ ppc_ide_md.ide_request_region = chrp_ide_request_region;
+ ppc_ide_md.ide_release_region = chrp_ide_release_region;
ppc_ide_md.fix_driveid = chrp_ide_fix_driveid;
ppc_ide_md.ide_init_hwif = chrp_ide_init_hwif_ports;
diff --git a/arch/ppc/kernel/idle.c b/arch/ppc/kernel/idle.c
index 38ac7d108..9d8d94e51 100644
--- a/arch/ppc/kernel/idle.c
+++ b/arch/ppc/kernel/idle.c
@@ -298,7 +298,7 @@ void power_save(void)
case 7: /* 603ev */
case 8: /* 750 */
save_flags(msr);
- cli();
+ __cli();
if (!current->need_resched) {
asm("mfspr %0,1008" : "=r" (hid0) :);
hid0 &= ~(HID0_NAP | HID0_SLEEP | HID0_DOZE);
diff --git a/arch/ppc/kernel/irq.c b/arch/ppc/kernel/irq.c
index 732a87f69..b9cdca892 100644
--- a/arch/ppc/kernel/irq.c
+++ b/arch/ppc/kernel/irq.c
@@ -189,6 +189,12 @@ void free_irq(unsigned int irq, void *dev_id)
request_irq(irq, NULL, 0, NULL, dev_id);
}
+/* XXX should implement irq disable depth like on intel */
+void disable_irq_nosync(unsigned int irq_nr)
+{
+ mask_irq(irq_nr);
+}
+
void disable_irq(unsigned int irq_nr)
{
mask_irq(irq_nr);
diff --git a/arch/ppc/kernel/mbx_setup.c b/arch/ppc/kernel/mbx_setup.c
index 40f016fb5..fdb9c11e0 100644
--- a/arch/ppc/kernel/mbx_setup.c
+++ b/arch/ppc/kernel/mbx_setup.c
@@ -473,9 +473,9 @@ mbx_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_ide_md.outsw = mbx_ide_outsw;
ppc_ide_md.default_irq = mbx_ide_default_irq;
ppc_ide_md.default_io_base = mbx_ide_default_io_base;
- ppc_ide_md.check_region = mbx_ide_check_region;
- ppc_ide_md.request_region = mbx_ide_request_region;
- ppc_ide_md.release_region = mbx_ide_release_region;
+ ppc_ide_md.ide_check_region = mbx_ide_check_region;
+ ppc_ide_md.ide_request_region = mbx_ide_request_region;
+ ppc_ide_md.ide_release_region = mbx_ide_release_region;
ppc_ide_md.fix_driveid = mbx_ide_fix_driveid;
ppc_ide_md.ide_init_hwif = mbx_ide_init_hwif_ports;
diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S
index 7e2db0843..0caf06a3b 100644
--- a/arch/ppc/kernel/misc.S
+++ b/arch/ppc/kernel/misc.S
@@ -650,17 +650,19 @@ __clear_msr_me:
/*
* Create a kernel thread
- * __kernel_thread(flags, fn, arg)
+ * kernel_thread(fn, arg, flags)
*/
-_GLOBAL(__kernel_thread)
+_GLOBAL(kernel_thread)
+ mr r6,r3 /* function */
+ ori r3,r5,CLONE_VM /* flags */
li r0,__NR_clone
sc
cmpi 0,r3,0 /* parent or child? */
bnelr /* return if parent */
li r0,0 /* clear out p->tss.regs */
stw r0,TSS+PT_REGS(r2) /* since we don't have user ctx */
- mtlr r4 /* fn addr in lr */
- mr r3,r5 /* load arg and call fn */
+ mtlr r6 /* fn addr in lr */
+ mr r3,r4 /* load arg and call fn */
blrl
li r0,__NR_exit /* exit after child exits */
li r3,0
@@ -866,7 +868,7 @@ sys_call_table:
.long sys_getresuid /* 165 */
.long sys_query_module
.long sys_poll
-#ifdef CONFIG_NFS
+#ifdef CONFIG_NFSD
.long sys_nfsservctl
#else
.long sys_ni_syscall
diff --git a/arch/ppc/kernel/mk_defs.c b/arch/ppc/kernel/mk_defs.c
index b66ccffa8..a3977193a 100644
--- a/arch/ppc/kernel/mk_defs.c
+++ b/arch/ppc/kernel/mk_defs.c
@@ -97,5 +97,6 @@ main(void)
DEFINE(ORIG_GPR3, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, orig_gpr3));
DEFINE(RESULT, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, result));
DEFINE(TRAP, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, trap));
+ DEFINE(CLONE_VM, CLONE_VM);
return 0;
}
diff --git a/arch/ppc/kernel/pmac_setup.c b/arch/ppc/kernel/pmac_setup.c
index afa1227a7..ffdc316ed 100644
--- a/arch/ppc/kernel/pmac_setup.c
+++ b/arch/ppc/kernel/pmac_setup.c
@@ -42,6 +42,7 @@
#include <linux/vt_kern.h>
#include <linux/console.h>
#include <linux/ide.h>
+#include <linux/pci.h>
#include <asm/prom.h>
#include <asm/system.h>
#include <asm/pgtable.h>
@@ -56,6 +57,7 @@
#include <asm/feature.h>
#include <asm/ide.h>
#include <asm/machdep.h>
+#include <asm/keyboard.h>
#include "time.h"
#include "local_irq.h"
@@ -98,6 +100,7 @@ extern char saved_command_line[];
extern void zs_kgdb_hook(int tty_num);
static void ohare_init(void);
+static void init_p2pbridge(void);
__pmac
int
@@ -255,6 +258,7 @@ pmac_setup_arch(unsigned long *memory_start_p, unsigned long *memory_end_p))
ohare_init();
*memory_start_p = pmac_find_bridges(*memory_start_p, *memory_end_p);
+ init_p2pbridge();
/* Checks "l2cr-value" property in the registry */
if ( (_get_PVR() >> 16) == 8) {
@@ -299,6 +303,31 @@ pmac_setup_arch(unsigned long *memory_start_p, unsigned long *memory_end_p))
ROOT_DEV = to_kdev_t(DEFAULT_ROOT_DEVICE);
}
+/*
+ * Tweak the PCI-PCI bridge chip on the blue & white G3s.
+ */
+__initfunc(static void init_p2pbridge(void))
+{
+ struct device_node *p2pbridge;
+ unsigned char bus, devfn;
+ unsigned short val;
+
+ /* XXX it would be better here to identify the specific
+ PCI-PCI bridge chip we have. */
+ if ((p2pbridge = find_devices("pci-bridge")) == 0
+ || p2pbridge->parent == NULL
+ || strcmp(p2pbridge->parent->name, "pci") != 0)
+ return;
+
+ if (pci_device_loc(p2pbridge, &bus, &devfn) < 0)
+ return;
+
+ pcibios_read_config_word(bus, devfn, PCI_BRIDGE_CONTROL, &val);
+ val &= ~PCI_BRIDGE_CTL_MASTER_ABORT;
+ pcibios_write_config_word(bus, devfn, PCI_BRIDGE_CONTROL, val);
+ pcibios_read_config_word(bus, devfn, PCI_BRIDGE_CONTROL, &val);
+}
+
__initfunc(static void ohare_init(void))
{
/*
@@ -488,13 +517,13 @@ pmac_halt(void)
void
pmac_ide_insw(ide_ioreg_t port, void *buf, int ns)
{
- ide_insw(port, buf, ns);
+ _insw_ns(port+_IO_BASE, buf, ns);
}
void
pmac_ide_outsw(ide_ioreg_t port, void *buf, int ns)
{
- ide_outsw(port, buf, ns);
+ _outsw_ns(port+_IO_BASE, buf, ns);
}
int
@@ -596,7 +625,8 @@ pmac_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md.kbd_leds = mackbd_leds;
ppc_md.kbd_init_hw = mackbd_init_hw;
#ifdef CONFIG_MAGIC_SYSRQ
- ppc_md.kbd_sysrq_xlate = mackbd_sysrq_xlate;
+ ppc_md.ppc_kbd_sysrq_xlate = mackbd_sysrq_xlate;
+ SYSRQ_KEY = 0x69;
#endif
#endif
@@ -605,13 +635,13 @@ pmac_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_ide_md.outsw = pmac_ide_outsw;
ppc_ide_md.default_irq = pmac_ide_default_irq;
ppc_ide_md.default_io_base = pmac_ide_default_io_base;
- ppc_ide_md.check_region = pmac_ide_check_region;
- ppc_ide_md.request_region = pmac_ide_request_region;
- ppc_ide_md.release_region = pmac_ide_release_region;
+ ppc_ide_md.ide_check_region = pmac_ide_check_region;
+ ppc_ide_md.ide_request_region = pmac_ide_request_region;
+ ppc_ide_md.ide_release_region = pmac_ide_release_region;
ppc_ide_md.fix_driveid = pmac_ide_fix_driveid;
ppc_ide_md.ide_init_hwif = pmac_ide_init_hwif_ports;
- ppc_ide_md.io_base = 0;
+ ppc_ide_md.io_base = _IO_BASE; /* actually too early for this :-( */
#endif
}
diff --git a/arch/ppc/kernel/ppc_htab.c b/arch/ppc/kernel/ppc_htab.c
index 30123c076..a2aab8354 100644
--- a/arch/ppc/kernel/ppc_htab.c
+++ b/arch/ppc/kernel/ppc_htab.c
@@ -74,11 +74,14 @@ struct inode_operations proc_ppc_htab_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
+ NULL, /* get_block */
NULL, /* readpage */
NULL, /* writepage */
- NULL, /* bmap */
+ NULL, /* flushpage */
NULL, /* truncate */
- NULL /* permission */
+ NULL, /* permission */
+ NULL, /* smap */
+ NULL /* revalidate */
};
/* these will go into processor.h when I'm done debugging -- Cort */
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
index 36a68ffd6..1d1340331 100644
--- a/arch/ppc/kernel/ppc_ksyms.c
+++ b/arch/ppc/kernel/ppc_ksyms.c
@@ -31,8 +31,8 @@
#include <asm/dma.h>
#include <asm/machdep.h>
-#define __KERNEL_SYSCALLS__
-#include <linux/unistd.h>
+/* Tell string.h we don't want memcpy etc. as cpp defines */
+#define EXPORT_SYMTAB_STROPS
extern void transfer_to_handler(void);
extern void int_return(void);
@@ -47,7 +47,6 @@ extern atomic_t ppc_n_lost_interrupts;
extern void do_lost_interrupts(unsigned long);
extern int do_signal(sigset_t *, struct pt_regs *);
-asmlinkage long long __ashrdi3(long long, int);
asmlinkage int abs(int);
EXPORT_SYMBOL(clear_page);
@@ -66,6 +65,7 @@ EXPORT_SYMBOL(ppc_n_lost_interrupts);
EXPORT_SYMBOL(do_lost_interrupts);
EXPORT_SYMBOL(enable_irq);
EXPORT_SYMBOL(disable_irq);
+EXPORT_SYMBOL(disable_irq_nosync);
EXPORT_SYMBOL(ppc_local_irq_count);
EXPORT_SYMBOL(ppc_local_bh_count);
@@ -112,11 +112,6 @@ EXPORT_SYMBOL(strnlen);
EXPORT_SYMBOL(strspn);
EXPORT_SYMBOL(strcmp);
EXPORT_SYMBOL(strncmp);
-EXPORT_SYMBOL(memset);
-EXPORT_SYMBOL(memcpy);
-EXPORT_SYMBOL(memmove);
-EXPORT_SYMBOL(memscan);
-EXPORT_SYMBOL(memcmp);
/* EXPORT_SYMBOL(csum_partial); already in net/netsyms.c */
EXPORT_SYMBOL(csum_partial_copy_generic);
@@ -153,9 +148,10 @@ EXPORT_SYMBOL(iounmap);
EXPORT_SYMBOL(ide_insw);
EXPORT_SYMBOL(ide_outsw);
+EXPORT_SYMBOL(ppc_ide_md);
EXPORT_SYMBOL(start_thread);
-EXPORT_SYMBOL(__kernel_thread);
+EXPORT_SYMBOL(kernel_thread);
EXPORT_SYMBOL(__cli);
EXPORT_SYMBOL(__sti);
@@ -215,11 +211,11 @@ EXPORT_SYMBOL(nvram_read_byte);
EXPORT_SYMBOL(nvram_write_byte);
#endif /* CONFIG_PMAC */
+EXPORT_SYMBOL_NOVERS(memcpy);
+EXPORT_SYMBOL_NOVERS(memset);
+EXPORT_SYMBOL_NOVERS(memmove);
+EXPORT_SYMBOL_NOVERS(memscan);
+EXPORT_SYMBOL_NOVERS(memcmp);
+
EXPORT_SYMBOL(abs);
EXPORT_SYMBOL(device_is_compatible);
-
-/* The following are special because they're not called
- explicitly (the C compiler generates them). Fortunately,
- their interface isn't gonna change any time soon now, so
- it's OK to leave it out of version control. */
-EXPORT_SYMBOL_NOVERS(__ashrdi3);
diff --git a/arch/ppc/kernel/prep_setup.c b/arch/ppc/kernel/prep_setup.c
index 45c64837c..05d46a698 100644
--- a/arch/ppc/kernel/prep_setup.c
+++ b/arch/ppc/kernel/prep_setup.c
@@ -48,7 +48,7 @@
#include <asm/mk48t59.h>
#include <asm/prep_nvram.h>
#include <asm/raven.h>
-
+#include <asm/keyboard.h>
#include "time.h"
#include "local_irq.h"
@@ -825,9 +825,9 @@ prep_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_ide_md.outsw = prep_ide_outsw;
ppc_ide_md.default_irq = prep_ide_default_irq;
ppc_ide_md.default_io_base = prep_ide_default_io_base;
- ppc_ide_md.check_region = prep_ide_check_region;
- ppc_ide_md.request_region = prep_ide_request_region;
- ppc_ide_md.release_region = prep_ide_release_region;
+ ppc_ide_md.ide_check_region = prep_ide_check_region;
+ ppc_ide_md.ide_request_region = prep_ide_request_region;
+ ppc_ide_md.ide_release_region = prep_ide_release_region;
ppc_ide_md.fix_driveid = prep_ide_fix_driveid;
ppc_ide_md.ide_init_hwif = prep_ide_init_hwif_ports;
#endif
@@ -841,7 +841,8 @@ prep_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md.kbd_leds = pckbd_leds;
ppc_md.kbd_init_hw = pckbd_init_hw;
#ifdef CONFIG_MAGIC_SYSRQ
- ppc_md.kbd_sysrq_xlate = pckbd_sysrq_xlate;
+ ppc_md.ppc_kbd_sysrq_xlate = pckbd_sysrq_xlate;
+ SYSRQ_KEY = 0x54;
#endif
#endif
}
diff --git a/arch/ppc/kernel/process.c b/arch/ppc/kernel/process.c
index 0147d427d..dcf6d9b9d 100644
--- a/arch/ppc/kernel/process.c
+++ b/arch/ppc/kernel/process.c
@@ -306,6 +306,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
p->tss.fpscr = current->tss.fpscr;
childregs->msr &= ~MSR_FP;
+ p->processor = 0;
#ifdef __SMP__
p->last_processor = NO_PROC_ID;
#endif /* __SMP__ */
diff --git a/arch/ppc/kernel/prom.c b/arch/ppc/kernel/prom.c
index 4c275dc9d..9c0efa754 100644
--- a/arch/ppc/kernel/prom.c
+++ b/arch/ppc/kernel/prom.c
@@ -338,7 +338,9 @@ prom_init(int r3, int r4, prom_entry pp)
*/
model = (char *) early_get_property
(r4 + bi->deviceTreeOffset, 4, RELOC("model"));
- if (model && strcmp(model, RELOC("iMac,1")) == 0) {
+ if (model
+ && (strcmp(model, RELOC("iMac,1")) == 0
+ || strcmp(model, RELOC("PowerMac1,1")) == 0)) {
out_le32((unsigned *)0x80880008, 1); /* XXX */
}
}
@@ -887,11 +889,11 @@ interpret_pci_props(struct device_node *np, unsigned long mem_start)
&& (imp = (struct pci_intr_map *)
get_property(np->parent, "interrupt-map", &ml)) != 0
&& (ip = (int *) get_property(np, "interrupts", &l)) != 0) {
- unsigned int busdevfn = pci_addrs[0].addr.a_hi & 0xffff00;
+ unsigned int devfn = pci_addrs[0].addr.a_hi & 0xff00;
np->n_intrs = 0;
np->intrs = (struct interrupt_info *) mem_start;
for (i = 0; (ml -= sizeof(struct pci_intr_map)) >= 0; ++i) {
- if (imp[i].addr.a_hi == busdevfn) {
+ if (imp[i].addr.a_hi == devfn) {
np->intrs[np->n_intrs].line = imp[i].intr;
np->intrs[np->n_intrs].sense = 0;
++np->n_intrs;
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c
index 3fdb35718..a0d67c98e 100644
--- a/arch/ppc/kernel/setup.c
+++ b/arch/ppc/kernel/setup.c
@@ -80,6 +80,9 @@ int _machine = 0;
int have_of = 0;
int is_prep = 0;
int is_chrp = 0;
+#ifdef CONFIG_MAGIC_SYSRQ
+unsigned long SYSRQ_KEY;
+#endif /* CONFIG_MAGIC_SYSRQ */
/* For MTX/MVME boards.. with Raven/Falcon Chipset
Real close to CHRP, but boot like PReP (via PPCbug)
There's probably a nicer way to do this.. --Troy */
@@ -160,15 +163,6 @@ void machine_halt(void)
ppc_md.halt();
}
-#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
-void ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq)
-{
- if (ppc_ide_md.ide_init_hwif != NULL) {
- ppc_ide_md.ide_init_hwif(hw, data_port, ctrl_port, irq);
- }
-}
-#endif
-
unsigned long cpu_temp(void)
{
unsigned char thres = 0;
@@ -376,7 +370,6 @@ identify_machine(unsigned long r3, unsigned long r4, unsigned long r5,
else
{
_machine = _MACH_Pmac;
- is_prep = 1;
}
}
diff --git a/arch/ppc/kernel/signal.c b/arch/ppc/kernel/signal.c
index 17c0f55d1..67dfa437c 100644
--- a/arch/ppc/kernel/signal.c
+++ b/arch/ppc/kernel/signal.c
@@ -455,6 +455,7 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs)
default:
lock_kernel();
sigaddset(&current->signal, signr);
+ recalc_sigpending(current);
current->flags |= PF_SIGNALED;
do_exit(exit_code);
/* NOTREACHED */
diff --git a/arch/ppc/kernel/smp.c b/arch/ppc/kernel/smp.c
index 91b4ba041..f40d8d7cc 100644
--- a/arch/ppc/kernel/smp.c
+++ b/arch/ppc/kernel/smp.c
@@ -243,20 +243,21 @@ void __init smp_boot_cpus(void)
{
extern struct task_struct *current_set[NR_CPUS];
extern void __secondary_start_psurge(void);
- int i;
+ extern void __secondary_start_chrp(void);
+ int i, cpu_nr;
struct task_struct *p;
unsigned long a;
printk("Entering SMP Mode...\n");
/* let other processors know to not do certain initialization */
first_cpu_booted = 1;
+ smp_num_cpus = 1;
/*
* assume for now that the first cpu booted is
* cpu 0, the master -- Cort
*/
cpu_callin_map[0] = 1;
- cpu_callin_map[1] = 0;
smp_store_cpu_info(0);
active_kernel_processor = 0;
current->processor = 0;
@@ -282,16 +283,12 @@ void __init smp_boot_cpus(void)
{
case _MACH_Pmac:
/* assume powersurge board - 2 processors -- Cort */
- smp_num_cpus = 2;
+ cpu_nr = 2;
break;
case _MACH_chrp:
- smp_num_cpus = ((openpic_read(&OpenPIC->Global.Feature_Reporting0)
+ cpu_nr = ((openpic_read(&OpenPIC->Global.Feature_Reporting0)
& OPENPIC_FEATURE_LAST_PROCESSOR_MASK) >>
OPENPIC_FEATURE_LAST_PROCESSOR_SHIFT)+1;
- /* get our processor # - we may not be cpu 0 */
- printk("SMP %d processors, boot CPU is %d (should be 0)\n",
- smp_num_cpus,
- 10/*openpic_read(&OpenPIC->Processor[0]._Who_Am_I)*/);
break;
}
@@ -299,7 +296,7 @@ void __init smp_boot_cpus(void)
* only check for cpus we know exist. We keep the callin map
* with cpus at the bottom -- Cort
*/
- for ( i = 1 ; i < smp_num_cpus; i++ )
+ for ( i = 1 ; i < cpu_nr; i++ )
{
int c;
@@ -332,6 +329,19 @@ void __init smp_boot_cpus(void)
case _MACH_chrp:
*(unsigned long *)KERNELBASE = i;
asm volatile("dcbf 0,%0"::"r"(KERNELBASE):"memory");
+#if 0
+ device = find_type_devices("cpu");
+ /* assume cpu device list is in order, find the ith cpu */
+ for ( a = i; device && a; device = device->next, a-- )
+ ;
+ if ( !device )
+ break;
+ printk( "Starting %s (%lu): ", device->full_name,
+ *(ulong *)get_property(device, "reg", NULL) );
+ call_rtas( "start-cpu", 3, 1, NULL,
+ *(ulong *)get_property(device, "reg", NULL),
+ __pa(__secondary_start_chrp), i);
+#endif
break;
}
@@ -349,6 +359,7 @@ void __init smp_boot_cpus(void)
/* this sync's the decr's -- Cort */
if ( _machine == _MACH_Pmac )
set_dec(decrementer_count);
+ smp_num_cpus++;
} else {
printk("Processor %d is stuck.\n", i);
}
@@ -366,7 +377,6 @@ void __init smp_boot_cpus(void)
void __init smp_commence(void)
{
- printk("SMP %d: smp_commence()\n",current->processor);
/*
* Lets the callin's below out of their loop.
*/
@@ -381,16 +391,12 @@ void __init initialize_secondary(void)
/* Activate a secondary processor. */
asmlinkage int __init start_secondary(void *unused)
{
- printk("SMP %d: start_secondary()\n",current->processor);
smp_callin();
return cpu_idle(NULL);
}
void __init smp_callin(void)
{
- int i;
-
- printk("SMP %d: smp_callin()\n",current->processor);
smp_store_cpu_info(current->processor);
set_dec(decrementer_count);
@@ -407,7 +413,6 @@ void __init smp_callin(void)
void __init smp_setup(char *str, int *ints)
{
- printk("SMP %d: smp_setup()\n",current->processor);
}
int __init setup_profiling_timer(unsigned int multiplier)
diff --git a/arch/ppc/kernel/syscalls.c b/arch/ppc/kernel/syscalls.c
index 3aa0becef..571b36391 100644
--- a/arch/ppc/kernel/syscalls.c
+++ b/arch/ppc/kernel/syscalls.c
@@ -33,6 +33,7 @@
#include <linux/sys.h>
#include <linux/ipc.h>
#include <linux/utsname.h>
+#include <linux/file.h>
#include <asm/uaccess.h>
#include <asm/ipc.h>
@@ -201,12 +202,16 @@ asmlinkage unsigned long sys_mmap(unsigned long addr, size_t len,
lock_kernel();
if (!(flags & MAP_ANONYMOUS)) {
- if (fd >= NR_OPEN || !(file = current->files->fd[fd]))
+ if (!(file = fget(fd)))
goto out;
}
flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+ down(&current->mm->mmap_sem);
ret = do_mmap(file, addr, len, prot, flags, offset);
+ up(&current->mm->mmap_sem);
+ if (file)
+ fput(file);
out:
unlock_kernel();
return ret;
diff --git a/arch/ppc/kernel/time.c b/arch/ppc/kernel/time.c
index 6be6b90c2..5990dad90 100644
--- a/arch/ppc/kernel/time.c
+++ b/arch/ppc/kernel/time.c
@@ -126,17 +126,9 @@ void timer_interrupt(struct pt_regs * regs)
smp_local_timer_interrupt(regs);
#endif
-#ifdef CONFIG_APUS
- {
- extern void apus_heartbeat (void);
- apus_heartbeat ();
- }
-#endif
-#if defined(CONFIG_ALL_PPC) || defined(CONFIG_CHRP)
- if ( _machine == _MACH_chrp )
- chrp_event_scan();
-#endif
-
+ if ( ppc_md.heartbeat && !ppc_md.heartbeat_count--)
+ ppc_md.heartbeat();
+
hardirq_exit(cpu);
}
diff --git a/arch/ppc/mbx_defconfig b/arch/ppc/mbx_defconfig
index ddb420383..494717c54 100644
--- a/arch/ppc/mbx_defconfig
+++ b/arch/ppc/mbx_defconfig
@@ -70,7 +70,7 @@ CONFIG_BLK_DEV_IDEDISK=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_IDEDMA_AUTO=y
+CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_NS87415 is not set
diff --git a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c
index afd84c499..ecbd79d63 100644
--- a/arch/ppc/mm/init.c
+++ b/arch/ppc/mm/init.c
@@ -254,7 +254,6 @@ void show_mem(void)
printk("%d pages shared\n",shared);
printk("%d pages swap cached\n",cached);
printk("%d pages in page table cache\n",(int)pgtable_cache_size);
- show_buffers();
#ifdef CONFIG_NET
show_net_buffers();
#endif
@@ -265,12 +264,15 @@ void show_mem(void)
#endif /* __SMP__ */
printk("\n");
for_each_task(p)
- {
+ {
printk("%-8.8s %3d %3d %8ld %8ld %8ld %c%08lx %08lx ",
p->comm,p->pid,
- atomic_read(&p->mm->count),p->mm->context,
- p->mm->context<<4, p->tss.last_syscall,
- user_mode(p->tss.regs) ? 'u' : 'k', p->tss.regs->nip,
+ (p->mm)?atomic_read(&p->mm->count):0,
+ (p->mm)?p->mm->context:0,
+ (p->mm)?(p->mm->context<<4):0,
+ p->tss.last_syscall,
+ (p->tss.regs)?user_mode(p->tss.regs) ? 'u' : 'k' : '?',
+ (p->tss.regs)?p->tss.regs->nip:0,
(ulong)p);
{
int iscur = 0;
@@ -282,7 +284,7 @@ void show_mem(void)
iscur = 1;
printk("current");
}
-#else
+#else
if ( p == current )
{
iscur = 1;
@@ -309,7 +311,7 @@ void si_meminfo(struct sysinfo *val)
val->totalram = 0;
val->sharedram = 0;
val->freeram = nr_free_pages << PAGE_SHIFT;
- val->bufferram = buffermem;
+ val->bufferram = atomic_read(&buffermem);
while (i-- > 0) {
if (PageReserved(mem_map+i))
continue;
@@ -346,6 +348,13 @@ __ioremap(unsigned long addr, unsigned long size, unsigned long flags)
size = PAGE_ALIGN(addr + size) - p;
/*
+ * If the address lies within the first 16 MB, assume it's in ISA
+ * memory space
+ */
+ if (p < 16*1024*1024)
+ p += _ISA_MEM_BASE;
+
+ /*
* Don't allow anybody to remap normal RAM that we're using.
* mem_init() sets high_memory so only do the check after that.
*/
@@ -371,7 +380,7 @@ __ioremap(unsigned long addr, unsigned long size, unsigned long flags)
* same virt address (and this is contiguous).
* -- Cort
*/
- if ( (v = p_mapped_by_bats(addr)) /*&& p_mapped_by_bats(addr+(size-1))*/ )
+ if ( (v = p_mapped_by_bats(p)) /*&& p_mapped_by_bats(p+size-1)*/ )
goto out;
#endif /* CONFIG_8xx */
diff --git a/arch/ppc/pmac_defconfig b/arch/ppc/pmac_defconfig
index 274f6c679..1962b2ae6 100644
--- a/arch/ppc/pmac_defconfig
+++ b/arch/ppc/pmac_defconfig
@@ -78,7 +78,7 @@ CONFIG_BLK_DEV_IDEFLOPPY=y
CONFIG_BLK_DEV_IDE_PMAC=y
CONFIG_BLK_DEV_IDEDMA_PMAC=y
CONFIG_BLK_DEV_IDEDMA=y
-CONFIG_PMAC_IDEDMA_AUTO=y
+CONFIG_IDEDMA_PMAC_AUTO=y
# CONFIG_IDE_CHIPSETS is not set
#
diff --git a/arch/ppc/xmon/start.c b/arch/ppc/xmon/start.c
index f89f2c193..561571639 100644
--- a/arch/ppc/xmon/start.c
+++ b/arch/ppc/xmon/start.c
@@ -32,7 +32,7 @@ xmon_map_scc(void)
#ifdef CHRP_ESCC
unsigned long addr = 0xc1013020;
#else
- unsigned long addr = 0xf3013030;
+ unsigned long addr = 0xf3013020;
#endif
TXRDY = 4;
RXRDY = 1;
diff --git a/arch/ppc/xmon/xmon.c b/arch/ppc/xmon/xmon.c
index a7c572ad7..0e9a432cb 100644
--- a/arch/ppc/xmon/xmon.c
+++ b/arch/ppc/xmon/xmon.c
@@ -91,7 +91,6 @@ extern void longjmp(u_int *, int);
static char *help_string = "\
Commands:\n\
d dump bytes\n\
- dc dump characters\n\
di dump instructions\n\
df dump float values\n\
dd dump double values\n\
@@ -518,7 +517,7 @@ excprint(struct pt_regs *fp)
{
printf("vector: %x at pc = %x, msr = %x, sp = %x [%x]\n",
fp->trap, fp->nip, fp->msr, fp->gpr[1], fp);
- if ((fp->trap == 0x300) || (fp->trap == 0x600) || (fp->trap == 0x200))
+ if (fp->trap == 0x300 || fp->trap == 0x600)
printf("dar = %x, dsisr = %x\n", fp->dar, fp->dsisr);
if (current)
printf("current = %x, pid = %d, comm = %s\n",
@@ -991,15 +990,16 @@ bsesc()
return c;
}
-#define isxdigit(c) ('0' <= (c) && (c) <= '9' || 'a' <= (c) && (c) <= 'f' \
- || 'A' <= (c) && (c) <= 'F')
+#define isxdigit(c) (('0' <= (c) && (c) <= '9') \
+ || ('a' <= (c) && (c) <= 'f') \
+ || ('A' <= (c) && (c) <= 'F'))
void
dump()
{
int c;
c = inchar();
- if ((isxdigit(c) && (c != 'f') && (c != 'd')) || (c == '\n'))
+ if ((isxdigit(c) && c != 'f' && c != 'd') || c == '\n')
termch = c;
scanhex(&adrs);
if( termch != '\n')