summaryrefslogtreecommitdiffstats
path: root/arch/ppc
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-04-19 04:00:00 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-04-19 04:00:00 +0000
commit46e045034336a2cc90c1798cd7cc07af744ddfd6 (patch)
tree3b9b51fc482e729f663d25333e77fbed9aaa939a /arch/ppc
parent31dc59d503a02e84c4de98826452acaeb56dc15a (diff)
Merge with Linux 2.3.99-pre4.
Diffstat (limited to 'arch/ppc')
-rw-r--r--arch/ppc/8xx_io/enet.c51
-rw-r--r--arch/ppc/8xx_io/uart.c2
-rw-r--r--arch/ppc/Makefile2
-rw-r--r--arch/ppc/boot/Makefile4
-rw-r--r--arch/ppc/chrpboot/Makefile4
-rw-r--r--arch/ppc/config.in10
-rw-r--r--arch/ppc/defconfig3
-rw-r--r--arch/ppc/kernel/feature.c8
-rw-r--r--arch/ppc/kernel/m8xx_setup.c1
-rw-r--r--arch/ppc/lib/Makefile2
-rw-r--r--arch/ppc/math-emu/math.c56
-rw-r--r--arch/ppc/math-emu/sfp-machine.h2
-rw-r--r--arch/ppc/mbxboot/Makefile6
-rw-r--r--arch/ppc/mm/fault.c42
14 files changed, 106 insertions, 87 deletions
diff --git a/arch/ppc/8xx_io/enet.c b/arch/ppc/8xx_io/enet.c
index 26beffc40..f6b37dcb4 100644
--- a/arch/ppc/8xx_io/enet.c
+++ b/arch/ppc/8xx_io/enet.c
@@ -63,13 +63,13 @@
* Like the LANCE driver:
* The driver runs as two independent, single-threaded flows of control. One
* is the send-packet routine, which enforces single-threaded use by the
- * dev->tbusy flag. The other thread is the interrupt handler, which is single
- * threaded by the hardware and other software.
+ * cep->tx_busy flag. The other thread is the interrupt handler, which is
+ * single threaded by the hardware and other software.
*
- * The send packet thread has partial control over the Tx ring and 'dev->tbusy'
- * flag. It sets the tbusy flag whenever it's queuing a Tx packet. If the next
- * queue slot is empty, it clears the tbusy flag when finished otherwise it sets
- * the 'lp->tx_full' flag.
+ * The send packet thread has partial control over the Tx ring and the
+ * 'cep->tx_busy' flag. It sets the tx_busy flag whenever it's queuing a Tx
+ * packet. If the next queue slot is empty, it clears the tx_busy flag when
+ * finished otherwise it sets the 'lp->tx_full' flag.
*
* The MBX has a control register external to the MPC8xx that has some
* control of the Ethernet interface. Control Register 1 has the
@@ -149,8 +149,10 @@ struct cpm_enet_private {
cbd_t *dirty_tx; /* The ring entries to be free()ed. */
scc_t *sccp;
struct net_device_stats stats;
- char tx_full;
+ uint tx_full;
+ uint tx_busy;
unsigned long lock;
+ int interrupt;
};
static int cpm_enet_open(struct net_device *dev);
@@ -190,10 +192,7 @@ cpm_enet_open(struct net_device *dev)
* a simple way to do that.
*/
- dev->tbusy = 0;
- dev->interrupt = 0;
- dev->start = 1;
-
+ netif_start_queue(dev);
return 0; /* Always succeed */
}
@@ -205,7 +204,7 @@ cpm_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
unsigned long flags;
/* Transmitter timeout, serious problems. */
- if (dev->tbusy) {
+ if (cep->tx_busy) {
int tickssofar = jiffies - dev->trans_start;
if (tickssofar < 200)
return 1;
@@ -233,22 +232,23 @@ cpm_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
}
#endif
- dev->tbusy=0;
+ cep->tx_busy=0;
dev->trans_start = jiffies;
return 0;
}
/* Block a timer-based transmit from overlapping. This could better be
- done with atomic_swap(1, dev->tbusy), but set_bit() works as well. */
- if (test_and_set_bit(0, (void*)&dev->tbusy) != 0) {
+ * done with atomic_swap(1, cep->tx_busy), but set_bit() works as well.
+ */
+ if (test_and_set_bit(0, (void*)&cep->tx_busy) != 0) {
printk("%s: Transmitter access conflict.\n", dev->name);
return 1;
}
if (test_and_set_bit(0, (void*)&cep->lock) != 0) {
printk("%s: tx queue lock!.\n", dev->name);
- /* don't clear dev->tbusy flag. */
+ /* don't clear cep->tx_busy flag. */
return 1;
}
@@ -258,7 +258,7 @@ cpm_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
#ifndef final_version
if (bdp->cbd_sc & BD_ENET_TX_READY) {
/* Ooops. All transmit buffers are full. Bail out.
- * This should not happen, since dev->tbusy should be set.
+ * This should not happen, since cep->tx_busy should be set.
*/
printk("%s: tx queue full!.\n", dev->name);
cep->lock = 0;
@@ -314,7 +314,7 @@ cpm_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (bdp->cbd_sc & BD_ENET_TX_READY)
cep->tx_full = 1;
else
- dev->tbusy=0;
+ cep->tx_busy=0;
restore_flags(flags);
cep->cur_tx = (cbd_t *)bdp;
@@ -335,10 +335,10 @@ cpm_enet_interrupt(void *dev_id)
int must_restart;
cep = (struct cpm_enet_private *)dev->priv;
- if (dev->interrupt)
+ if (cep->interrupt)
printk("%s: Re-entering the interrupt handler.\n", dev->name);
- dev->interrupt = 1;
+ cep->interrupt = 1;
/* Get the interrupt events that caused us to be here.
*/
@@ -399,7 +399,7 @@ cpm_enet_interrupt(void *dev_id)
/* Free the sk buffer associated with this last transmit.
*/
- dev_kfree_skb(cep->tx_skbuff[cep->skb_dirty]/*, FREE_WRITE*/);
+ dev_kfree_skb_irq(cep->tx_skbuff[cep->skb_dirty]);
cep->skb_dirty = (cep->skb_dirty + 1) & TX_RING_MOD_MASK;
/* Update pointer to next buffer descriptor to be transmitted.
@@ -421,10 +421,10 @@ cpm_enet_interrupt(void *dev_id)
/* Since we have freed up a buffer, the ring is no longer
* full.
*/
- if (cep->tx_full && dev->tbusy) {
+ if (cep->tx_full && cep->tx_busy) {
cep->tx_full = 0;
- dev->tbusy = 0;
- mark_bh(NET_BH);
+ cep->tx_busy = 0;
+ netif_wake_queue(dev);
}
cep->dirty_tx = (cbd_t *)bdp;
@@ -455,7 +455,7 @@ cpm_enet_interrupt(void *dev_id)
printk("CPM ENET: BSY can't happen.\n");
}
- dev->interrupt = 0;
+ cep->interrupt = 0;
return;
}
@@ -564,6 +564,7 @@ cpm_enet_close(struct net_device *dev)
{
/* Don't know what to do yet.
*/
+ netif_stop_queue(dev);
return 0;
}
diff --git a/arch/ppc/8xx_io/uart.c b/arch/ppc/8xx_io/uart.c
index 94e900ceb..575f68a28 100644
--- a/arch/ppc/8xx_io/uart.c
+++ b/arch/ppc/8xx_io/uart.c
@@ -28,6 +28,7 @@
#include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/serial.h>
+#include <linux/serialP.h>
#include <linux/major.h>
#include <linux/string.h>
#include <linux/fcntl.h>
@@ -1937,6 +1938,7 @@ static int rs_8xx_open(struct tty_struct *tty, struct file * filp)
printk("rs_open returning after block_til_ready with %d\n",
retval);
#endif
+ MOD_DEC_USE_COUNT;
return retval;
}
diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile
index 7c3f13822..4b578da45 100644
--- a/arch/ppc/Makefile
+++ b/arch/ppc/Makefile
@@ -72,7 +72,7 @@ MAKETREEBOOT = $(MAKE) -C arch/$(ARCH)/treeboot
ifdef CONFIG_8xx
SUBDIRS += arch/ppc/8xx_io
-DRIVERS += arch/ppc/8xx_io/8xx_io.a drivers/net/net.a
+DRIVERS += arch/ppc/8xx_io/8xx_io.a
endif
ifdef CONFIG_APUS
diff --git a/arch/ppc/boot/Makefile b/arch/ppc/boot/Makefile
index 604205565..33fa87999 100644
--- a/arch/ppc/boot/Makefile
+++ b/arch/ppc/boot/Makefile
@@ -16,9 +16,9 @@
.c.o:
$(CC) $(CFLAGS) -DINITRD_OFFSET=$(IOFF) -DINITRD_SIZE=$(ISZ) -DZIMAGE_OFFSET=$(ZOFF) -DZIMAGE_SIZE=$(ZSZ) -D__BOOTER__ -c -o $*.o $<
.S.s:
- $(CC) -D__ASSEMBLY__ $(AFLAGS) -traditional -E -o $*.o $<
+ $(CPP) $(AFLAGS) -traditional -o $*.o $<
.S.o:
- $(CC) -D__ASSEMBLY__ $(AFLAGS) -traditional -c -o $*.o $<
+ $(CC) $(AFLAGS) -traditional -c -o $*.o $<
ZOFF = 0
ZSZ = 0
diff --git a/arch/ppc/chrpboot/Makefile b/arch/ppc/chrpboot/Makefile
index 216b289ed..e988ce9de 100644
--- a/arch/ppc/chrpboot/Makefile
+++ b/arch/ppc/chrpboot/Makefile
@@ -12,9 +12,9 @@
.c.o:
$(CC) $(CFLAGS) -DKERNELBASE=$(KERNELBASE) -c -o $*.o $<
.S.s:
- $(CC) -D__ASSEMBLY__ $(AFLAGS) -traditional -E -o $*.o $<
+ $(CPP) $(AFLAGS) -traditional -o $*.o $<
.S.o:
- $(CC) -D__ASSEMBLY__ $(AFLAGS) -traditional -c -o $*.o $<
+ $(CC) $(AFLAGS) -traditional -c -o $*.o $<
CFLAGS = $(CPPFLAGS) -O -fno-builtin -DSTDC_HEADERS
LD_ARGS = -Ttext 0x00400000
diff --git a/arch/ppc/config.in b/arch/ppc/config.in
index e21140d9d..e9499fbc9 100644
--- a/arch/ppc/config.in
+++ b/arch/ppc/config.in
@@ -83,12 +83,13 @@ mainmenu_option next_comment
comment 'General setup'
define_bool CONFIG_ISA n
+define_bool CONFIG_SBUS n
if [ "$CONFIG_APUS" = "y" -o "$CONFIG_4xx" = "y" -o \
"$CONFIG_82xx" = "y" ]; then
define_bool CONFIG_PCI n
else
- if [ "$CONFIG_6xx" = "y" -o CONFIG_PPC64 ]; then
+ if [ "$CONFIG_6xx" = "y" -o "$CONFIG_PPC64" = "y" ]; then
define_bool CONFIG_PCI y
else
# CONFIG_8xx
@@ -115,6 +116,8 @@ bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
if [ "$CONFIG_HOTPLUG" = "y" ]; then
source drivers/pcmcia/Config.in
+else
+ define_bool CONFIG_PCMCIA n
fi
source drivers/parport/Config.in
@@ -247,14 +250,13 @@ source drivers/video/Config.in
endmenu
source drivers/char/Config.in
-source drivers/usb/Config.in
source fs/Config.in
mainmenu_option next_comment
comment 'Sound'
tristate 'Sound card support' CONFIG_SOUND
if [ "$CONFIG_SOUND" != "n" ]; then
- dep_tristate 'Amiga or PowerMac DMA sound support' CONFIG_DMASOUND $CONFIG_SOUND
+ source drivers/sound/dmasound/Config.in
source drivers/sound/Config.in
fi
@@ -264,6 +266,8 @@ if [ "$CONFIG_8xx" = "y" ]; then
source arch/ppc/8xx_io/Config.in
fi
+source drivers/usb/Config.in
+
mainmenu_option next_comment
comment 'Kernel hacking'
diff --git a/arch/ppc/defconfig b/arch/ppc/defconfig
index 1f5784701..8717bc055 100644
--- a/arch/ppc/defconfig
+++ b/arch/ppc/defconfig
@@ -34,6 +34,7 @@ CONFIG_KMOD=y
# General setup
#
# CONFIG_ISA is not set
+# CONFIG_SBUS is not set
CONFIG_PCI=y
CONFIG_NET=y
CONFIG_SYSCTL=y
@@ -45,6 +46,7 @@ CONFIG_KERNEL_ELF=y
# CONFIG_BINFMT_MISC is not set
# CONFIG_PCI_NAMES is not set
# CONFIG_HOTPLUG is not set
+# CONFIG_PCMCIA is not set
#
# Parallel port support
@@ -185,6 +187,7 @@ CONFIG_IDEDMA_PCI_EXPERIMENTAL=y
# CONFIG_BLK_DEV_AEC6210 is not set
# CONFIG_AEC6210_TUNING is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
+# CONFIG_WDC_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD7409 is not set
# CONFIG_AMD7409_OVERRIDE is not set
# CONFIG_BLK_DEV_CMD64X is not set
diff --git a/arch/ppc/kernel/feature.c b/arch/ppc/kernel/feature.c
index d14c7380a..d5baa3747 100644
--- a/arch/ppc/kernel/feature.c
+++ b/arch/ppc/kernel/feature.c
@@ -184,14 +184,14 @@ feature_init(void)
if (controller_count)
printk(KERN_INFO "Registered %d feature controller(s)\n", controller_count);
-#ifdef CONFIG_PMAC_PBOOK
-#ifdef CONFIG_DMASOUND_MODULE
- /* On PowerBooks, we disable the sound chip when dmasound is a module */
+#if defined(CONFIG_PMAC_PBOOK) && !defined(CONFIG_DMASOUND_AWACS)
+ /* On PowerBooks, we disable the sound chip when dmasound is a module
+ * or not used at all
+ */
if (controller_count && find_devices("via-pmu") != NULL) {
feature_clear(controllers[0].device, FEATURE_Sound_power);
feature_clear(controllers[0].device, FEATURE_Sound_CLK_enable);
}
-#endif
#endif
}
diff --git a/arch/ppc/kernel/m8xx_setup.c b/arch/ppc/kernel/m8xx_setup.c
index 36e886d0c..a417bed2e 100644
--- a/arch/ppc/kernel/m8xx_setup.c
+++ b/arch/ppc/kernel/m8xx_setup.c
@@ -276,7 +276,6 @@ m8xx_init_IRQ(void)
int i;
void cpm_interrupt_init(void);
- ppc8xx_pic.irq_offset = 0;
for ( i = 0 ; i < NR_SIU_INTS ; i++ )
irq_desc[i].handler = &ppc8xx_pic;
diff --git a/arch/ppc/lib/Makefile b/arch/ppc/lib/Makefile
index e454e952d..b6a16900c 100644
--- a/arch/ppc/lib/Makefile
+++ b/arch/ppc/lib/Makefile
@@ -3,7 +3,7 @@
#
.S.o:
- $(CC) -D__ASSEMBLY__ $(AFLAGS) -c $< -o $*.o
+ $(CC) $(AFLAGS) -c $< -o $*.o
O_TARGET = lib.o
O_OBJS = checksum.o string.o strcase.o
diff --git a/arch/ppc/math-emu/math.c b/arch/ppc/math-emu/math.c
index aed5c7062..146b17df4 100644
--- a/arch/ppc/math-emu/math.c
+++ b/arch/ppc/math-emu/math.c
@@ -233,14 +233,14 @@ do_mathemu(struct pt_regs *regs)
case LFD:
idx = (insn >> 16) & 0x1f;
sdisp = (insn & 0xffff);
- op0 = (void *)&current->tss.fpr[(insn >> 21) & 0x1f];
+ op0 = (void *)&current->thread.fpr[(insn >> 21) & 0x1f];
op1 = (void *)((idx ? regs->gpr[idx] : 0) + sdisp);
lfd(op0, op1, op2, op3);
break;
case LFDU:
idx = (insn >> 16) & 0x1f;
sdisp = (insn & 0xffff);
- op0 = (void *)&current->tss.fpr[(insn >> 21) & 0x1f];
+ op0 = (void *)&current->thread.fpr[(insn >> 21) & 0x1f];
op1 = (void *)((idx ? regs->gpr[idx] : 0) + sdisp);
lfd(op0, op1, op2, op3);
regs->gpr[idx] = (unsigned long)op1;
@@ -248,21 +248,21 @@ do_mathemu(struct pt_regs *regs)
case STFD:
idx = (insn >> 16) & 0x1f;
sdisp = (insn & 0xffff);
- op0 = (void *)&current->tss.fpr[(insn >> 21) & 0x1f];
+ op0 = (void *)&current->thread.fpr[(insn >> 21) & 0x1f];
op1 = (void *)((idx ? regs->gpr[idx] : 0) + sdisp);
stfd(op0, op1, op2, op3);
break;
case STFDU:
idx = (insn >> 16) & 0x1f;
sdisp = (insn & 0xffff);
- op0 = (void *)&current->tss.fpr[(insn >> 21) & 0x1f];
+ op0 = (void *)&current->thread.fpr[(insn >> 21) & 0x1f];
op1 = (void *)((idx ? regs->gpr[idx] : 0) + sdisp);
stfd(op0, op1, op2, op3);
regs->gpr[idx] = (unsigned long)op1;
break;
case OP63:
- op0 = (void *)&current->tss.fpr[(insn >> 21) & 0x1f];
- op1 = (void *)&current->tss.fpr[(insn >> 11) & 0x1f];
+ op0 = (void *)&current->thread.fpr[(insn >> 21) & 0x1f];
+ op1 = (void *)&current->thread.fpr[(insn >> 11) & 0x1f];
fmr(op0, op1, op2, op3);
break;
default:
@@ -359,28 +359,28 @@ do_mathemu(struct pt_regs *regs)
switch (type) {
case AB:
- op0 = (void *)&current->tss.fpr[(insn >> 21) & 0x1f];
- op1 = (void *)&current->tss.fpr[(insn >> 16) & 0x1f];
- op2 = (void *)&current->tss.fpr[(insn >> 11) & 0x1f];
+ op0 = (void *)&current->thread.fpr[(insn >> 21) & 0x1f];
+ op1 = (void *)&current->thread.fpr[(insn >> 16) & 0x1f];
+ op2 = (void *)&current->thread.fpr[(insn >> 11) & 0x1f];
break;
case AC:
- op0 = (void *)&current->tss.fpr[(insn >> 21) & 0x1f];
- op1 = (void *)&current->tss.fpr[(insn >> 16) & 0x1f];
- op2 = (void *)&current->tss.fpr[(insn >> 6) & 0x1f];
+ op0 = (void *)&current->thread.fpr[(insn >> 21) & 0x1f];
+ op1 = (void *)&current->thread.fpr[(insn >> 16) & 0x1f];
+ op2 = (void *)&current->thread.fpr[(insn >> 6) & 0x1f];
break;
case ABC:
- op0 = (void *)&current->tss.fpr[(insn >> 21) & 0x1f];
- op1 = (void *)&current->tss.fpr[(insn >> 16) & 0x1f];
- op2 = (void *)&current->tss.fpr[(insn >> 11) & 0x1f];
- op3 = (void *)&current->tss.fpr[(insn >> 6) & 0x1f];
+ op0 = (void *)&current->thread.fpr[(insn >> 21) & 0x1f];
+ op1 = (void *)&current->thread.fpr[(insn >> 16) & 0x1f];
+ op2 = (void *)&current->thread.fpr[(insn >> 11) & 0x1f];
+ op3 = (void *)&current->thread.fpr[(insn >> 6) & 0x1f];
break;
case D:
idx = (insn >> 16) & 0x1f;
sdisp = (insn & 0xffff);
- op0 = (void *)&current->tss.fpr[(insn >> 21) & 0x1f];
+ op0 = (void *)&current->thread.fpr[(insn >> 21) & 0x1f];
op1 = (void *)((idx ? regs->gpr[idx] : 0) + sdisp);
break;
@@ -390,22 +390,22 @@ do_mathemu(struct pt_regs *regs)
goto illegal;
sdisp = (insn & 0xffff);
- op0 = (void *)&current->tss.fpr[(insn >> 21) & 0x1f];
+ op0 = (void *)&current->thread.fpr[(insn >> 21) & 0x1f];
op1 = (void *)(regs->gpr[idx] + sdisp);
break;
case X:
- op0 = (void *)&current->tss.fpr[(insn >> 21) & 0x1f];
+ op0 = (void *)&current->thread.fpr[(insn >> 21) & 0x1f];
break;
case XA:
- op0 = (void *)&current->tss.fpr[(insn >> 21) & 0x1f];
- op1 = (void *)&current->tss.fpr[(insn >> 16) & 0x1f];
+ op0 = (void *)&current->thread.fpr[(insn >> 21) & 0x1f];
+ op1 = (void *)&current->thread.fpr[(insn >> 16) & 0x1f];
break;
case XB:
- op0 = (void *)&current->tss.fpr[(insn >> 21) & 0x1f];
- op1 = (void *)&current->tss.fpr[(insn >> 11) & 0x1f];
+ op0 = (void *)&current->thread.fpr[(insn >> 21) & 0x1f];
+ op1 = (void *)&current->thread.fpr[(insn >> 11) & 0x1f];
break;
case XE:
@@ -413,13 +413,13 @@ do_mathemu(struct pt_regs *regs)
if (!idx)
goto illegal;
- op0 = (void *)&current->tss.fpr[(insn >> 21) & 0x1f];
+ op0 = (void *)&current->thread.fpr[(insn >> 21) & 0x1f];
op1 = (void *)(regs->gpr[idx] + regs->gpr[(insn >> 11) & 0x1f]);
break;
case XEU:
idx = (insn >> 16) & 0x1f;
- op0 = (void *)&current->tss.fpr[(insn >> 21) & 0x1f];
+ op0 = (void *)&current->thread.fpr[(insn >> 21) & 0x1f];
op1 = (void *)((idx ? regs->gpr[idx] : 0)
+ regs->gpr[(insn >> 11) & 0x1f]);
break;
@@ -427,8 +427,8 @@ do_mathemu(struct pt_regs *regs)
case XCR:
op0 = (void *)&regs->ccr;
op1 = (void *)((insn >> 23) & 0x7);
- op2 = (void *)&current->tss.fpr[(insn >> 16) & 0x1f];
- op3 = (void *)&current->tss.fpr[(insn >> 11) & 0x1f];
+ op2 = (void *)&current->thread.fpr[(insn >> 16) & 0x1f];
+ op3 = (void *)&current->thread.fpr[(insn >> 11) & 0x1f];
break;
case XCRL:
@@ -448,7 +448,7 @@ do_mathemu(struct pt_regs *regs)
case XFLB:
op0 = (void *)((insn >> 17) & 0xff);
- op1 = (void *)&current->tss.fpr[(insn >> 11) & 0x1f];
+ op1 = (void *)&current->thread.fpr[(insn >> 11) & 0x1f];
break;
default:
diff --git a/arch/ppc/math-emu/sfp-machine.h b/arch/ppc/math-emu/sfp-machine.h
index 73b7e69c6..ac39cb054 100644
--- a/arch/ppc/math-emu/sfp-machine.h
+++ b/arch/ppc/math-emu/sfp-machine.h
@@ -166,7 +166,7 @@ extern int fp_pack_ds(void *, long, unsigned long, unsigned long, long, long);
#include <linux/kernel.h>
#include <linux/sched.h>
-#define __FPU_FPSCR (current->tss.fpscr)
+#define __FPU_FPSCR (current->thread.fpscr)
/* We only actually write to the destination register
* if exceptions signalled (if any) will not trap.
diff --git a/arch/ppc/mbxboot/Makefile b/arch/ppc/mbxboot/Makefile
index 59b95c5df..6f9fd0135 100644
--- a/arch/ppc/mbxboot/Makefile
+++ b/arch/ppc/mbxboot/Makefile
@@ -16,9 +16,9 @@
.c.o:
$(CC) $(CFLAGS) -DINITRD_OFFSET=$(IOFF) -DINITRD_SIZE=$(ISZ) -DZIMAGE_OFFSET=$(ZOFF) -DZIMAGE_SIZE=$(ZSZ) -c -o $*.o $<
.S.s:
- $(CC) -D__ASSEMBLY__ $(AFLAGS) -traditional -E -o $*.o $<
+ $(CPP) $(AFLAGS) -traditional -o $*.o $<
.S.o:
- $(CC) -D__ASSEMBLY__ $(AFLAGS) -traditional -c -o $*.o $<
+ $(CC) $(AFLAGS) -traditional -c -o $*.o $<
ZOFF = 0
ZSZ = 0
@@ -26,7 +26,7 @@ IOFF = 0
ISZ = 0
TFTPIMAGE=/tftpboot/zImage.mbx
-ZLINKFLAGS = -T ../vmlinux.lds -Ttext 0x00100000
+ZLINKFLAGS = -T ../vmlinux.lds -Ttext 0x00180000
OBJECTS := head.o misc.o ../coffboot/zlib.o m8xx_tty.o
CFLAGS = $(CPPFLAGS) -O2 -DSTDC_HEADERS -fno-builtin -DCONFIG_8xx
diff --git a/arch/ppc/mm/fault.c b/arch/ppc/mm/fault.c
index 0427f2166..5fee4463b 100644
--- a/arch/ppc/mm/fault.c
+++ b/arch/ppc/mm/fault.c
@@ -182,34 +182,44 @@ bad_page_fault(struct pt_regs *regs, unsigned long address)
#ifdef CONFIG_8xx
-unsigned long va_to_phys(unsigned long address)
+/* The pgtable.h claims some functions generically exist, but I
+ * can't find them......
+ */
+pte_t *find_pte(struct mm_struct *mm, unsigned long address)
{
pgd_t *dir;
pmd_t *pmd;
pte_t *pte;
-
- dir = pgd_offset(current->mm, address & PAGE_MASK);
- if (dir)
- {
+
+ dir = pgd_offset(mm, address & PAGE_MASK);
+ if (dir) {
pmd = pmd_offset(dir, address & PAGE_MASK);
- if (pmd && pmd_present(*pmd))
- {
+ if (pmd && pmd_present(*pmd)) {
pte = pte_offset(pmd, address & PAGE_MASK);
- if (pte && pte_present(*pte))
- {
- return(pte_page(*pte) | (address & ~(PAGE_MASK-1)));
+ if (pte && pte_present(*pte)) {
+ return(pte);
}
- } else
- {
+ }
+ else {
return (0);
}
- } else
- {
+ }
+ else {
return (0);
}
return (0);
}
+unsigned long va_to_phys(unsigned long address)
+{
+ pte_t *pte;
+
+ pte = find_pte(current->mm, address);
+ if (pte)
+ return((unsigned long)(pte_page(*pte)) | (address & ~(PAGE_MASK-1)));
+ return (0);
+}
+
void
print_8xx_pte(struct mm_struct *mm, unsigned long addr)
{
@@ -227,8 +237,8 @@ print_8xx_pte(struct mm_struct *mm, unsigned long addr)
printk(" (0x%08lx)->(0x%08lx)->0x%08lx\n",
(long)pgd, (long)pte, (long)pte_val(*pte));
#define pp ((long)pte_val(*pte))
- printk(" RPN: %05x PP: %x SPS: %x SH: %x "
- "CI: %x v: %x\n",
+ printk(" RPN: %05x PP: %x SPS: %x SH: %lx "
+ "CI: %lx v: %lx\n",
pp>>12, /* rpn */
(pp>>10)&3, /* pp */
(pp>>3)&1, /* small */