* Re: [patch 2.6.14 (take #2)] fec_8xx: make CONFIG_FEC_8XX depend on CONFIG_8xx
From: John W. Linville @ 2005-11-09 21:52 UTC (permalink / raw)
To: Pantelis Antoniou, linuxppc-embedded, netdev, linux-kernel
In-Reply-To: <20051107182459.GD13797@tuxdriver.com>
On Mon, Nov 07, 2005 at 01:24:59PM -0500, John W. Linville wrote:
> Change CONFIG_FEC_8XX to depend on CONFIG_8xx instead of CONFIG_FEC.
> CONFIG_FEC depends on ColdFire CPUs, which does not apply for the
> PPC 8xx processors.
FWIW, I have this patch available on the linville-fec_8xx branch of
netdev-jwl as described below.
Thanks,
John
---
The following changes since commit 330d57fb98a916fa8e1363846540dd420e99499a:
Al Viro:
Fix sysctl unregistration oops (CVE-2005-2709)
are found in the git repository at:
git://git.tuxdriver.com/git/netdev-jwl.git linville-fec_8xx
John W. Linville:
fec_8xx: make CONFIG_FEC_8XX depend on CONFIG_8xx
drivers/net/fec_8xx/Kconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/fec_8xx/Kconfig b/drivers/net/fec_8xx/Kconfig
index 94e7a9a..a84c232 100644
--- a/drivers/net/fec_8xx/Kconfig
+++ b/drivers/net/fec_8xx/Kconfig
@@ -1,6 +1,6 @@
config FEC_8XX
tristate "Motorola 8xx FEC driver"
- depends on NET_ETHERNET && FEC
+ depends on NET_ETHERNET && 8xx
select MII
config FEC_8XX_GENERIC_PHY
--
John W. Linville
linville@tuxdriver.com
^ permalink raw reply related
* Need test: 2.6.14: Fix IRQ race in USB sleep/wakeup code]
From: Benjamin Herrenschmidt @ 2005-11-09 21:50 UTC (permalink / raw)
To: Linux Kernel list; +Cc: linuxppc-dev list
Here's a patch that fixes a race in the USB code with sleep/wakeup.
It's against 2.6.14 and I'd like to see it in the stable series as
powerbook sleep crashes without it, but it needs a little bit of
field testing first. So I would appreciate if ppl could give it a
go and let me know if it doesn't seem to cause any regression (or
if it does of course ;)
Ben.
Index: 2.6.14-ben/drivers/usb/core/hcd-pci.c
===================================================================
--- 2.6.14-ben.orig/drivers/usb/core/hcd-pci.c
+++ 2.6.14-ben/drivers/usb/core/hcd-pci.c
@@ -32,6 +32,13 @@
#include <linux/usb.h>
#include "hcd.h"
+#ifdef CONFIG_PPC_PMAC
+#include <asm/machdep.h>
+#include <asm/pmac_feature.h>
+#include <asm/pci-bridge.h>
+#include <asm/prom.h>
+#endif
+
/* PCI-based HCs are common, but plenty of non-PCI HCs are used too */
@@ -278,6 +285,18 @@ int usb_hcd_pci_suspend (struct pci_dev
break;
}
+#ifdef CONFIG_PPC_PMAC
+ if (retval == 0 && _machine == _MACH_Pmac) {
+ struct device_node *of_node;
+
+ /* Disable USB PAD & cell clock */
+ of_node = pci_device_to_OF_node (to_pci_dev(hcd->self.
+ controller));
+ if (of_node)
+ pmac_call_feature(PMAC_FTR_USB_ENABLE, of_node, 0, 0);
+ }
+#endif /* CONFIG_PPC_PMAC */
+
/* update power_state **ONLY** to make sysfs happier */
if (retval == 0)
dev->dev.power.power_state = message;
@@ -303,6 +322,18 @@ int usb_hcd_pci_resume (struct pci_dev *
return 0;
}
+#ifdef CONFIG_PPC_PMAC
+ if (_machine == _MACH_Pmac) {
+ struct device_node *of_node;
+
+ /* Re-enable USB PAD & cell clock */
+ of_node = pci_device_to_OF_node (to_pci_dev(hcd->self.
+ controller));
+ if (of_node)
+ pmac_call_feature(PMAC_FTR_USB_ENABLE, of_node, 0, 1);
+ }
+#endif /* CONFIG_PPC_PMAC */
+
/* NOTE: chip docs cover clean "real suspend" cases (what Linux
* calls "standby", "suspend to RAM", and so on). There are also
* dirty cases when swsusp fakes a suspend in "shutdown" mode.
Index: 2.6.14-ben/drivers/usb/core/hcd.c
===================================================================
--- 2.6.14-ben.orig/drivers/usb/core/hcd.c
+++ 2.6.14-ben/drivers/usb/core/hcd.c
@@ -1600,7 +1600,8 @@ irqreturn_t usb_hcd_irq (int irq, void *
struct usb_hcd *hcd = __hcd;
int start = hcd->state;
- if (start == HC_STATE_HALT)
+ if (start == HC_STATE_HALT ||
+ !test_bit(HC_FLAG_IRQ_ON, &hcd->bitflags))
return IRQ_NONE;
if (hcd->driver->irq (hcd, r) == IRQ_NONE)
return IRQ_NONE;
@@ -1736,6 +1737,9 @@ int usb_add_hcd(struct usb_hcd *hcd,
if (hcd->driver->irq) {
char buf[8], *bufp = buf;
+ set_bit(HC_FLAG_IRQ_ON, &hcd->bitflags);
+ mb();
+
#ifdef __sparc__
bufp = __irq_itoa(irqnum);
#else
Index: 2.6.14-ben/drivers/usb/core/hcd.h
===================================================================
--- 2.6.14-ben.orig/drivers/usb/core/hcd.h
+++ 2.6.14-ben/drivers/usb/core/hcd.h
@@ -71,6 +71,9 @@ struct usb_hcd { /* usb_bus.hcpriv point
/*
* hardware info/state
*/
+ unsigned long bitflags; /* various single-bit flags */
+#define HC_FLAG_IRQ_ON 0
+
const struct hc_driver *driver; /* hw-specific hooks */
unsigned saw_irq : 1;
unsigned can_wakeup:1; /* hw supports wakeup? */
Index: 2.6.14-ben/drivers/usb/host/ehci-hcd.c
===================================================================
--- 2.6.14-ben.orig/drivers/usb/host/ehci-hcd.c
+++ 2.6.14-ben/drivers/usb/host/ehci-hcd.c
@@ -750,6 +750,12 @@ static int ehci_suspend (struct usb_hcd
if (time_before (jiffies, ehci->next_statechange))
msleep (100);
+ /* Disable emission of interrupts during suspend */
+ writel(0, &ehci->regs->intr_enable);
+ mb();
+ clear_bit(HC_FLAG_IRQ_ON, &hcd->bitflags);
+ synchronize_irq(to_pci_dev(hcd->self.controller)->irq);
+
#ifdef CONFIG_USB_SUSPEND
(void) usb_suspend_device (hcd->self.root_hub, message);
#else
@@ -776,6 +782,8 @@ static int ehci_resume (struct usb_hcd *
if (time_before (jiffies, ehci->next_statechange))
msleep (100);
+ set_bit(HC_FLAG_IRQ_ON, &hcd->bitflags);
+
/* If any port is suspended (or owned by the companion),
* we know we can/must resume the HC (and mustn't reset it).
*/
Index: 2.6.14-ben/drivers/usb/host/ehci-q.c
===================================================================
--- 2.6.14-ben.orig/drivers/usb/host/ehci-q.c
+++ 2.6.14-ben/drivers/usb/host/ehci-q.c
@@ -926,6 +926,11 @@ submit_async (
#endif
spin_lock_irqsave (&ehci->lock, flags);
+ if (HC_IS_SUSPENDED(ehci_to_hcd(ehci)->state)) {
+ spin_unlock_irqrestore (&ehci->lock, flags);
+ return -ESHUTDOWN;
+ }
+
qh = qh_append_tds (ehci, urb, qtd_list, epnum, &ep->hcpriv);
/* Control/bulk operations through TTs don't need scheduling,
Index: 2.6.14-ben/drivers/usb/host/ehci-sched.c
===================================================================
--- 2.6.14-ben.orig/drivers/usb/host/ehci-sched.c
+++ 2.6.14-ben/drivers/usb/host/ehci-sched.c
@@ -602,6 +602,11 @@ static int intr_submit (
spin_lock_irqsave (&ehci->lock, flags);
+ if (HC_IS_SUSPENDED(ehci_to_hcd(ehci)->state)) {
+ spin_unlock_irqrestore (&ehci->lock, flags);
+ return -ESHUTDOWN;
+ }
+
/* get qh and force any scheduling errors */
INIT_LIST_HEAD (&empty);
qh = qh_append_tds (ehci, urb, &empty, epnum, &ep->hcpriv);
@@ -1456,6 +1461,11 @@ static int itd_submit (struct ehci_hcd *
/* schedule ... need to lock */
spin_lock_irqsave (&ehci->lock, flags);
+ if (HC_IS_SUSPENDED(ehci_to_hcd(ehci)->state)) {
+ spin_unlock_irqrestore (&ehci->lock, flags);
+ status = -ESHUTDOWN;
+ goto done;
+ }
status = iso_stream_schedule (ehci, urb, stream);
if (likely (status == 0))
itd_link_urb (ehci, urb, ehci->periodic_size << 3, stream);
@@ -1815,6 +1825,11 @@ static int sitd_submit (struct ehci_hcd
/* schedule ... need to lock */
spin_lock_irqsave (&ehci->lock, flags);
+ if (HC_IS_SUSPENDED(ehci_to_hcd(ehci)->state)) {
+ spin_unlock_irqrestore (&ehci->lock, flags);
+ status = -ESHUTDOWN;
+ goto done;
+ }
status = iso_stream_schedule (ehci, urb, stream);
if (status == 0)
sitd_link_urb (ehci, urb, ehci->periodic_size << 3, stream);
Index: 2.6.14-ben/drivers/usb/host/ohci-hcd.c
===================================================================
--- 2.6.14-ben.orig/drivers/usb/host/ohci-hcd.c
+++ 2.6.14-ben/drivers/usb/host/ohci-hcd.c
@@ -252,6 +252,10 @@ static int ohci_urb_enqueue (
spin_lock_irqsave (&ohci->lock, flags);
+ if (HC_IS_SUSPENDED(hcd->state)) {
+ retval = -ESHUTDOWN;
+ goto fail;
+ }
/* don't submit to a dead HC */
if (!HC_IS_RUNNING(hcd->state)) {
retval = -ENODEV;
Index: 2.6.14-ben/drivers/usb/host/ohci-hub.c
===================================================================
--- 2.6.14-ben.orig/drivers/usb/host/ohci-hub.c
+++ 2.6.14-ben/drivers/usb/host/ohci-hub.c
@@ -219,13 +219,6 @@ static int ohci_hub_resume (struct usb_h
/* Sometimes PCI D3 suspend trashes frame timings ... */
periodic_reinit (ohci);
- /* interrupts might have been disabled */
- ohci_writel (ohci, OHCI_INTR_INIT, &ohci->regs->intrenable);
- if (ohci->ed_rm_list)
- ohci_writel (ohci, OHCI_INTR_SF, &ohci->regs->intrenable);
- ohci_writel (ohci, ohci_readl (ohci, &ohci->regs->intrstatus),
- &ohci->regs->intrstatus);
-
/* Then re-enable operations */
ohci_writel (ohci, OHCI_USB_OPER, &ohci->regs->control);
(void) ohci_readl (ohci, &ohci->regs->control);
@@ -241,6 +234,13 @@ static int ohci_hub_resume (struct usb_h
/* TRSMRCY */
msleep (10);
+ /* interrupts might have been disabled */
+ ohci_writel (ohci, OHCI_INTR_INIT, &ohci->regs->intrenable);
+ if (ohci->ed_rm_list)
+ ohci_writel (ohci, OHCI_INTR_SF, &ohci->regs->intrenable);
+ ohci_writel (ohci, ohci_readl (ohci, &ohci->regs->intrstatus),
+ &ohci->regs->intrstatus);
+
/* keep it alive for ~5x suspend + resume costs */
ohci->next_statechange = jiffies + msecs_to_jiffies (250);
Index: 2.6.14-ben/drivers/usb/host/ohci-pci.c
===================================================================
--- 2.6.14-ben.orig/drivers/usb/host/ohci-pci.c
+++ 2.6.14-ben/drivers/usb/host/ohci-pci.c
@@ -14,13 +14,6 @@
* This file is licenced under the GPL.
*/
-#ifdef CONFIG_PPC_PMAC
-#include <asm/machdep.h>
-#include <asm/pmac_feature.h>
-#include <asm/pci-bridge.h>
-#include <asm/prom.h>
-#endif
-
#ifndef CONFIG_PCI
#error "This file is PCI bus glue. CONFIG_PCI must be defined."
#endif
@@ -118,6 +111,12 @@ static int ohci_pci_suspend (struct usb_
if (time_before (jiffies, ohci->next_statechange))
msleep (100);
+ /* Disable emission of interrupts during suspend */
+ ohci_writel(ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);
+ mb();
+ clear_bit(HC_FLAG_IRQ_ON, &hcd->bitflags);
+ synchronize_irq(to_pci_dev(hcd->self.controller)->irq);
+
#ifdef CONFIG_USB_SUSPEND
(void) usb_suspend_device (hcd->self.root_hub, message);
#else
@@ -129,16 +128,6 @@ static int ohci_pci_suspend (struct usb_
/* let things settle down a bit */
msleep (100);
-#ifdef CONFIG_PPC_PMAC
- if (_machine == _MACH_Pmac) {
- struct device_node *of_node;
-
- /* Disable USB PAD & cell clock */
- of_node = pci_device_to_OF_node (to_pci_dev(hcd->self.controller));
- if (of_node)
- pmac_call_feature(PMAC_FTR_USB_ENABLE, of_node, 0, 0);
- }
-#endif /* CONFIG_PPC_PMAC */
return 0;
}
@@ -148,20 +137,11 @@ static int ohci_pci_resume (struct usb_h
struct ohci_hcd *ohci = hcd_to_ohci (hcd);
int retval = 0;
-#ifdef CONFIG_PPC_PMAC
- if (_machine == _MACH_Pmac) {
- struct device_node *of_node;
-
- /* Re-enable USB PAD & cell clock */
- of_node = pci_device_to_OF_node (to_pci_dev(hcd->self.controller));
- if (of_node)
- pmac_call_feature (PMAC_FTR_USB_ENABLE, of_node, 0, 1);
- }
-#endif /* CONFIG_PPC_PMAC */
-
/* resume root hub */
if (time_before (jiffies, ohci->next_statechange))
msleep (100);
+ set_bit(HC_FLAG_IRQ_ON, &hcd->bitflags);
+
#ifdef CONFIG_USB_SUSPEND
/* get extra cleanup even if remote wakeup isn't in use */
retval = usb_resume_device (hcd->self.root_hub);
Index: 2.6.14-ben/drivers/usb/host/uhci-hcd.c
===================================================================
--- 2.6.14-ben.orig/drivers/usb/host/uhci-hcd.c
+++ 2.6.14-ben/drivers/usb/host/uhci-hcd.c
@@ -797,6 +797,11 @@ static int uhci_suspend(struct usb_hcd *
done:
spin_unlock_irq(&uhci->lock);
+ if (rc == 0) {
+ mb();
+ clear_bit(HC_FLAG_IRQ_ON, &hcd->bitflags);
+ synchronize_irq(hcd->irq);
+ }
return rc;
}
@@ -818,6 +823,8 @@ static int uhci_resume(struct usb_hcd *h
* system wakeup. Check it and reconfigure to avoid problems.
*/
check_and_reset_hc(uhci);
+ set_bit(HC_FLAG_IRQ_ON, &hcd->bitflags);
+ mb();
configure_hc(uhci);
#ifndef CONFIG_USB_SUSPEND
^ permalink raw reply
* [PATCH] ppc32: Add support for handling PCI interrupts on MPC834x PCI expansion card
From: Kumar Gala @ 2005-11-09 20:33 UTC (permalink / raw)
To: Andrew Morton; +Cc: linuxppc-embedded
The MPC8349 PIBs system has a expansion board with 6 PCI slots. We needed
to update the IDSEL interrupt mapping for it to work properly. However,
only PCI1 is supported as the first revision of this expansion board doesn't
function properly for PCI2. For the time being we have zero'd out the entries
for the IDSELs related to PCI2. When a functioning expansion board exists
we can fix the table.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
commit b23f8a20b85440d4bebf1a2ddea5830ca85ff655
tree c60902116ecca2880d12d15350fed1e5d780bc79
parent 35003e02e33939b7359635f3cf7b424723ffd4b0
author Kumar Gala <galak@kernel.crashing.org> Wed, 09 Nov 2005 14:33:30 -0600
committer Kumar Gala <galak@kernel.crashing.org> Wed, 09 Nov 2005 14:33:30 -0600
arch/ppc/platforms/83xx/mpc834x_sys.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c
index 98edc75..763777c 100644
--- a/arch/ppc/platforms/83xx/mpc834x_sys.c
+++ b/arch/ppc/platforms/83xx/mpc834x_sys.c
@@ -73,12 +73,19 @@ mpc83xx_map_irq(struct pci_dev *dev, uns
* A B C D
*/
{
- {PIRQA, PIRQB, PIRQC, PIRQD}, /* idsel 0x11 */
- {PIRQC, PIRQD, PIRQA, PIRQB}, /* idsel 0x12 */
- {PIRQD, PIRQA, PIRQB, PIRQC} /* idsel 0x13 */
+ {PIRQA, PIRQB, PIRQC, PIRQD}, /* idsel 0x11 */
+ {PIRQC, PIRQD, PIRQA, PIRQB}, /* idsel 0x12 */
+ {PIRQD, PIRQA, PIRQB, PIRQC}, /* idsel 0x13 */
+ {0, 0, 0, 0},
+ {PIRQA, PIRQB, PIRQC, PIRQD}, /* idsel 0x15 */
+ {PIRQD, PIRQA, PIRQB, PIRQC}, /* idsel 0x16 */
+ {PIRQC, PIRQD, PIRQA, PIRQB}, /* idsel 0x17 */
+ {PIRQB, PIRQC, PIRQD, PIRQA}, /* idsel 0x18 */
+ {0, 0, 0, 0}, /* idsel 0x19 */
+ {0, 0, 0, 0}, /* idsel 0x20 */
};
- const long min_idsel = 0x11, max_idsel = 0x13, irqs_per_slot = 4;
+ const long min_idsel = 0x11, max_idsel = 0x20, irqs_per_slot = 4;
return PCI_IRQ_TABLE_LOOKUP;
}
^ permalink raw reply related
* [PATCH] gianfar mii needs to zero out the mii_bus structure
From: Kumar Gala @ 2005-11-09 18:13 UTC (permalink / raw)
To: jgarzik; +Cc: netdev, linuxppc-embedded
To ensure that phy_mask and any future elements of the mii_bus
structure are initialized use kzalloc() instead of kmalloc().
This fixes an issue in which phy_mask was not being initialized
and we would skip random phy addresses when scanning.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
commit 35003e02e33939b7359635f3cf7b424723ffd4b0
tree 386160e32c51e8f1e662811738e79571c7218fdb
parent d0876a2748ddc33ca9ed1ea26cf958726c50c7b9
author Kumar Gala <galak@kernel.crashing.org> Wed, 09 Nov 2005 12:11:40 -0600
committer Kumar Gala <galak@kernel.crashing.org> Wed, 09 Nov 2005 12:11:40 -0600
drivers/net/gianfar_mii.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c
index 5a74d3d..ee1a77a 100644
--- a/drivers/net/gianfar_mii.c
+++ b/drivers/net/gianfar_mii.c
@@ -134,7 +134,7 @@ int gfar_mdio_probe(struct device *dev)
if (NULL == dev)
return -EINVAL;
- new_bus = kmalloc(sizeof(struct mii_bus), GFP_KERNEL);
+ new_bus = kzalloc(sizeof(struct mii_bus), GFP_KERNEL);
if (NULL == new_bus)
return -ENOMEM;
^ permalink raw reply related
* Re: [PATCH 2.6.14] mm: 8xx MM fix for
From: Marcelo Tosatti @ 2005-11-09 12:04 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-embedded, Dan Malek
In-Reply-To: <1131396000.4652.24.camel@gaston>
On Tue, Nov 08, 2005 at 07:39:59AM +1100, Benjamin Herrenschmidt wrote:
<snip>
> I think the current code, even with your fix, is sub-optimal. But of
> course, the only way to be sure is to do real measurements
Hi folks,
I've written a simple app to estimate pagefault latency using gettimeofday().
Can be found at http://hera.kernel.org/~marcelo/measurefault/
/* This simple program attemps to estimate how long a pagefault takes.
* It does that by mmaping() /tmp/latency-test, and touching a page.
* Time measurement is done with gettimeofday() before and after the
* data touch.
*
* In the hope to have a more precise measurement two values are subtracted
* from the pagefault time delta:
*
* - Estimated time between two subsequent gettimeofday() calls, average
* of 100 runs (this average is around 8ms on 48Mhz PPC 8xx,
* 0ms on 1Ghz Pegasos G4)
*
* - Time taken to touch the data after its TLB cached, aka second run.
* This takes 1 and 2ms on 8xx (it varies) and 0ms on 1Ghz Pegasos.
*/
And results with 48Mhz 855T, comparing internal v2.4.17, vanilla v2.6.14
and v2.6.14-jump-direct (jumping directly to handle_page_fault if the
pte is zeroed).
Each "avg:" entry is an average of 100 "measure-fault-latency.c" runs.
2.6's root is mounted on NFS.
** 2.6.14 DataTLBHandler jump direct ("two exceptions"):
first batch:
avg: 287ms
avg: 287ms
avg: 287ms
avg: 287ms
avg: 287ms
second batch:
avg: 287ms
avg: 287ms
avg: 287ms
avg: 287ms
avg: 287ms
** 2.6.14 vanilla ("three exceptions"):
first batch:
avg: 288ms
avg: 285ms
avg: 287ms
avg: 287ms
avg: 288ms
second batch:
avg: 288ms
avg: 288ms
avg: 287ms
avg: 287ms
avg: 287ms
** 2.4.17 (root on RAMDISK):
avg: 309ms
avg: 313ms
avg: 312ms
avg: 311ms
avg: 310ms
The v2.6.14's kernel jump-direct is more consistent at 287ms,
while vanilla 2.6.14 oscillates between 285 and 288ms, but
no significant difference between the two.
v2.6's fault handling is clearly faster than 2.4's (note that the compiler
is also different, 2.4 uses gcc 2.95 and 2.6 gcc 3.3).
^ permalink raw reply
* Re: fix swapping on 8xx?
From: Marcelo Tosatti @ 2005-11-09 11:21 UTC (permalink / raw)
To: Tom Rini; +Cc: David Jander, linuxppc-embedded
In-Reply-To: <20051108175658.GO3839@smtp.west.cox.net>
On Tue, Nov 08, 2005 at 10:56:58AM -0700, Tom Rini wrote:
> On Tue, Nov 08, 2005 at 01:59:26PM +0200, David Jander wrote:
> > On Tuesday 08 November 2005 01:55, Dan Malek wrote:
> > > On Nov 7, 2005, at 10:10 AM, Marcelo Tosatti wrote:
> > > > The following is an attempt to fix swapping on 8xx by not touching
> > > > _PAGE_ACCESSED bit if the page is not present.
> > >
> > > Ugh .... I suppose. I hate assembler code macros .......
> > > Somehow, "swapping" and "8xx" just don't belong together.
> >
> > Well, at least it sounds ugly together, but it is also at least conceiveable.
> > There seem to be people who use PCMCIA for an IDE interface, so swapping may
> > become desireable in some cases.
>
> I think Dan might be in the camp that says a properly designed embedded
> system won't need to swap. And when I hear about how people do try and
> swap on systems like this, I really start agreeing. Maybe we could make
> 8xx just select SWAP=n? :)
TimeSys shipped their kernel with swapping fix as far as I know (Jason
plyed with it recently).
We'd better not assume what people try to do with their old 8xx's :)
> > > I'm tempted to add a configuration option that is the complete
> > > opposite of this and assumes are really embedded system.
> > > Mark pages as always accessed, data pages as always dirty,
> > > and you can eliminate lots of TLB faults in systems that are
> > > fairly static.
> >
> > It sounds tempting indeed, but should you really notice a performance increase
> > out of this?
>
> Compared to 8xx in 2.6 today? Absolutely.
>
> --
> Tom Rini
> http://gate.crashing.org/~trini/
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply
* Re: 440EP FPU support missing
From: Josh Boyer @ 2005-11-09 16:50 UTC (permalink / raw)
To: Matt Porter; +Cc: linuxppc-dev, Stefan Roese, linuxppc64-dev
In-Reply-To: <20051108160200.I27232@cox.net>
On Tue, 2005-11-08 at 16:02 -0700, Matt Porter wrote:
> On Tue, Nov 08, 2005 at 04:32:54PM -0600, Josh Boyer wrote:
> > On Tue, 2005-11-08 at 15:30 -0700, Matt Porter wrote:
> > > On Tue, Nov 08, 2005 at 06:38:11PM +0100, Stefan Roese wrote:
> > > > In the current linux version, Bamboo (440EP) won't compile anymore, because of
> > > > missing fpu support:
> > > >
> > > > make uImage
> > > > ...
> > > > LD init/built-in.o
> > > > LD .tmp_vmlinux1
> > > > arch/ppc/kernel/head_44x.o(.text+0x868): In function `_start':
> > > > : undefined reference to `KernelFP'
> > > > make: *** [.tmp_vmlinux1] Error 1
> > > >
> > > > Somehow arch/ppc/kernel/fpu.S has disappeared. :-( I assume, this happened in
> > > > the ppc/ppc64 -> powerpc merge. Any thoughts, why this file disappeared and
> > > > how to solve this problem (just restore the original file)?
> > >
> > > arch/powerpc/kernel/fpu.S is being used now which doesn't have KernelFP.
> > > I don't know why the 44x fpu support wasn't using
> > > kernel_fp_unavailable_exception() before but I must have missed that
> > > reviewing it.
> > >
> > > Try this patch.
> >
> > Doesn't this render the 440EP's FPU useless?
>
> Does what render the 440EP's FPU useless? The supplied patch? I
> don't think so, the path should be the same as classic PPC.
>
> The patch simply replaces the KernelFP routine that used to be in
> arch/ppc/kernel/fpu.S (and was removed inadvertently in the arch/powerpc/
> merge) with a kernel_fp_unavailable_exception() call which does the
> equivalent and is shared by others.
>
> The exception still loads up the fpu is coming from userspace and
> only goes down this path when getting an FP unavailable exception from
> kernel space.
Yes, you're obviously right. I blame my idiocy on lack of coffee.
Sorry for the noise.
josh
^ permalink raw reply
* [PATCH] ppc32: fix ppc44x fpu build
From: Matt Porter @ 2005-11-09 13:42 UTC (permalink / raw)
To: akpm; +Cc: linuxppc-dev
Fixes ppc44x fpu support that broke from a bad arch/powerpc merge.
Instead of adding KernelFP back in (which duplicates code) we use
the same kernel fpu unavailable handler as classic PPC processors.
Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
diff --git a/arch/ppc/kernel/head_booke.h b/arch/ppc/kernel/head_booke.h
index aeb349b..f3d274c 100644
--- a/arch/ppc/kernel/head_booke.h
+++ b/arch/ppc/kernel/head_booke.h
@@ -358,6 +358,6 @@ label:
NORMAL_EXCEPTION_PROLOG; \
bne load_up_fpu; /* if from user, just load it up */ \
addi r3,r1,STACK_FRAME_OVERHEAD; \
- EXC_XFER_EE_LITE(0x800, KernelFP)
+ EXC_XFER_EE_LITE(0x800, kernel_fp_unavailable_exception)
#endif /* __HEAD_BOOKE_H__ */
^ permalink raw reply related
* Re: u-boot + kernel (help required)
From: Vitaly Bordug @ 2005-11-09 13:21 UTC (permalink / raw)
To: srideep.devireddy; +Cc: linuxppc-embedded
In-Reply-To: <6AD9F6A5F6E096408F0B703773355A075BB210@CHN-SNR-MBX01.wipro.com>
srideep.devireddy@wipro.com wrote:
>
>
> Hi ,
>
>
>
> we were able to get the u-boot up on MPC8272ADS board . We are just
> struck up in bringing up the Linux... we get the following errors ..
> actually we made a uImage from vmlinux and tried to tftp and used bootm
> 100000 , we eneded up with these errors ...actually after the message
> Uncompressing Kernel Image ... OK board gets reset .Any help would be
> thankfull.
>
I can suggest to try the current 2.6, on which 8272 is supported and
known to work. A problem with binary you got is possibly because of
configuration incompatibility of your u-boot and kernel binary.
>
>
>
>
> *=> tftp 100000 vmlinux.72*
>
> *Using FCC1 ETHERNET device*
>
> *TFTP from server 10.0.0.1; our IP address is 10.0.0.2*
>
> *Filename 'vmlinux.72'.*
>
> *Load address: 0x100000*
>
> *Loading: #################################################################*
>
> * #################################################################*
>
> * #######################*
>
> *done*
>
> *Bytes transferred = 782424 (bf058 hex)*
>
> *=> bootm 100000*
>
> *## Booting image at 00100000 ...*
>
> * Image Name: Linux-2.4.22*
>
> * Image Type: PowerPC Linux Kernel Image (gzip compressed)*
>
> * Data Size: 782360 Bytes = 764 kB*
>
> * Load Address: 00000000*
>
> * Entry Point: 00000000*
>
> * Verifying Checksum ... OK*
>
> * Uncompressing Kernel Image ... OK*
>
> *
> *
>
> *
> *
>
> *U-Boot 1.1.1 (Nov 8 2005 - 16:19:13)*
>
> *
> *
>
> *MPC8272 Reset Status: Check Stop, External Soft, External Hard*
>
> *
> *
>
> *MPC8272 Clock Configuration*
>
> * - Bus-to-Core Mult 3.5x, VCO Div 2, 60x Bus Freq 30-85 , Core Freq
> 100-300*
>
> * - dfbrg 1, corecnf 0x1e, busdf 3, cpmdf 1, plldf 0, pllmf 3*
>
> * - vco_out 400000000, scc_clk 100000000, brg_clk 25000000*
>
> * - cpu_clk 350000000, cpm_clk 200000000, bus_clk 100000000*
>
> * - pci_clk 66666666*
>
> *
> *
>
> *CPU: MPC8272 (HiP7 Rev 14, Mask A.0 1K50M) at 350 MHz*
>
> *Board: Motorola MPC8272ADS*
>
> *DRAM: 64 MB*
>
> *FLASH: 8 MB*
>
> *In: serial*
>
> *Out: serial*
>
> *Err: serial*
>
> *Net: FCC1 ETHERNET*
>
> *Hit any key to stop autoboot: 0*
>
> *=>*
>
>
>
>
>
> Best Regards
>
>
>
> Srideep
>
>
>
>
> Confidentiality Notice
>
> The information contained in this electronic message and any attachments
> to this message are intended
> for the exclusive use of the addressee(s) and may contain confidential
> or privileged information. If
> you are not the intended recipient, please notify the sender at Wipro or
> Mailadmin@wipro.com immediately
> and destroy all copies of this message and any attachments.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
--
Sincerely,
Vitaly
^ permalink raw reply
* Re: Using SMC on MPC8272 based board
From: Vitaly Bordug @ 2005-11-09 13:12 UTC (permalink / raw)
To: Mike Rapoport; +Cc: linuxppc-embedded list
In-Reply-To: <4371A513.6040409@compulab.co.il>
Mike Rapoport wrote:
> I have a custom board based on MPC8272 and I don't succeed to enable SMC
> serial port. I'm running Linux 2.6.12.3 with CPM serial drivers from
> 2.6.13.2.
> When I configure the kernel to use one or two SCCs, with or without
> serial console everything works fine. But if I configure the kernel to
> support SMC serial port, I see nothing at the SMC port.
> I've noticed that SMC1 pins are configured at port D (as in MPC8260),
> but MPC8272 has the SMC1 on the port C. I've changed the pins assignment
> to use the port C pins, but it didn't help.
> When I enable support for serial console on SCC/SMC port, the system
> hangs when the SMC is enabled.
> When I don't enable support for serial console on SCC/SMC port, the
> system boots OK, but there's nothing on the SMC port.
>
That is because (at least if you use "pure" 8272) the board does have
SCC1 and SCC4 for UART0 and UART1 respectively. SMC could not be used as
serial port on this board.
--
Sincerely,
Vitaly
^ permalink raw reply
* State of SPI for 2.4.25 kernel?
From: Ron Kellam @ 2005-11-09 6:55 UTC (permalink / raw)
To: linuxppc-embedded
Help! I was hoping to use SPI on an MPC8247 running the EDLK 2.4.25
kernel, but as I look into the code, I'm not hopeful...
Can someone fill me in on the state of SPI in the 2.24.xx kernels.
What about under 2.6.xx? (although I haven't yet brought 2.6.xx up on
the custom board I've got).
I've currently resorted to bit-banging for I2C, as the MPC8260 algo
driver didn't seem to behave on an 8272 family CPU. I was intending
on also going bit-banging for the SPI, but spi-algo-bit.c seems to be
in a half complete state and won't even compile.
Any info appreciated.
Thanks,
Ron Kellam.
^ permalink raw reply
* Possible improvements for CPM UART
From: Joakim Tjernlund @ 2005-11-09 11:07 UTC (permalink / raw)
To: linuxppc-embedded
Parts of these fixes in 2.4 doesn't seem to be in 2.6.
Maybe these are solved diffrently in 2.6 but I can't tell.
At least cpm_uart_console_write could use this.
http://linux.bkbits.net:8080/linux-2.4/diffs/arch/ppc/8xx_io/uart.c@1.23
?nav=3Dindex.html|src/.|src/arch|src/arch/ppc|src/arch/ppc/8xx_io|hist/ar=
c
h/ppc/8xx_io/uart.c
Another small improvement would to change:
#define RX_NUM_FIFO 4
#define RX_BUF_SIZE 32
#define TX_NUM_FIFO 4
#define TX_BUF_SIZE 32
to
#ifndef RX_NUM_FIFO
#define RX_NUM_FIFO 4
#endif
#ifndef RX_BUF_SIZE
#define RX_BUF_SIZE 32
#endif
#ifndef TX_NUM_FIFO
#define TX_NUM_FIFO 4
#endif
#ifndef TX_BUF_SIZE
#define TX_BUF_SIZE 32
#endif
This will allow custom changes to these constants
Jocke
^ permalink raw reply
* u-boot + kernel (help required)
From: srideep.devireddy @ 2005-11-09 10:55 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 2292 bytes --]
Hi ,
we were able to get the u-boot up on MPC8272ADS board . We are just
struck up in bringing up the Linux... we get the following errors ..
actually we made a uImage from vmlinux and tried to tftp and used bootm
100000 , we eneded up with these errors ...actually after the message
Uncompressing Kernel Image ... OK board gets reset .Any help would be
thankfull.
=> tftp 100000 vmlinux.72
Using FCC1 ETHERNET device
TFTP from server 10.0.0.1; our IP address is 10.0.0.2
Filename 'vmlinux.72'.
Load address: 0x100000
Loading:
#################################################################
#################################################################
#######################
done
Bytes transferred = 782424 (bf058 hex)
=> bootm 100000
## Booting image at 00100000 ...
Image Name: Linux-2.4.22
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 782360 Bytes = 764 kB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
U-Boot 1.1.1 (Nov 8 2005 - 16:19:13)
MPC8272 Reset Status: Check Stop, External Soft, External Hard
MPC8272 Clock Configuration
- Bus-to-Core Mult 3.5x, VCO Div 2, 60x Bus Freq 30-85 , Core Freq
100-300
- dfbrg 1, corecnf 0x1e, busdf 3, cpmdf 1, plldf 0, pllmf 3
- vco_out 400000000, scc_clk 100000000, brg_clk 25000000
- cpu_clk 350000000, cpm_clk 200000000, bus_clk 100000000
- pci_clk 66666666
CPU: MPC8272 (HiP7 Rev 14, Mask A.0 1K50M) at 350 MHz
Board: Motorola MPC8272ADS
DRAM: 64 MB
FLASH: 8 MB
In: serial
Out: serial
Err: serial
Net: FCC1 ETHERNET
Hit any key to stop autoboot: 0
=>
Best Regards
Srideep
Confidentiality Notice
The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.
[-- Attachment #2: Type: text/html, Size: 15645 bytes --]
^ permalink raw reply
* u-boot + kernel (help required)
From: srideep.devireddy @ 2005-11-09 10:50 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 6514 bytes --]
Hi ,
we were able to get the u-boot up on MPC8272ADS board . We are just
struck up in bringing up the Linux... we get the following errors ..
actually we made a uImage from vmlinux and tried to tftp and used bootm
100000 , we eneded up with these errors ...actually after the message
Uncompressing Kernel Image ... OK board gets reset .Any help would be
thankfull.
=> tftp 100000 vmlinux.72
Using FCC1 ETHERNET device
TFTP from server 10.0.0.1; our IP address is 10.0.0.2
Filename 'vmlinux.72'.
Load address: 0x100000
Loading:
#################################################################
#################################################################
#######################
done
Bytes transferred = 782424 (bf058 hex)
=> bootm 100000
## Booting image at 00100000 ...
Image Name: Linux-2.4.22
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 782360 Bytes = 764 kB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
U-Boot 1.1.1 (Nov 8 2005 - 16:19:13)
MPC8272 Reset Status: Check Stop, External Soft, External Hard
MPC8272 Clock Configuration
- Bus-to-Core Mult 3.5x, VCO Div 2, 60x Bus Freq 30-85 , Core Freq
100-300
- dfbrg 1, corecnf 0x1e, busdf 3, cpmdf 1, plldf 0, pllmf 3
- vco_out 400000000, scc_clk 100000000, brg_clk 25000000
- cpu_clk 350000000, cpm_clk 200000000, bus_clk 100000000
- pci_clk 66666666
CPU: MPC8272 (HiP7 Rev 14, Mask A.0 1K50M) at 350 MHz
Board: Motorola MPC8272ADS
DRAM: 64 MB
FLASH: 8 MB
In: serial
Out: serial
Err: serial
Net: FCC1 ETHERNET
Hit any key to stop autoboot: 0
=>
Best Regards
Srideep
-----Original Message-----
From: Sakethan Kotta (WT01 - Broadband Networks)
Sent: Tuesday, November 08, 2005 9:45 AM
To: Srideep DeviReddy (WT01 - Broadband Networks)
Cc: sundar raman (WT01 - Broadband Networks)
Subject: RE: Emailing: u-boot
Hi Srideep,
Nice to here this. Congrats. What was the problem? Please do reply for
this.
U can use "bootp or tftp". We have used "bootp". It has 2 options, one
is loading address & the other one is source file name. If you are not
giving the source address in the command line, bootp will take the
default address. If you don't supply the file name at the command line,
then bootp will take the file from the "DHCP server".
Before doing the TFTP, you need to get the IP Address for the board. For
that you need to run a DHCP server. Board also takes the TFTP server IP
from DHCP and will do the TFTP to down load the file. Make sure that
some 15MB from the starting of the SDRAM should not be used for the
Bootp, as that space will be used for the kernel booting.
Once the file is transferred, u have to execute the "bootm <Address>".
It will boot the kernel.
Regards,
saketh
-----Original Message-----
From: Srideep DeviReddy (WT01 - Broadband Networks)
Sent: Monday, November 07, 2005 4:29 PM
To: Sakethan Kotta (WT01 - Broadband Networks)
Subject: RE: Emailing: u-boot
Hi Saketh ,
We got u-boot up on MPC8272ADS board, thanks for your help. Right
now we are trying to get linux kernel and get the os up. As suggestion
from you , before we start this . I have a doubt at what location
(address) do we need to do a TFTP .so that when we do a go.. It starts
executing...
Best Regards
Srideep
-----Original Message-----
From: Sakethan Kotta (WT01 - Broadband Networks)
Sent: Friday, October 28, 2005 10:29 AM
To: Srideep DeviReddy (WT01 - Broadband Networks)
Cc: sundar raman (WT01 - Broadband Networks)
Subject: RE: Emailing: u-boot
Hi,
I have changed the source code and compiled. So you may need the
latest source or map file to sync the GDB with the executable.
With thanks & regards,
saketh
-----Original Message-----
From: Srideep DeviReddy (WT01 - Broadband Networks)
Sent: Friday, October 28, 2005 10:19 AM
To: Sakethan Kotta (WT01 - Broadband Networks)
Cc: sundar raman (WT01 - Broadband Networks)
Subject: RE: Emailing: u-boot
Hi sakethan,
I tried programming the U-boot.bin on to the flash at 0xfff00000
keeping the jumper pins to 2&3(BCSR) . After programming I changed them
to 1&2(flash) , and tried connecting to serial but still not able to get
u-boot prompt .
When I try to used gdb and debug we get an error like given below
(gdb) target remote 10.145.102.120:2001
Remote debugging using 10.145.102.120:2001
0xfff00100 in _start () at /u-boot-1.1.3/cpu/mpc8260/start.S:1046
warning: Source file is more recent than executable.
1046 blr
(gdb) cont
Continuing.
Program received signal SIGSTOP, Stopped (signal).
0xfff00128 in boot_warm () at /u-boot-1.1.3/cpu/mpc8260/start.S:1046
1046 blr
(gdb) d
(gdb) b relocate_code
Breakpoint 1 at 0xff803558: file /u-boot-1.1.3/cpu/mpc8260/start.S, line
1046.
(gdb) cont
Continuing.
Program received signal SIGSTOP, Stopped (signal).
0xfff00124 in boot_warm () at /u-boot-1.1.3/cpu/mpc8260/start.S:1046
1046 blr
I am getting an error in 1046 line of start.S file .
Regards
Srideep
-----Original Message-----
From: Sakethan Kotta (WT01 - Broadband Networks)
Sent: Thursday, October 27, 2005 2:40 PM
To: Srideep DeviReddy (WT01 - Broadband Networks)
Cc: sundar raman (WT01 - Broadband Networks)
Subject: Emailing: u-boot
Hi Srideep & Sunadar,
I have attached a U-Boot.Bin file. Please program this on the ADS
board at address location 0xFFF00000 & keep the jumper J9 for 2&3 pins.
Please do this and let me know the results. This should work fine.
With thanks & regards,
saketh
Confidentiality Notice
The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.
[-- Attachment #2: Type: text/html, Size: 32449 bytes --]
^ permalink raw reply
* Platform specific code
From: Joachim Denil @ 2005-11-09 9:57 UTC (permalink / raw)
To: Linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 465 bytes --]
Dear group,
For an internship i have to embed linux to a custom made board. It's based
on IBM powerpc 405gp with 64 MB Ram and 8 MB flash memory, a couple of
serial ports,.
In the arch/ppc/platform tree I probably have to write code for the custom
board. But what does the code has to do. Can someone give me some pointers
to what the code should do? I can't find documentation about it.
Thank you,
Joachim Denil
Student Karel de Grote Hogeschool Antwerpen.
[-- Attachment #2: Type: text/html, Size: 4894 bytes --]
^ permalink raw reply
* Re: 440EP FPU support missing
From: Stefan Roese @ 2005-11-09 9:47 UTC (permalink / raw)
To: Matt Porter; +Cc: linuxppc-dev, linuxppc64-dev
In-Reply-To: <20051108153036.F27232@cox.net>
On Tuesday 08 November 2005 23:30, Matt Porter wrote:
> On Tue, Nov 08, 2005 at 06:38:11PM +0100, Stefan Roese wrote:
> > Somehow arch/ppc/kernel/fpu.S has disappeared. :-( I assume, this
> > happened in the ppc/ppc64 -> powerpc merge. Any thoughts, why this file
> > disappeared and how to solve this problem (just restore the original
> > file)?
>
> arch/powerpc/kernel/fpu.S is being used now which doesn't have KernelFP.
> I don't know why the 44x fpu support wasn't using
> kernel_fp_unavailable_exception() before but I must have missed that
> reviewing it.
>
> Try this patch.
>
> -Matt
>
> diff --git a/arch/ppc/kernel/head_booke.h b/arch/ppc/kernel/head_booke.h
> index aeb349b..f3d274c 100644
> --- a/arch/ppc/kernel/head_booke.h
> +++ b/arch/ppc/kernel/head_booke.h
> @@ -358,6 +358,6 @@ label:
> NORMAL_EXCEPTION_PROLOG; \
> bne load_up_fpu; /* if from user, just load it up */ \
> addi r3,r1,STACK_FRAME_OVERHEAD; \
> - EXC_XFER_EE_LITE(0x800, KernelFP)
> + EXC_XFER_EE_LITE(0x800, kernel_fp_unavailable_exception)
>
> #endif /* __HEAD_BOOKE_H__ */
Thanks Matt. That fixes the problem. Please send this patch upstream.
Best regards,
Stefan
^ permalink raw reply
* Re: [PATCH] ppc: add support for new powerbooks
From: Benjamin Herrenschmidt @ 2005-11-09 9:00 UTC (permalink / raw)
To: Olof Johansson; +Cc: akpm, linuxppc-dev
In-Reply-To: <20051109072228.GA7983@pb15.lixom.net>
> Enablement patch for the new PowerBooks (late 2005 edition).
>
> This enables the ATA controller, Gigabit ethernet and basic AGP setup.
> Bluetooth works out-of-the box after running hid2hci.
>
> Still remaining is to get the touchpad to work, the simple change of
> just adding the new USB ids isn't enough.
>
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
^ permalink raw reply
* Using SMC on MPC8272 based board
From: Mike Rapoport @ 2005-11-09 7:28 UTC (permalink / raw)
To: linuxppc-embedded
I have a custom board based on MPC8272 and I don't succeed to enable SMC
serial port. I'm running Linux 2.6.12.3 with CPM serial drivers from
2.6.13.2.
When I configure the kernel to use one or two SCCs, with or without
serial console everything works fine. But if I configure the kernel to
support SMC serial port, I see nothing at the SMC port.
I've noticed that SMC1 pins are configured at port D (as in MPC8260),
but MPC8272 has the SMC1 on the port C. I've changed the pins assignment
to use the port C pins, but it didn't help.
When I enable support for serial console on SCC/SMC port, the system
hangs when the SMC is enabled.
When I don't enable support for serial console on SCC/SMC port, the
system boots OK, but there's nothing on the SMC port.
--
Sincerely yours,
Mike Rapoport
^ permalink raw reply
* [PATCH] ppc: add support for new powerbooks
From: Olof Johansson @ 2005-11-09 7:22 UTC (permalink / raw)
To: akpm; +Cc: linuxppc-dev
Hi,
This should be ready to go in now; we'll have to do with basic
enablement for now -- touchpad driver can come later.
Thanks,
Olof
---
Enablement patch for the new PowerBooks (late 2005 edition).
This enables the ATA controller, Gigabit ethernet and basic AGP setup.
Bluetooth works out-of-the box after running hid2hci.
Still remaining is to get the touchpad to work, the simple change of
just adding the new USB ids isn't enough.
Signed-off-by: Olof Johansson <olof@lixom.net>
Index: linux-2.6/arch/ppc/platforms/pmac_feature.c
===================================================================
--- linux-2.6.orig/arch/ppc/platforms/pmac_feature.c 2005-11-08 22:06:20.000000000 -0800
+++ linux-2.6/arch/ppc/platforms/pmac_feature.c 2005-11-08 22:06:48.000000000 -0800
@@ -2317,6 +2317,14 @@ static struct pmac_mb_def pmac_mb_defs[]
PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features,
PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
},
+ { "PowerBook5,8", "PowerBook G4 15\"",
+ PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features,
+ PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
+ },
+ { "PowerBook5,9", "PowerBook G4 17\"",
+ PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features,
+ PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
+ },
{ "PowerBook6,1", "PowerBook G4 12\"",
PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features,
PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
Index: linux-2.6/drivers/ide/ppc/pmac.c
===================================================================
--- linux-2.6.orig/drivers/ide/ppc/pmac.c 2005-11-08 22:06:22.000000000 -0800
+++ linux-2.6/drivers/ide/ppc/pmac.c 2005-11-08 22:06:48.000000000 -0800
@@ -1667,11 +1667,16 @@ static struct macio_driver pmac_ide_maci
};
static struct pci_device_id pmac_ide_pci_match[] = {
- { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_ATA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_IPID_ATA100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_K2_ATA100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+ { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_ATA,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+ { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_IPID_ATA100,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+ { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_K2_ATA100,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_SH_ATA,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+ { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_IPID2_ATA,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
};
static struct pci_driver pmac_ide_pci_driver = {
Index: linux-2.6/drivers/net/sungem.c
===================================================================
--- linux-2.6.orig/drivers/net/sungem.c 2005-10-27 17:02:08.000000000 -0700
+++ linux-2.6/drivers/net/sungem.c 2005-11-08 22:06:48.000000000 -0800
@@ -128,6 +128,8 @@ static struct pci_device_id gem_pci_tbl[
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
{ PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_SH_SUNGEM,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
+ { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_IPID2_GMAC,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
{0, }
};
Index: linux-2.6/include/linux/pci_ids.h
===================================================================
--- linux-2.6.orig/include/linux/pci_ids.h 2005-11-08 22:06:25.000000000 -0800
+++ linux-2.6/include/linux/pci_ids.h 2005-11-08 22:06:48.000000000 -0800
@@ -801,6 +803,10 @@
#define PCI_DEVICE_ID_APPLE_SH_SUNGEM 0x0051
#define PCI_DEVICE_ID_APPLE_U3L_AGP 0x0058
#define PCI_DEVICE_ID_APPLE_U3H_AGP 0x0059
+#define PCI_DEVICE_ID_APPLE_IPID2_AGP 0x0066
+#define PCI_DEVICE_ID_APPLE_IPID2_ATA 0x0069
+#define PCI_DEVICE_ID_APPLE_IPID2_FW 0x006a
+#define PCI_DEVICE_ID_APPLE_IPID2_GMAC 0x006b
#define PCI_DEVICE_ID_APPLE_TIGON3 0x1645
#define PCI_VENDOR_ID_YAMAHA 0x1073
Index: linux-2.6/drivers/char/agp/uninorth-agp.c
===================================================================
--- linux-2.6.orig/drivers/char/agp/uninorth-agp.c 2005-11-08 22:06:21.000000000 -0800
+++ linux-2.6/drivers/char/agp/uninorth-agp.c 2005-11-08 22:06:48.000000000 -0800
@@ -557,6 +557,10 @@ static struct agp_device_ids uninorth_ag
.device_id = PCI_DEVICE_ID_APPLE_U3H_AGP,
.chipset_name = "U3H",
},
+ {
+ .device_id = PCI_DEVICE_ID_APPLE_IPID2_AGP,
+ .chipset_name = "UniNorth/Intrepid2",
+ },
};
static int __devinit agp_uninorth_probe(struct pci_dev *pdev,
^ permalink raw reply
* Re: [PATCH] Merge platform codes (ignore it)
From: Benjamin Herrenschmidt @ 2005-11-09 7:14 UTC (permalink / raw)
To: linuxppc-dev list; +Cc: linuxppc64-dev
In-Reply-To: <1131505673.24637.37.camel@gaston>
Ignore it, it has bugs and I'm making it better ... new patch tomorrow.
Ben.
^ permalink raw reply
* FW: U-boot linux kernel
From: srideep.devireddy @ 2005-11-09 4:21 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 3201 bytes --]
Hi,
I am right now working on MPC 8272 Ads board to bring up the u-boot
and the linux kernel on it . As I am success full in bringing up the
u-boot . but I am finding it difficult in getting the linux up . As I
downloaded the vmlinux image from montavista linux site for 8272Ads
board and they tried to tftp to 100000 at u-boot prompt I am not able
to compress the linus kernel image and go further I end up in getting
the following errors...I tried with two images ... VMLINUX.UBOOT is a
different board image but tried it ... but not able to go further..
later I used the Uimage (got it from vmlinux using mkimage tool in
linux ) montavista image for mpc8272 ... it ended up giving me the
program check exception ...
=> tftp 100000 VMLINUX.UBOOT
Using FCC1 ETHERNET device
TFTP from server 10.0.0.1; our IP address is 10.0.0.2
Filename 'VMLINUX.UBOOT'.
Load address: 0x100000
Loading:
#################################################################
#################################################################
#########
done
Bytes transferred = 708491 (acf8b hex)
=> bootm 0x100000
## Booting image at 00100000 ...
Image Name: Linux-2.4.27-1.3.1-432
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 708427 Bytes = 691.8 kB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
=> tftp 100000 uImage
Using FCC1 ETHERNET device
TFTP from server 10.0.0.1; our IP address is 10.0.0.2
Filename 'uImage'.
Load address: 0x100000
Loading:
#################################################################
#################################################################
##########################
done
Bytes transferred = 798431 (c2edf hex)
=> bootm 0x100000
## Booting image at 00100000 ...
Image Name:
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 798367 Bytes = 779.7 kB
Load Address: 00100000
Entry Point: 00100000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
NIP: 00100000 XER: 00000000 LR: 03FD14F0 REGS: 03b84bd8 TRAP: 0700 DAR:
03FD7B38MSR: 00083002 EE: 0 PR: 0 FP: 1 ME: 1 IR/DR: 00
GPR00: 00000002 03B84CC8 C02EA000 007FFEB0 00000000 00000000 007FFF00
007FFF13
GPR08: 17D78400 03B8500C 03FF8B30 F0000088 00000000 FFFBFFFF 03FFE000
00000001
GPR16: FFFFFFFF 00100000 00000000 03FF8F7C 03BC5270 00000002 007FFF00
03FFF3AC
GPR24: 00000000 00000000 00000000 00800000 00000000 03B84F6C 03FFE600
007FFEB0
Call backtrace:
Program Check Exception
Best Regards
Srideep
Confidentiality Notice
The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.
[-- Attachment #2: Type: text/html, Size: 14392 bytes --]
^ permalink raw reply
* [PATCH] Merge platform codes
From: Benjamin Herrenschmidt @ 2005-11-09 3:07 UTC (permalink / raw)
To: linuxppc-dev list, linuxppc64-dev
This patch merges the _MACH_* and PLATFORM_* codes together, and changes
ppc64 to use _machine instead of systemcfg.h. (The later is also moved
to asm-powerpc, it will be renamed & made common in the next patch that
merges the vDSO).
Later, we'll eventually completely get rid of the platform numbers.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Index: linux-work/arch/powerpc/kernel/asm-offsets.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/asm-offsets.c 2005-11-08 11:00:17.000000000 +1100
+++ linux-work/arch/powerpc/kernel/asm-offsets.c 2005-11-09 12:00:55.000000000 +1100
@@ -106,7 +106,6 @@
DEFINE(ICACHEL1LINESIZE, offsetof(struct ppc64_caches, iline_size));
DEFINE(ICACHEL1LOGLINESIZE, offsetof(struct ppc64_caches, log_iline_size));
DEFINE(ICACHEL1LINESPERPAGE, offsetof(struct ppc64_caches, ilines_per_page));
- DEFINE(PLATFORM, offsetof(struct systemcfg, platform));
DEFINE(PLATFORM_LPAR, PLATFORM_LPAR);
/* paca */
Index: linux-work/arch/powerpc/kernel/head_64.S
===================================================================
--- linux-work.orig/arch/powerpc/kernel/head_64.S 2005-11-08 11:00:17.000000000 +1100
+++ linux-work/arch/powerpc/kernel/head_64.S 2005-11-09 12:00:55.000000000 +1100
@@ -28,7 +28,6 @@
#include <asm/reg.h>
#include <asm/page.h>
#include <asm/mmu.h>
-#include <asm/systemcfg.h>
#include <asm/ppc_asm.h>
#include <asm/asm-offsets.h>
#include <asm/bug.h>
@@ -1735,9 +1734,7 @@
sc /* HvCall_setASR */
#else
/* set the ASR */
- ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */
- ld r3,0(r3)
- lwz r3,PLATFORM(r3) /* r3 = platform flags */
+ ld r3,_machine@got(r2) /* r3 = machine type */
andi. r3,r3,PLATFORM_LPAR /* Test if bit 0 is set (LPAR bit) */
beq 98f /* branch if result is 0 */
mfspr r3,SPRN_PVR
@@ -1899,9 +1896,7 @@
/* set the ASR */
ld r3,PACASTABREAL(r13)
ori r4,r3,1 /* turn on valid bit */
- ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */
- ld r3,0(r3)
- lwz r3,PLATFORM(r3) /* r3 = platform flags */
+ ld r3,_machine@got(r2) /* r3 = machine type */
andi. r3,r3,PLATFORM_LPAR /* Test if bit 0 is set (LPAR bit) */
beq 98f /* branch if result is 0 */
mfspr r3,SPRN_PVR
@@ -1919,9 +1914,7 @@
mtasr r4 /* set the stab location */
99:
/* Set SDR1 (hash table pointer) */
- ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */
- ld r3,0(r3)
- lwz r3,PLATFORM(r3) /* r3 = platform flags */
+ ld r3,_machine@got(r2) /* r3 = machine */
/* Test if bit 0 is set (LPAR bit) */
andi. r3,r3,PLATFORM_LPAR
bne 98f /* branch if result is !0 */
Index: linux-work/arch/powerpc/kernel/prom.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/prom.c 2005-11-09 11:49:03.000000000 +1100
+++ linux-work/arch/powerpc/kernel/prom.c 2005-11-09 12:00:55.000000000 +1100
@@ -48,9 +48,6 @@
#include <asm/machdep.h>
#include <asm/pSeries_reconfig.h>
#include <asm/pci-bridge.h>
-#ifdef CONFIG_PPC64
-#include <asm/systemcfg.h>
-#endif
#ifdef DEBUG
#define DBG(fmt...) printk(KERN_ERR fmt)
@@ -391,7 +388,7 @@
#ifdef CONFIG_PPC64
/* We offset irq numbers for the u3 MPIC by 128 in PowerMac */
- if (systemcfg->platform == PLATFORM_POWERMAC && ic && ic->parent) {
+ if (_machine == PLATFORM_POWERMAC && ic && ic->parent) {
char *name = get_property(ic->parent, "name", NULL);
if (name && !strcmp(name, "u3"))
np->intrs[intrcount].line += 128;
@@ -1161,13 +1158,9 @@
prop = (u32 *)of_get_flat_dt_prop(node, "linux,platform", NULL);
if (prop == NULL)
return 0;
-#ifdef CONFIG_PPC64
- systemcfg->platform = *prop;
-#else
-#ifdef CONFIG_PPC_MULTIPLATFORM
+#if defined(CONFIG_PPC64) || defined(CONFIG_PPC_MULTIPLATFORM)
_machine = *prop;
#endif
-#endif
#ifdef CONFIG_PPC64
/* check if iommu is forced on or off */
@@ -1339,9 +1332,6 @@
of_scan_flat_dt(early_init_dt_scan_memory, NULL);
lmb_enforce_memory_limit(memory_limit);
lmb_analyze();
-#ifdef CONFIG_PPC64
- systemcfg->physicalMemorySize = lmb_phys_mem_size();
-#endif
lmb_reserve(0, __pa(klimit));
DBG("Phys. mem: %lx\n", lmb_phys_mem_size());
@@ -1908,7 +1898,7 @@
/* We don't support that function on PowerMac, at least
* not yet
*/
- if (systemcfg->platform == PLATFORM_POWERMAC)
+ if (_machine == PLATFORM_POWERMAC)
return -ENODEV;
/* fix up new node's linux_phandle field */
Index: linux-work/arch/powerpc/kernel/rtas.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/rtas.c 2005-11-09 11:49:03.000000000 +1100
+++ linux-work/arch/powerpc/kernel/rtas.c 2005-11-09 12:00:55.000000000 +1100
@@ -29,9 +29,6 @@
#include <asm/delay.h>
#include <asm/uaccess.h>
#include <asm/lmb.h>
-#ifdef CONFIG_PPC64
-#include <asm/systemcfg.h>
-#endif
struct rtas_t rtas = {
.lock = SPIN_LOCK_UNLOCKED
@@ -671,7 +668,7 @@
* the stop-self token if any
*/
#ifdef CONFIG_PPC64
- if (systemcfg->platform == PLATFORM_PSERIES_LPAR)
+ if (_machine == PLATFORM_PSERIES_LPAR)
rtas_region = min(lmb.rmo_size, RTAS_INSTANTIATE_MAX);
#endif
rtas_rmo_buf = lmb_alloc_base(RTAS_RMOBUF_MAX, PAGE_SIZE, rtas_region);
Index: linux-work/arch/powerpc/kernel/setup-common.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/setup-common.c 2005-11-09 11:49:03.000000000 +1100
+++ linux-work/arch/powerpc/kernel/setup-common.c 2005-11-09 12:00:55.000000000 +1100
@@ -33,6 +33,7 @@
#include <asm/io.h>
#include <asm/prom.h>
#include <asm/processor.h>
+#include <asm/systemcfg.h>
#include <asm/pgtable.h>
#include <asm/smp.h>
#include <asm/elf.h>
@@ -510,8 +511,8 @@
* On pSeries LPAR, we need to know how many cpus
* could possibly be added to this partition.
*/
- if (systemcfg->platform == PLATFORM_PSERIES_LPAR &&
- (dn = of_find_node_by_path("/rtas"))) {
+ if (_machine == PLATFORM_PSERIES_LPAR &&
+ (dn = of_find_node_by_path("/rtas"))) {
int num_addr_cell, num_size_cell, maxcpus;
unsigned int *ireg;
@@ -555,7 +556,7 @@
cpu_set(cpu ^ 0x1, cpu_sibling_map[cpu]);
}
- systemcfg->processorCount = num_present_cpus();
+ _systemcfg->processorCount = num_present_cpus();
#endif /* CONFIG_PPC64 */
}
#endif /* CONFIG_SMP */
Index: linux-work/arch/powerpc/kernel/setup_64.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/setup_64.c 2005-11-09 11:49:03.000000000 +1100
+++ linux-work/arch/powerpc/kernel/setup_64.c 2005-11-09 13:25:41.000000000 +1100
@@ -108,6 +108,8 @@
int boot_cpuid_phys = 0;
dev_t boot_dev;
u64 ppc64_pft_size;
+int _machine;
+EXPORT_SYMBOL(_machine);
struct ppc64_caches ppc64_caches;
EXPORT_SYMBOL_GPL(ppc64_caches);
@@ -254,11 +256,10 @@
* Iterate all ppc_md structures until we find the proper
* one for the current machine type
*/
- DBG("Probing machine type for platform %x...\n",
- systemcfg->platform);
+ DBG("Probing machine type for platform %x...\n", _machine);
for (mach = machines; *mach; mach++) {
- if ((*mach)->probe(systemcfg->platform))
+ if ((*mach)->probe(_machine))
break;
}
/* What can we do if we didn't find ? */
@@ -315,7 +316,8 @@
#endif /* CONFIG_SMP || CONFIG_KEXEC */
/*
- * Initialize some remaining members of the ppc64_caches and systemcfg structures
+ * Initialize some remaining members of the ppc64_caches and systemcfg
+ * structures
* (at least until we get rid of them completely). This is mostly some
* cache informations about the CPU that will be used by cache flush
* routines and/or provided to userland
@@ -340,7 +342,7 @@
const char *dc, *ic;
/* Then read cache informations */
- if (systemcfg->platform == PLATFORM_POWERMAC) {
+ if (_machine == PLATFORM_POWERMAC) {
dc = "d-cache-block-size";
ic = "i-cache-block-size";
} else {
@@ -360,8 +362,8 @@
DBG("Argh, can't find dcache properties ! "
"sizep: %p, lsizep: %p\n", sizep, lsizep);
- systemcfg->dcache_size = ppc64_caches.dsize = size;
- systemcfg->dcache_line_size =
+ _systemcfg->dcache_size = ppc64_caches.dsize = size;
+ _systemcfg->dcache_line_size =
ppc64_caches.dline_size = lsize;
ppc64_caches.log_dline_size = __ilog2(lsize);
ppc64_caches.dlines_per_page = PAGE_SIZE / lsize;
@@ -378,8 +380,8 @@
DBG("Argh, can't find icache properties ! "
"sizep: %p, lsizep: %p\n", sizep, lsizep);
- systemcfg->icache_size = ppc64_caches.isize = size;
- systemcfg->icache_line_size =
+ _systemcfg->icache_size = ppc64_caches.isize = size;
+ _systemcfg->icache_line_size =
ppc64_caches.iline_size = lsize;
ppc64_caches.log_iline_size = __ilog2(lsize);
ppc64_caches.ilines_per_page = PAGE_SIZE / lsize;
@@ -387,10 +389,12 @@
}
/* Add an eye catcher and the systemcfg layout version number */
- strcpy(systemcfg->eye_catcher, "SYSTEMCFG:PPC64");
- systemcfg->version.major = SYSTEMCFG_MAJOR;
- systemcfg->version.minor = SYSTEMCFG_MINOR;
- systemcfg->processor = mfspr(SPRN_PVR);
+ strcpy(_systemcfg->eye_catcher, "SYSTEMCFG:PPC64");
+ _systemcfg->version.major = SYSTEMCFG_MAJOR;
+ _systemcfg->version.minor = SYSTEMCFG_MINOR;
+ _systemcfg->processor = mfspr(SPRN_PVR);
+ _systemcfg->platform = _machine;
+ _systemcfg->physicalMemorySize = lmb_phys_mem_size();
DBG(" <- initialize_cache_info()\n");
}
@@ -479,10 +483,10 @@
printk("-----------------------------------------------------\n");
printk("ppc64_pft_size = 0x%lx\n", ppc64_pft_size);
printk("ppc64_interrupt_controller = 0x%ld\n", ppc64_interrupt_controller);
- printk("systemcfg = 0x%p\n", systemcfg);
- printk("systemcfg->platform = 0x%x\n", systemcfg->platform);
- printk("systemcfg->processorCount = 0x%lx\n", systemcfg->processorCount);
- printk("systemcfg->physicalMemorySize = 0x%lx\n", systemcfg->physicalMemorySize);
+ printk("systemcfg = 0x%p\n", _systemcfg);
+ printk("systemcfg->platform = 0x%x\n", _systemcfg->platform);
+ printk("systemcfg->processorCount = 0x%lx\n", _systemcfg->processorCount);
+ printk("systemcfg->physicalMemorySize = 0x%lx\n", _systemcfg->physicalMemorySize);
printk("ppc64_caches.dcache_line_size = 0x%x\n",
ppc64_caches.dline_size);
printk("ppc64_caches.icache_line_size = 0x%x\n",
@@ -564,12 +568,12 @@
for (i = 0; i < __NR_syscalls; i++) {
if (sys_call_table[i*2] != sys_ni_syscall) {
count64++;
- systemcfg->syscall_map_64[i >> 5] |=
+ _systemcfg->syscall_map_64[i >> 5] |=
0x80000000UL >> (i & 0x1f);
}
if (sys_call_table[i*2+1] != sys_ni_syscall) {
count32++;
- systemcfg->syscall_map_32[i >> 5] |=
+ _systemcfg->syscall_map_32[i >> 5] |=
0x80000000UL >> (i & 0x1f);
}
}
Index: linux-work/arch/powerpc/kernel/smp.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/smp.c 2005-11-09 11:49:03.000000000 +1100
+++ linux-work/arch/powerpc/kernel/smp.c 2005-11-09 12:00:55.000000000 +1100
@@ -44,6 +44,7 @@
#include <asm/cputable.h>
#include <asm/system.h>
#include <asm/mpic.h>
+#include <asm/systemcfg.h>
#ifdef CONFIG_PPC64
#include <asm/paca.h>
#endif
@@ -368,7 +369,9 @@
if (cpu == boot_cpuid)
return -EBUSY;
- systemcfg->processorCount--;
+#ifdef CONFIG_PPC64
+ _systemcfg->processorCount--;
+#endif
cpu_clear(cpu, cpu_online_map);
fixup_irqs(cpu_online_map);
return 0;
Index: linux-work/arch/powerpc/kernel/sys_ppc32.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/sys_ppc32.c 2005-11-01 14:13:52.000000000 +1100
+++ linux-work/arch/powerpc/kernel/sys_ppc32.c 2005-11-09 12:00:55.000000000 +1100
@@ -52,7 +52,6 @@
#include <asm/semaphore.h>
#include <asm/time.h>
#include <asm/mmu_context.h>
-#include <asm/systemcfg.h>
#include <asm/ppc-pci.h>
/* readdir & getdents */
Index: linux-work/arch/powerpc/kernel/time.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/time.c 2005-11-09 11:49:03.000000000 +1100
+++ linux-work/arch/powerpc/kernel/time.c 2005-11-09 12:00:55.000000000 +1100
@@ -271,13 +271,13 @@
* tb_to_xs and stamp_xsec values are consistent. If not, then it
* loops back and reads them again until this criteria is met.
*/
- ++(systemcfg->tb_update_count);
+ ++(_systemcfg->tb_update_count);
smp_wmb();
- systemcfg->tb_orig_stamp = new_tb_stamp;
- systemcfg->stamp_xsec = new_stamp_xsec;
- systemcfg->tb_to_xs = new_tb_to_xs;
+ _systemcfg->tb_orig_stamp = new_tb_stamp;
+ _systemcfg->stamp_xsec = new_stamp_xsec;
+ _systemcfg->tb_to_xs = new_tb_to_xs;
smp_wmb();
- ++(systemcfg->tb_update_count);
+ ++(_systemcfg->tb_update_count);
#endif
}
@@ -357,8 +357,9 @@
do_gtod.tb_ticks_per_sec = tb_ticks_per_sec;
tb_to_xs = divres.result_low;
do_gtod.varp->tb_to_xs = tb_to_xs;
- systemcfg->tb_ticks_per_sec = tb_ticks_per_sec;
- systemcfg->tb_to_xs = tb_to_xs;
+ _systemcfg->tb_ticks_per_sec =
+ tb_ticks_per_sec;
+ _systemcfg->tb_to_xs = tb_to_xs;
}
else {
printk( "Titan recalibrate: FAILED (difference > 4 percent)\n"
@@ -559,8 +560,8 @@
update_gtod(tb_last_jiffy, new_xsec, do_gtod.varp->tb_to_xs);
#ifdef CONFIG_PPC64
- systemcfg->tz_minuteswest = sys_tz.tz_minuteswest;
- systemcfg->tz_dsttime = sys_tz.tz_dsttime;
+ _systemcfg->tz_minuteswest = sys_tz.tz_minuteswest;
+ _systemcfg->tz_dsttime = sys_tz.tz_dsttime;
#endif
write_sequnlock_irqrestore(&xtime_lock, flags);
@@ -711,11 +712,11 @@
do_gtod.varp->tb_to_xs = tb_to_xs;
do_gtod.tb_to_us = tb_to_us;
#ifdef CONFIG_PPC64
- systemcfg->tb_orig_stamp = tb_last_jiffy;
- systemcfg->tb_update_count = 0;
- systemcfg->tb_ticks_per_sec = tb_ticks_per_sec;
- systemcfg->stamp_xsec = xtime.tv_sec * XSEC_PER_SEC;
- systemcfg->tb_to_xs = tb_to_xs;
+ _systemcfg->tb_orig_stamp = tb_last_jiffy;
+ _systemcfg->tb_update_count = 0;
+ _systemcfg->tb_ticks_per_sec = tb_ticks_per_sec;
+ _systemcfg->stamp_xsec = xtime.tv_sec * XSEC_PER_SEC;
+ _systemcfg->tb_to_xs = tb_to_xs;
#endif
time_freq = 0;
Index: linux-work/arch/ppc64/kernel/asm-offsets.c
===================================================================
--- linux-work.orig/arch/ppc64/kernel/asm-offsets.c 2005-11-08 11:00:17.000000000 +1100
+++ linux-work/arch/ppc64/kernel/asm-offsets.c 2005-11-09 12:00:55.000000000 +1100
@@ -74,7 +74,6 @@
DEFINE(ICACHEL1LINESIZE, offsetof(struct ppc64_caches, iline_size));
DEFINE(ICACHEL1LOGLINESIZE, offsetof(struct ppc64_caches, log_iline_size));
DEFINE(ICACHEL1LINESPERPAGE, offsetof(struct ppc64_caches, ilines_per_page));
- DEFINE(PLATFORM, offsetof(struct systemcfg, platform));
DEFINE(PLATFORM_LPAR, PLATFORM_LPAR);
/* paca */
Index: linux-work/arch/ppc64/kernel/eeh.c
===================================================================
--- linux-work.orig/arch/ppc64/kernel/eeh.c 2005-11-01 14:13:53.000000000 +1100
+++ linux-work/arch/ppc64/kernel/eeh.c 2005-11-09 12:00:55.000000000 +1100
@@ -32,7 +32,6 @@
#include <asm/machdep.h>
#include <asm/rtas.h>
#include <asm/atomic.h>
-#include <asm/systemcfg.h>
#include <asm/ppc-pci.h>
#undef DEBUG
@@ -932,11 +931,12 @@
{
struct proc_dir_entry *e;
- if (systemcfg->platform & PLATFORM_PSERIES) {
- e = create_proc_entry("ppc64/eeh", 0, NULL);
- if (e)
- e->proc_fops = &proc_eeh_operations;
- }
+ if (_machine != PLATFORM_PSERIES && _machine != PLATFORM_PSERIES_LPAR)
+ return 0;
+
+ e = create_proc_entry("ppc64/eeh", 0, NULL);
+ if (e)
+ e->proc_fops = &proc_eeh_operations;
return 0;
}
Index: linux-work/arch/ppc64/kernel/head.S
===================================================================
--- linux-work.orig/arch/ppc64/kernel/head.S 2005-11-08 11:00:17.000000000 +1100
+++ linux-work/arch/ppc64/kernel/head.S 2005-11-09 12:00:55.000000000 +1100
@@ -28,7 +28,6 @@
#include <asm/processor.h>
#include <asm/page.h>
#include <asm/mmu.h>
-#include <asm/systemcfg.h>
#include <asm/ppc_asm.h>
#include <asm/asm-offsets.h>
#include <asm/bug.h>
@@ -1735,9 +1734,7 @@
sc /* HvCall_setASR */
#else
/* set the ASR */
- ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */
- ld r3,0(r3)
- lwz r3,PLATFORM(r3) /* r3 = platform flags */
+ ld r3,_machine@got(r2) /* r3 = machine type */
andi. r3,r3,PLATFORM_LPAR /* Test if bit 0 is set (LPAR bit) */
beq 98f /* branch if result is 0 */
mfspr r3,SPRN_PVR
@@ -1899,9 +1896,7 @@
/* set the ASR */
ld r3,PACASTABREAL(r13)
ori r4,r3,1 /* turn on valid bit */
- ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */
- ld r3,0(r3)
- lwz r3,PLATFORM(r3) /* r3 = platform flags */
+ ld r3,_machine@got(r2) /* r3 = machine type */
andi. r3,r3,PLATFORM_LPAR /* Test if bit 0 is set (LPAR bit) */
beq 98f /* branch if result is 0 */
mfspr r3,SPRN_PVR
@@ -1919,9 +1914,7 @@
mtasr r4 /* set the stab location */
99:
/* Set SDR1 (hash table pointer) */
- ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */
- ld r3,0(r3)
- lwz r3,PLATFORM(r3) /* r3 = platform flags */
+ ld r3,_machine@got(r2) /* r3 = machine type */
/* Test if bit 0 is set (LPAR bit) */
andi. r3,r3,PLATFORM_LPAR
bne 98f /* branch if result is !0 */
Index: linux-work/arch/ppc64/kernel/idle.c
===================================================================
--- linux-work.orig/arch/ppc64/kernel/idle.c 2005-11-09 11:49:03.000000000 +1100
+++ linux-work/arch/ppc64/kernel/idle.c 2005-11-09 12:00:55.000000000 +1100
@@ -26,7 +26,6 @@
#include <asm/processor.h>
#include <asm/cputable.h>
#include <asm/time.h>
-#include <asm/systemcfg.h>
#include <asm/machdep.h>
#include <asm/smp.h>
Index: linux-work/arch/ppc64/kernel/lparcfg.c
===================================================================
--- linux-work.orig/arch/ppc64/kernel/lparcfg.c 2005-11-08 11:00:17.000000000 +1100
+++ linux-work/arch/ppc64/kernel/lparcfg.c 2005-11-09 12:00:55.000000000 +1100
@@ -35,6 +35,7 @@
#include <asm/time.h>
#include <asm/iseries/it_exp_vpd_panel.h>
#include <asm/prom.h>
+#include <asm/systemcfg.h>
#define MODULE_VERS "1.6"
#define MODULE_NAME "lparcfg"
@@ -371,7 +372,7 @@
lrdrp = (int *)get_property(rtas_node, "ibm,lrdr-capacity", NULL);
if (lrdrp == NULL) {
- partition_potential_processors = systemcfg->processorCount;
+ partition_potential_processors = _systemcfg->processorCount;
} else {
partition_potential_processors = *(lrdrp + 4);
}
Index: linux-work/arch/ppc64/kernel/nvram.c
===================================================================
--- linux-work.orig/arch/ppc64/kernel/nvram.c 2005-10-26 12:43:38.000000000 +1000
+++ linux-work/arch/ppc64/kernel/nvram.c 2005-11-09 12:00:55.000000000 +1100
@@ -31,7 +31,6 @@
#include <asm/rtas.h>
#include <asm/prom.h>
#include <asm/machdep.h>
-#include <asm/systemcfg.h>
#undef DEBUG_NVRAM
@@ -167,7 +166,7 @@
case IOC_NVRAM_GET_OFFSET: {
int part, offset;
- if (systemcfg->platform != PLATFORM_POWERMAC)
+ if (_machine != PLATFORM_POWERMAC)
return -EINVAL;
if (copy_from_user(&part, (void __user*)arg, sizeof(part)) != 0)
return -EFAULT;
@@ -450,7 +449,7 @@
* in our nvram, as Apple defined partitions use pretty much
* all of the space
*/
- if (systemcfg->platform == PLATFORM_POWERMAC)
+ if (_machine == PLATFORM_POWERMAC)
return -ENOSPC;
/* see if we have an OS partition that meets our needs.
Index: linux-work/arch/ppc64/kernel/prom.c
===================================================================
--- linux-work.orig/arch/ppc64/kernel/prom.c 2005-11-09 11:49:03.000000000 +1100
+++ linux-work/arch/ppc64/kernel/prom.c 2005-11-09 12:00:55.000000000 +1100
@@ -318,7 +318,7 @@
}
/* We offset irq numbers for the u3 MPIC by 128 in PowerMac */
- if (systemcfg->platform == PLATFORM_POWERMAC && ic && ic->parent) {
+ if (_machine == PLATFORM_POWERMAC && ic && ic->parent) {
char *name = get_property(ic->parent, "name", NULL);
if (name && !strcmp(name, "u3"))
np->intrs[intrcount].line += 128;
@@ -1065,7 +1065,7 @@
prop = (u32 *)of_get_flat_dt_prop(node, "linux,platform", NULL);
if (prop == NULL)
return 0;
- systemcfg->platform = *prop;
+ _machine = *prop;
/* check if iommu is forced on or off */
if (of_get_flat_dt_prop(node, "linux,iommu-off", NULL) != NULL)
@@ -1230,11 +1230,8 @@
of_scan_flat_dt(early_init_dt_scan_memory, NULL);
lmb_enforce_memory_limit(memory_limit);
lmb_analyze();
- systemcfg->physicalMemorySize = lmb_phys_mem_size();
lmb_reserve(0, __pa(klimit));
- DBG("Phys. mem: %lx\n", systemcfg->physicalMemorySize);
-
/* Reserve LMB regions used by kernel, initrd, dt, etc... */
early_reserve_mem();
@@ -1753,7 +1750,7 @@
/* We don't support that function on PowerMac, at least
* not yet
*/
- if (systemcfg->platform == PLATFORM_POWERMAC)
+ if (_machine == PLATFORM_POWERMAC)
return -ENODEV;
/* fix up new node's linux_phandle field */
Index: linux-work/include/asm-powerpc/firmware.h
===================================================================
--- linux-work.orig/include/asm-powerpc/firmware.h 2005-11-01 14:13:56.000000000 +1100
+++ linux-work/include/asm-powerpc/firmware.h 2005-11-09 13:26:19.000000000 +1100
@@ -43,6 +43,7 @@
#define FW_FEATURE_ISERIES (1UL<<21)
enum {
+#ifdef CONFIG_PPC64
FW_FEATURE_PSERIES_POSSIBLE = FW_FEATURE_PFT | FW_FEATURE_TCE |
FW_FEATURE_SPRG0 | FW_FEATURE_DABR | FW_FEATURE_COPY |
FW_FEATURE_ASR | FW_FEATURE_DEBUG | FW_FEATURE_TERM |
@@ -70,6 +71,11 @@
FW_FEATURE_ISERIES_ALWAYS &
#endif
FW_FEATURE_POSSIBLE,
+
+#else /* CONFIG_PPC64 */
+ FW_FEATURE_POSSIBLE = 0,
+ FW_FEATURE_ALWAYS = 0,
+#endif
};
/* This is used to identify firmware features which are available
Index: linux-work/include/asm-powerpc/processor.h
===================================================================
--- linux-work.orig/include/asm-powerpc/processor.h 2005-11-07 10:31:41.000000000 +1100
+++ linux-work/include/asm-powerpc/processor.h 2005-11-09 14:02:41.000000000 +1100
@@ -17,65 +17,71 @@
#include <linux/compiler.h>
#include <asm/ptrace.h>
#include <asm/types.h>
-#ifdef CONFIG_PPC64
-#include <asm/systemcfg.h>
-#endif
-#ifdef CONFIG_PPC32
-/* 32-bit platform types */
-/* We only need to define a new _MACH_xxx for machines which are part of
- * a configuration which supports more than one type of different machine.
- * This is currently limited to CONFIG_PPC_MULTIPLATFORM and CHRP/PReP/PMac.
- * -- Tom
+/* We do _not_ want to define new machine types at all, those must die
+ * in favor of using the device-tree
+ * -- BenH.
*/
-#define _MACH_prep 0x00000001
-#define _MACH_Pmac 0x00000002 /* pmac or pmac clone (non-chrp) */
-#define _MACH_chrp 0x00000004 /* chrp machine */
-/* see residual.h for these */
+/* Platforms codes (to be obsoleted) */
+#define PLATFORM_PSERIES 0x0100
+#define PLATFORM_PSERIES_LPAR 0x0101
+#define PLATFORM_ISERIES_LPAR 0x0201
+#define PLATFORM_LPAR 0x0001
+#define PLATFORM_POWERMAC 0x0400
+#define PLATFORM_MAPLE 0x0500
+#define PLATFORM_PREP 0x0600
+#define PLATFORM_CHRP 0x0700
+#define PLATFORM_CELL 0x1000
+
+/* Compat platform codes for 32 bits */
+#define _MACH_prep PLATFORM_PREP
+#define _MACH_Pmac PLATFORM_POWERMAC
+#define _MACH_chrp PLATFORM_CHRP
+
+/* PREP sub-platform types see residual.h for these */
#define _PREP_Motorola 0x01 /* motorola prep */
#define _PREP_Firm 0x02 /* firmworks prep */
#define _PREP_IBM 0x00 /* ibm prep */
#define _PREP_Bull 0x03 /* bull prep */
-/* these are arbitrary */
+/* CHRP sub-platform types. These are arbitrary */
#define _CHRP_Motorola 0x04 /* motorola chrp, the cobra */
#define _CHRP_IBM 0x05 /* IBM chrp, the longtrail and longtrail 2 */
#define _CHRP_Pegasos 0x06 /* Genesi/bplan's Pegasos and Pegasos2 */
+#define platform_is_pseries() (_machine == PLATFORM_PSERIES || \
+ _machine == PLATFORM_PSERIES_LPAR)
+#define platform_is_lpar() (!!(_machine & PLATFORM_LPAR))
+
#ifdef CONFIG_PPC_MULTIPLATFORM
extern int _machine;
+#ifdef CONFIG_PPC32
+
/* what kind of prep workstation we are */
extern int _prep_type;
extern int _chrp_type;
/*
* This is used to identify the board type from a given PReP board
- * vendor. Board revision is also made available.
+ * vendor. Board revision is also made available. This will be moved
+ * elsewhere soon
*/
extern unsigned char ucSystemType;
extern unsigned char ucBoardRev;
extern unsigned char ucBoardRevMaj, ucBoardRevMin;
-#else
+
+#endif /* CONFIG_PPC32 */
+
+#else /* CONFIG_PPC_MULTIPLATFORM */
#define _machine 0
+#define platform_is_pseries() (0)
+#define platform_is_lpar() (0)
#endif /* CONFIG_PPC_MULTIPLATFORM */
-#endif /* CONFIG_PPC32 */
-#ifdef CONFIG_PPC64
-/* Platforms supported by PPC64 */
-#define PLATFORM_PSERIES 0x0100
-#define PLATFORM_PSERIES_LPAR 0x0101
-#define PLATFORM_ISERIES_LPAR 0x0201
-#define PLATFORM_LPAR 0x0001
-#define PLATFORM_POWERMAC 0x0400
-#define PLATFORM_MAPLE 0x0500
-#define PLATFORM_CELL 0x1000
-/* Compatibility with drivers coming from PPC32 world */
-#define _machine (systemcfg->platform)
-#define _MACH_Pmac PLATFORM_POWERMAC
-#endif
+
/*
* Default implementation of macro that returns current
Index: linux-work/include/asm-ppc64/systemcfg.h
===================================================================
--- linux-work.orig/include/asm-ppc64/systemcfg.h 2005-09-23 12:44:12.000000000 +1000
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,64 +0,0 @@
-#ifndef _SYSTEMCFG_H
-#define _SYSTEMCFG_H
-
-/*
- * Copyright (C) 2002 Peter Bergner <bergner@vnet.ibm.com>, IBM
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-
-/* Change Activity:
- * 2002/09/30 : bergner : Created
- * End Change Activity
- */
-
-/*
- * If the major version changes we are incompatible.
- * Minor version changes are a hint.
- */
-#define SYSTEMCFG_MAJOR 1
-#define SYSTEMCFG_MINOR 1
-
-#ifndef __ASSEMBLY__
-
-#include <linux/unistd.h>
-
-#define SYSCALL_MAP_SIZE ((__NR_syscalls + 31) / 32)
-
-struct systemcfg {
- __u8 eye_catcher[16]; /* Eyecatcher: SYSTEMCFG:PPC64 0x00 */
- struct { /* Systemcfg version numbers */
- __u32 major; /* Major number 0x10 */
- __u32 minor; /* Minor number 0x14 */
- } version;
-
- __u32 platform; /* Platform flags 0x18 */
- __u32 processor; /* Processor type 0x1C */
- __u64 processorCount; /* # of physical processors 0x20 */
- __u64 physicalMemorySize; /* Size of real memory(B) 0x28 */
- __u64 tb_orig_stamp; /* Timebase at boot 0x30 */
- __u64 tb_ticks_per_sec; /* Timebase tics / sec 0x38 */
- __u64 tb_to_xs; /* Inverse of TB to 2^20 0x40 */
- __u64 stamp_xsec; /* 0x48 */
- __u64 tb_update_count; /* Timebase atomicity ctr 0x50 */
- __u32 tz_minuteswest; /* Minutes west of Greenwich 0x58 */
- __u32 tz_dsttime; /* Type of dst correction 0x5C */
- /* next four are no longer used except to be exported to /proc */
- __u32 dcache_size; /* L1 d-cache size 0x60 */
- __u32 dcache_line_size; /* L1 d-cache line size 0x64 */
- __u32 icache_size; /* L1 i-cache size 0x68 */
- __u32 icache_line_size; /* L1 i-cache line size 0x6C */
- __u32 syscall_map_64[SYSCALL_MAP_SIZE]; /* map of available syscalls 0x70 */
- __u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of available syscalls */
-};
-
-#ifdef __KERNEL__
-extern struct systemcfg *systemcfg;
-#endif
-
-#endif /* __ASSEMBLY__ */
-
-#endif /* _SYSTEMCFG_H */
Index: linux-work/arch/powerpc/kernel/prom_init.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/prom_init.c 2005-11-09 11:49:03.000000000 +1100
+++ linux-work/arch/powerpc/kernel/prom_init.c 2005-11-09 12:00:55.000000000 +1100
@@ -111,11 +111,6 @@
#define prom_debug(x...)
#endif
-#ifdef CONFIG_PPC32
-#define PLATFORM_POWERMAC _MACH_Pmac
-#define PLATFORM_CHRP _MACH_chrp
-#endif
-
typedef u32 prom_arg_t;
@@ -1996,7 +1991,8 @@
/*
* On pSeries, inform the firmware about our capabilities
*/
- if (RELOC(of_platform) & PLATFORM_PSERIES)
+ if (RELOC(of_platform) == PLATFORM_PSERIES ||
+ RELOC(of_platform) == PLATFORM_PSERIES_LPAR)
prom_send_capabilities();
#endif
Index: linux-work/arch/powerpc/kernel/rtas-proc.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/rtas-proc.c 2005-11-07 10:31:39.000000000 +1100
+++ linux-work/arch/powerpc/kernel/rtas-proc.c 2005-11-09 13:56:02.000000000 +1100
@@ -259,7 +259,7 @@
{
struct proc_dir_entry *entry;
- if (!(systemcfg->platform & PLATFORM_PSERIES))
+ if (_machine != PLATFORM_PSERIES && _machine != PLATFORM_PSERIES_LPAR)
return 1;
rtas_node = of_find_node_by_name(NULL, "rtas");
Index: linux-work/arch/powerpc/kernel/traps.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/traps.c 2005-11-09 11:49:03.000000000 +1100
+++ linux-work/arch/powerpc/kernel/traps.c 2005-11-09 12:00:55.000000000 +1100
@@ -129,7 +129,7 @@
nl = 1;
#endif
#ifdef CONFIG_PPC64
- switch (systemcfg->platform) {
+ switch (_machine) {
case PLATFORM_PSERIES:
printk("PSERIES ");
nl = 1;
Index: linux-work/arch/powerpc/mm/hash_utils_64.c
===================================================================
--- linux-work.orig/arch/powerpc/mm/hash_utils_64.c 2005-11-09 11:49:03.000000000 +1100
+++ linux-work/arch/powerpc/mm/hash_utils_64.c 2005-11-09 12:00:55.000000000 +1100
@@ -165,7 +165,7 @@
* normal insert callback here.
*/
#ifdef CONFIG_PPC_ISERIES
- if (systemcfg->platform == PLATFORM_ISERIES_LPAR)
+ if (_machine == PLATFORM_ISERIES_LPAR)
ret = iSeries_hpte_insert(hpteg, va,
virt_to_abs(paddr),
tmp_mode,
@@ -174,7 +174,7 @@
else
#endif
#ifdef CONFIG_PPC_PSERIES
- if (systemcfg->platform & PLATFORM_LPAR)
+ if (_machine & PLATFORM_LPAR)
ret = pSeries_lpar_hpte_insert(hpteg, va,
virt_to_abs(paddr),
tmp_mode,
@@ -293,7 +293,7 @@
* Not in the device-tree, let's fallback on known size
* list for 16M capable GP & GR
*/
- if ((systemcfg->platform != PLATFORM_ISERIES_LPAR) &&
+ if ((_machine != PLATFORM_ISERIES_LPAR) &&
cpu_has_feature(CPU_FTR_16M_PAGE))
memcpy(mmu_psize_defs, mmu_psize_defaults_gp,
sizeof(mmu_psize_defaults_gp));
@@ -364,7 +364,7 @@
static unsigned long __init htab_get_table_size(void)
{
- unsigned long rnd_mem_size, pteg_count;
+ unsigned long mem_size, rnd_mem_size, pteg_count;
/* If hash size isn't already provided by the platform, we try to
* retreive it from the device-tree. If it's not there neither, we
@@ -376,8 +376,9 @@
return 1UL << ppc64_pft_size;
/* round mem_size up to next power of 2 */
- rnd_mem_size = 1UL << __ilog2(systemcfg->physicalMemorySize);
- if (rnd_mem_size < systemcfg->physicalMemorySize)
+ mem_size = lmb_phys_mem_size();
+ rnd_mem_size = 1UL << __ilog2(mem_size);
+ if (rnd_mem_size < mem_size)
rnd_mem_size <<= 1;
/* # pages / 2 */
@@ -410,7 +411,7 @@
htab_hash_mask = pteg_count - 1;
- if (systemcfg->platform & PLATFORM_LPAR) {
+ if (_machine & PLATFORM_LPAR) {
/* Using a hypervisor which owns the htab */
htab_address = NULL;
_SDR1 = 0;
Index: linux-work/arch/powerpc/oprofile/op_model_power4.c
===================================================================
--- linux-work.orig/arch/powerpc/oprofile/op_model_power4.c 2005-11-09 11:49:03.000000000 +1100
+++ linux-work/arch/powerpc/oprofile/op_model_power4.c 2005-11-09 12:00:55.000000000 +1100
@@ -233,8 +233,7 @@
mmcra = mfspr(SPRN_MMCRA);
/* Were we in the hypervisor? */
- if ((systemcfg->platform == PLATFORM_PSERIES_LPAR) &&
- (mmcra & MMCRA_SIHV))
+ if (platform_is_lpar() && (mmcra & MMCRA_SIHV))
/* function descriptor madness */
return *((unsigned long *)hypervisor_bucket);
Index: linux-work/arch/powerpc/platforms/pseries/iommu.c
===================================================================
--- linux-work.orig/arch/powerpc/platforms/pseries/iommu.c 2005-11-09 11:49:03.000000000 +1100
+++ linux-work/arch/powerpc/platforms/pseries/iommu.c 2005-11-09 12:00:55.000000000 +1100
@@ -42,7 +42,6 @@
#include <asm/machdep.h>
#include <asm/abs_addr.h>
#include <asm/pSeries_reconfig.h>
-#include <asm/systemcfg.h>
#include <asm/firmware.h>
#include <asm/tce.h>
#include <asm/ppc-pci.h>
@@ -582,7 +581,7 @@
return;
}
- if (systemcfg->platform & PLATFORM_LPAR) {
+ if (platform_is_lpar()) {
if (firmware_has_feature(FW_FEATURE_MULTITCE)) {
ppc_md.tce_build = tce_buildmulti_pSeriesLP;
ppc_md.tce_free = tce_freemulti_pSeriesLP;
Index: linux-work/arch/powerpc/platforms/pseries/pci.c
===================================================================
--- linux-work.orig/arch/powerpc/platforms/pseries/pci.c 2005-11-01 14:13:53.000000000 +1100
+++ linux-work/arch/powerpc/platforms/pseries/pci.c 2005-11-09 12:00:55.000000000 +1100
@@ -123,7 +123,7 @@
int i;
unsigned int reg;
- if (!(systemcfg->platform & PLATFORM_PSERIES))
+ if (!platform_is_pseries())
return;
printk("Using INTC for W82c105 IDE controller.\n");
Index: linux-work/arch/powerpc/platforms/pseries/reconfig.c
===================================================================
--- linux-work.orig/arch/powerpc/platforms/pseries/reconfig.c 2005-11-08 11:00:17.000000000 +1100
+++ linux-work/arch/powerpc/platforms/pseries/reconfig.c 2005-11-09 12:00:55.000000000 +1100
@@ -408,7 +408,7 @@
{
struct proc_dir_entry *ent;
- if (!(systemcfg->platform & PLATFORM_PSERIES))
+ if (!platform_is_pseries())
return 0;
ent = create_proc_entry("ppc64/ofdt", S_IWUSR, NULL);
Index: linux-work/arch/powerpc/platforms/pseries/rtasd.c
===================================================================
--- linux-work.orig/arch/powerpc/platforms/pseries/rtasd.c 2005-11-07 10:31:39.000000000 +1100
+++ linux-work/arch/powerpc/platforms/pseries/rtasd.c 2005-11-09 12:00:55.000000000 +1100
@@ -482,10 +482,12 @@
{
struct proc_dir_entry *entry;
- /* No RTAS, only warn if we are on a pSeries box */
+ if (!platform_is_pseries())
+ return 0;
+
+ /* No RTAS */
if (rtas_token("event-scan") == RTAS_UNKNOWN_SERVICE) {
- if (systemcfg->platform & PLATFORM_PSERIES)
- printk(KERN_INFO "rtasd: no event-scan on system\n");
+ printk(KERN_INFO "rtasd: no event-scan on system\n");
return 1;
}
Index: linux-work/arch/powerpc/platforms/pseries/setup.c
===================================================================
--- linux-work.orig/arch/powerpc/platforms/pseries/setup.c 2005-11-09 11:49:03.000000000 +1100
+++ linux-work/arch/powerpc/platforms/pseries/setup.c 2005-11-09 12:00:55.000000000 +1100
@@ -249,7 +249,7 @@
ppc_md.idle_loop = default_idle;
}
- if (systemcfg->platform & PLATFORM_LPAR)
+ if (platform_is_lpar())
ppc_md.enable_pmcs = pseries_lpar_enable_pmcs;
else
ppc_md.enable_pmcs = power4_enable_pmcs;
@@ -378,7 +378,7 @@
fw_feature_init();
- if (systemcfg->platform & PLATFORM_LPAR)
+ if (platform_is_lpar())
hpte_init_lpar();
else {
hpte_init_native();
@@ -388,7 +388,7 @@
generic_find_legacy_serial_ports(&physport, &default_speed);
- if (systemcfg->platform & PLATFORM_LPAR)
+ if (platform_is_lpar())
find_udbg_vterm();
else if (physport) {
/* Map the uart for udbg. */
@@ -592,7 +592,7 @@
static int pSeries_pci_probe_mode(struct pci_bus *bus)
{
- if (systemcfg->platform & PLATFORM_LPAR)
+ if (platform_is_lpar())
return PCI_PROBE_DEVTREE;
return PCI_PROBE_NORMAL;
}
Index: linux-work/arch/powerpc/platforms/pseries/smp.c
===================================================================
--- linux-work.orig/arch/powerpc/platforms/pseries/smp.c 2005-11-07 10:31:39.000000000 +1100
+++ linux-work/arch/powerpc/platforms/pseries/smp.c 2005-11-09 12:00:55.000000000 +1100
@@ -46,6 +46,7 @@
#include <asm/rtas.h>
#include <asm/pSeries_reconfig.h>
#include <asm/mpic.h>
+#include <asm/systemcfg.h>
#include "plpar_wrappers.h"
@@ -96,7 +97,7 @@
int cpu = smp_processor_id();
cpu_clear(cpu, cpu_online_map);
- systemcfg->processorCount--;
+ _systemcfg->processorCount--;
/*fix boot_cpuid here*/
if (cpu == boot_cpuid)
@@ -441,7 +442,7 @@
smp_ops->cpu_die = pSeries_cpu_die;
/* Processors can be added/removed only on LPAR */
- if (systemcfg->platform == PLATFORM_PSERIES_LPAR)
+ if (platform_is_lpar())
pSeries_reconfig_notifier_register(&pSeries_smp_nb);
#endif
Index: linux-work/arch/powerpc/platforms/pseries/xics.c
===================================================================
--- linux-work.orig/arch/powerpc/platforms/pseries/xics.c 2005-11-01 14:13:53.000000000 +1100
+++ linux-work/arch/powerpc/platforms/pseries/xics.c 2005-11-09 12:00:55.000000000 +1100
@@ -545,7 +545,9 @@
of_node_put(np);
}
- if (systemcfg->platform == PLATFORM_PSERIES) {
+ if (platform_is_lpar())
+ ops = &pSeriesLP_ops;
+ else {
#ifdef CONFIG_SMP
for_each_cpu(i) {
int hard_id;
@@ -561,8 +563,6 @@
#else
xics_per_cpu[0] = ioremap(intr_base, intr_size);
#endif /* CONFIG_SMP */
- } else if (systemcfg->platform == PLATFORM_PSERIES_LPAR) {
- ops = &pSeriesLP_ops;
}
xics_8259_pic.enable = i8259_pic.enable;
Index: linux-work/arch/ppc64/kernel/pacaData.c
===================================================================
--- linux-work.orig/arch/ppc64/kernel/pacaData.c 2005-11-08 11:00:17.000000000 +1100
+++ linux-work/arch/ppc64/kernel/pacaData.c 2005-11-09 13:24:34.000000000 +1100
@@ -15,7 +15,7 @@
#include <asm/processor.h>
#include <asm/ptrace.h>
#include <asm/page.h>
-
+#include <asm/systemcfg.h>
#include <asm/lppaca.h>
#include <asm/iseries/it_lp_queue.h>
#include <asm/paca.h>
@@ -24,8 +24,7 @@
struct systemcfg data;
u8 page[PAGE_SIZE];
} systemcfg_store __attribute__((__section__(".data.page.aligned")));
-struct systemcfg *systemcfg = &systemcfg_store.data;
-EXPORT_SYMBOL(systemcfg);
+struct systemcfg *_systemcfg = &systemcfg_store.data;
/* This symbol is provided by the linker - let it fill in the paca
Index: linux-work/arch/ppc64/kernel/proc_ppc64.c
===================================================================
--- linux-work.orig/arch/ppc64/kernel/proc_ppc64.c 2005-11-07 10:31:39.000000000 +1100
+++ linux-work/arch/ppc64/kernel/proc_ppc64.c 2005-11-09 12:00:55.000000000 +1100
@@ -53,7 +53,7 @@
if (!root)
return 1;
- if (!(systemcfg->platform & (PLATFORM_PSERIES | PLATFORM_CELL)))
+ if (!(platform_is_pseries() || _machine == PLATFORM_CELL))
return 0;
if (!proc_mkdir("rtas", root))
@@ -74,7 +74,7 @@
if (!pde)
return 1;
pde->nlink = 1;
- pde->data = systemcfg;
+ pde->data = _systemcfg;
pde->size = PAGE_SIZE;
pde->proc_fops = &page_map_fops;
Index: linux-work/arch/ppc64/kernel/prom_init.c
===================================================================
--- linux-work.orig/arch/ppc64/kernel/prom_init.c 2005-11-09 11:49:03.000000000 +1100
+++ linux-work/arch/ppc64/kernel/prom_init.c 2005-11-09 12:00:55.000000000 +1100
@@ -1934,7 +1934,8 @@
/*
* On pSeries, inform the firmware about our capabilities
*/
- if (RELOC(of_platform) & PLATFORM_PSERIES)
+ if (RELOC(of_platform) == PLATFORM_PSERIES ||
+ RELOC(of_platform) == PLATFORM_PSERIES_LPAR)
prom_send_capabilities();
/*
Index: linux-work/arch/ppc64/kernel/vdso.c
===================================================================
--- linux-work.orig/arch/ppc64/kernel/vdso.c 2005-11-01 14:13:53.000000000 +1100
+++ linux-work/arch/ppc64/kernel/vdso.c 2005-11-09 12:00:55.000000000 +1100
@@ -34,6 +34,7 @@
#include <asm/machdep.h>
#include <asm/cputable.h>
#include <asm/sections.h>
+#include <asm/systemcfg.h>
#include <asm/vdso.h>
#undef DEBUG
@@ -179,7 +180,7 @@
* Last page is systemcfg.
*/
if ((vma->vm_end - address) <= PAGE_SIZE)
- pg = virt_to_page(systemcfg);
+ pg = virt_to_page(_systemcfg);
else
pg = virt_to_page(vbase + offset);
@@ -604,7 +605,7 @@
get_page(pg);
}
- get_page(virt_to_page(systemcfg));
+ get_page(virt_to_page(_systemcfg));
}
int in_gate_area_no_task(unsigned long addr)
Index: linux-work/arch/powerpc/kernel/ppc_ksyms.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/ppc_ksyms.c 2005-11-07 10:31:39.000000000 +1100
+++ linux-work/arch/powerpc/kernel/ppc_ksyms.c 2005-11-09 13:26:09.000000000 +1100
@@ -188,9 +188,6 @@
EXPORT_SYMBOL(cuda_request);
EXPORT_SYMBOL(cuda_poll);
#endif /* CONFIG_ADB_CUDA */
-#if defined(CONFIG_PPC_MULTIPLATFORM) && defined(CONFIG_PPC32)
-EXPORT_SYMBOL(_machine);
-#endif
#ifdef CONFIG_PPC_PMAC
EXPORT_SYMBOL(sys_ctrler);
#endif
Index: linux-work/arch/powerpc/kernel/setup_32.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/setup_32.c 2005-11-09 11:49:03.000000000 +1100
+++ linux-work/arch/powerpc/kernel/setup_32.c 2005-11-09 13:25:32.000000000 +1100
@@ -71,6 +71,7 @@
#ifdef CONFIG_PPC_MULTIPLATFORM
int _machine = 0;
+EXPORT_SYMBOL(_machine);
extern void prep_init(void);
extern void pmac_init(void);
Index: linux-work/arch/ppc/kernel/ppc_ksyms.c
===================================================================
--- linux-work.orig/arch/ppc/kernel/ppc_ksyms.c 2005-11-07 10:31:39.000000000 +1100
+++ linux-work/arch/ppc/kernel/ppc_ksyms.c 2005-11-09 13:25:57.000000000 +1100
@@ -217,9 +217,6 @@
EXPORT_SYMBOL(cuda_request);
EXPORT_SYMBOL(cuda_poll);
#endif /* CONFIG_ADB_CUDA */
-#ifdef CONFIG_PPC_MULTIPLATFORM
-EXPORT_SYMBOL(_machine);
-#endif
#ifdef CONFIG_PPC_PMAC
EXPORT_SYMBOL(sys_ctrler);
EXPORT_SYMBOL(pmac_newworld);
Index: linux-work/arch/ppc/kernel/setup.c
===================================================================
--- linux-work.orig/arch/ppc/kernel/setup.c 2005-11-01 14:13:53.000000000 +1100
+++ linux-work/arch/ppc/kernel/setup.c 2005-11-09 13:25:15.000000000 +1100
@@ -76,6 +76,7 @@
#ifdef CONFIG_PPC_MULTIPLATFORM
int _machine = 0;
+EXPORT_SYMBOL(_machine);
extern void prep_init(unsigned long r3, unsigned long r4,
unsigned long r5, unsigned long r6, unsigned long r7);
Index: linux-work/arch/ppc64/kernel/pci.c
===================================================================
--- linux-work.orig/arch/ppc64/kernel/pci.c 2005-11-09 11:49:03.000000000 +1100
+++ linux-work/arch/ppc64/kernel/pci.c 2005-11-09 13:04:41.000000000 +1100
@@ -1277,12 +1277,9 @@
* G5 machines... So when something asks for bus 0 io base
* (bus 0 is HT root), we return the AGP one instead.
*/
-#ifdef CONFIG_PPC_PMAC
- if (systemcfg->platform == PLATFORM_POWERMAC &&
- machine_is_compatible("MacRISC4"))
+ if (machine_is_compatible("MacRISC4"))
if (in_bus == 0)
in_bus = 0xf0;
-#endif /* CONFIG_PPC_PMAC */
/* That syscall isn't quite compatible with PCI domains, but it's
* used on pre-domains setup. We return the first match
Index: linux-work/include/asm-powerpc/systemcfg.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-work/include/asm-powerpc/systemcfg.h 2005-11-09 14:03:02.000000000 +1100
@@ -0,0 +1,64 @@
+#ifndef _SYSTEMCFG_H
+#define _SYSTEMCFG_H
+
+/*
+ * Copyright (C) 2002 Peter Bergner <bergner@vnet.ibm.com>, IBM
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+/* Change Activity:
+ * 2002/09/30 : bergner : Created
+ * End Change Activity
+ */
+
+/*
+ * If the major version changes we are incompatible.
+ * Minor version changes are a hint.
+ */
+#define SYSTEMCFG_MAJOR 1
+#define SYSTEMCFG_MINOR 1
+
+#ifndef __ASSEMBLY__
+
+#include <linux/unistd.h>
+
+#define SYSCALL_MAP_SIZE ((__NR_syscalls + 31) / 32)
+
+struct systemcfg {
+ __u8 eye_catcher[16]; /* Eyecatcher: SYSTEMCFG:PPC64 0x00 */
+ struct { /* Systemcfg version numbers */
+ __u32 major; /* Major number 0x10 */
+ __u32 minor; /* Minor number 0x14 */
+ } version;
+
+ __u32 platform; /* Platform flags 0x18 */
+ __u32 processor; /* Processor type 0x1C */
+ __u64 processorCount; /* # of physical processors 0x20 */
+ __u64 physicalMemorySize; /* Size of real memory(B) 0x28 */
+ __u64 tb_orig_stamp; /* Timebase at boot 0x30 */
+ __u64 tb_ticks_per_sec; /* Timebase tics / sec 0x38 */
+ __u64 tb_to_xs; /* Inverse of TB to 2^20 0x40 */
+ __u64 stamp_xsec; /* 0x48 */
+ __u64 tb_update_count; /* Timebase atomicity ctr 0x50 */
+ __u32 tz_minuteswest; /* Minutes west of Greenwich 0x58 */
+ __u32 tz_dsttime; /* Type of dst correction 0x5C */
+ /* next four are no longer used except to be exported to /proc */
+ __u32 dcache_size; /* L1 d-cache size 0x60 */
+ __u32 dcache_line_size; /* L1 d-cache line size 0x64 */
+ __u32 icache_size; /* L1 i-cache size 0x68 */
+ __u32 icache_line_size; /* L1 i-cache line size 0x6C */
+ __u32 syscall_map_64[SYSCALL_MAP_SIZE]; /* map of available syscalls 0x70 */
+ __u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of available syscalls */
+};
+
+#ifdef __KERNEL__
+extern struct systemcfg *_systemcfg; /* to be renamed */
+#endif
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* _SYSTEMCFG_H */
^ permalink raw reply
* Re: [PATCH 2.6.14] ppc32: Fix CONFIG_PRINTK=n building
From: Paul Mackerras @ 2005-11-09 0:56 UTC (permalink / raw)
To: Tom Rini; +Cc: Andrew Morton, Kumar Gala, Matt Mackall, linuxppc-dev
In-Reply-To: <20051108223631.GR3839@smtp.west.cox.net>
Tom Rini writes:
> The following patch is needed to allow PRINTK=n to work on ppc32.
>
> Direct calls to printk from asm files can't be magically removed so we
> have to do it manually.
Nak. We are using arch/powerpc/kernel/fpu.S now (even for ARCH=ppc)
and it doesn't do the printk in assembler.
In general I'd prefer to move the printk calls to C code rather than
adding these ifdefs.
Paul.
^ permalink raw reply
* Re: fix swapping on 8xx?
From: Dan Malek @ 2005-11-08 23:20 UTC (permalink / raw)
To: Wolfgang Denk; +Cc: Tom Rini, David Jander, linuxppc-embedded
In-Reply-To: <20051108224658.98933352B33@atlas.denx.de>
On Nov 8, 2005, at 5:46 PM, Wolfgang Denk wrote:
> Hm... as far as I can remember ....
Yes, your patch looks correct. I'll just map these changes
on top of the PTEs to verify there aren't some status
bits that we may still incorrectly update. When I originally
selected the bit positions for the PTEs I didn't properly
consider the usage of the PTE during swap (nor did
I always have the options I wanted :-))
Among everything else I promised, I'll try to get all of these
updates quickly sorted out.
Thanks for all of these pointers to old patches, saves
me time looking them up :-)
-- Dan
^ permalink raw reply
* Re: 440EP FPU support missing
From: Matt Porter @ 2005-11-08 23:02 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev, Stefan Roese, linuxppc64-dev
In-Reply-To: <1131489174.26096.0.camel@yoda.jdub.homelinux.org>
On Tue, Nov 08, 2005 at 04:32:54PM -0600, Josh Boyer wrote:
> On Tue, 2005-11-08 at 15:30 -0700, Matt Porter wrote:
> > On Tue, Nov 08, 2005 at 06:38:11PM +0100, Stefan Roese wrote:
> > > In the current linux version, Bamboo (440EP) won't compile anymore, because of
> > > missing fpu support:
> > >
> > > make uImage
> > > ...
> > > LD init/built-in.o
> > > LD .tmp_vmlinux1
> > > arch/ppc/kernel/head_44x.o(.text+0x868): In function `_start':
> > > : undefined reference to `KernelFP'
> > > make: *** [.tmp_vmlinux1] Error 1
> > >
> > > Somehow arch/ppc/kernel/fpu.S has disappeared. :-( I assume, this happened in
> > > the ppc/ppc64 -> powerpc merge. Any thoughts, why this file disappeared and
> > > how to solve this problem (just restore the original file)?
> >
> > arch/powerpc/kernel/fpu.S is being used now which doesn't have KernelFP.
> > I don't know why the 44x fpu support wasn't using
> > kernel_fp_unavailable_exception() before but I must have missed that
> > reviewing it.
> >
> > Try this patch.
>
> Doesn't this render the 440EP's FPU useless?
Does what render the 440EP's FPU useless? The supplied patch? I
don't think so, the path should be the same as classic PPC.
The patch simply replaces the KernelFP routine that used to be in
arch/ppc/kernel/fpu.S (and was removed inadvertently in the arch/powerpc/
merge) with a kernel_fp_unavailable_exception() call which does the
equivalent and is shared by others.
The exception still loads up the fpu is coming from userspace and
only goes down this path when getting an FP unavailable exception from
kernel space.
-Matt
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox