LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* RE: [PATCH 3/3] First cut at PReP support for arch/powerpc
From: Yoder Stuart-B08248 @ 2007-08-03 21:55 UTC (permalink / raw)
  To: Loeliger Jon-LOELIGER, David Gibson; +Cc: linuxppc-dev, Paul Mackerras


> > > > +		MPIC: interrupt-controller@d {
> > > > +			device_type =3D "open-pic";
> > > >=20
> > > > device_type =3D "interrupt-controller".
> >=20
> > Not according to the binding in booting-without-of.txt
>=20
> My understanding here, though possibly flawed, is that the current
> implementation has "open-pic" but _should_ have "interrupt-controller"
> as that is the officially correct name.
>=20
> I _think_ this means we need a transitional period where we update
> the code to look for "interrupt-controller", and obsoletedly, looks
> for the "open-pic", while we transition to the new, correct name.

"open-pic" is the correct value for the device_type property.
See the binding at:
http://playground.sun.com/1275/bindings/chrp/chrp1_8a.ps
That is the definition for open pic interrupt controllers (AFAIK).

I am not aware of any official binding with "interrupt-controller"=20
as the device_type.

However, the interrupt mapping spec says that all interrupt
controller (regardless of device_type) must have a=20
property named "interrupt-controller" to identify
the device node as an interrupt controller and root of
a interrupt tree.
See: http://playground.sun.com/1275/practice/imap/imap0_9d.html

Stuart

^ permalink raw reply

* Re: Page faults blowing up ... [was Re: [PATCH] Fix special PTE code for secondary hash bucket
From: Mike Strosaker @ 2007-08-03 21:54 UTC (permalink / raw)
  To: Linas Vepstas; +Cc: linuxppc-dev, Paul Mackerras, benh
In-Reply-To: <20070803193258.GA9613@austin.ibm.com>

Linas Vepstas wrote:
> 3:mon> d c0000000077b21e0
> c0000000077b21e0 e00000008004b224 0674100900000080  |.......$.t......|
> 
> Well, howdy doody, there's the value that should have been in r3 ....
> 
> c0000000077b21f0 c4008e0000000000 0000000049424d00  |............IBM.|
> 
> IBM ???
> 
> c0000000077b2200 5048003006000000 0000000000000000  |PH.0............|
> c0000000077b2210 0000000000000000 4800000300000000  |........H.......|
> c0000000077b2220 0000000000000000 0000000000000000  |................|
> c0000000077b2230 5548001806000000 1000400000000000  |UH........@.....|
> c0000000077b2240 0000200000000000 4d43002806000000  |.. .....MC.(....|
> c0000000077b2250 0000000000000001 00c3000000000000  |................|
> c0000000077b2260 e00000008004b224 0000000000000000  |.......$........|
> c0000000077b2270 d0000000000d32c0 8000000000101032  |......2........2|
> 
> hey .. wait .. d0000000000d32c0 is the faulting adddress; whats it doing here ???
> ... and 8000000000101032 is the value of the MSR ... why is that here ??

That looks like part of an RTAS event.  PH indicates a "Main A" section, UH a 
"Main B" section, and, probably of most interest to you, MC indicates a "Failing 
Memory Address" section.  The "Error and Event Notification" chapter of the PAPR 
will be useful here.  You can use rtas_dump (in either powerpc-utils or 
ppc64-utils, depending on the distro) to decode the event in its entirety.  A 
quick hand-decode of the MC section yields (might be wrong, you'll want to 
double-check):

Unrecoverable memory error (UE); transient UE, 64-bit effective address provided 
by the log (located at c0000000077b2260), 64-bit logical address of logical page 
is not provided by the log; error detected by load/store unit of the processor.

Mike

^ permalink raw reply

* Re: BusyBox passwd requires root privileges
From: khollan @ 2007-08-03 21:39 UTC (permalink / raw)
  To: linuxppc-embedded
In-Reply-To: <46B395B5.1040009@freescale.com>




Scott Wood-2 wrote:
> 
> 
> passwd needs to be setuid root.
> 
> 
How do you do that?
-- 
View this message in context: http://www.nabble.com/BusyBox-passwd-requires-root-privileges-tf4214675.html#a11991239
Sent from the linuxppc-embedded mailing list archive at Nabble.com.

^ permalink raw reply

* Re: [PATCH] lro: myri10ge example how to use LRO
From: Andrew Gallatin @ 2007-08-03 21:00 UTC (permalink / raw)
  To: Kok, Auke
  Cc: tklein, jeff, themann, netdev, linux-kernel, linuxppc-dev, raisch,
	meder, stefan.roscher, davem
In-Reply-To: <46B39063.6070301@intel.com>

Kok, Auke wrote:
> Andrew Gallatin wrote:
>> To follow up on Jan-Bernd Themann's LRO patch earlier today,
>> this patch shows how the generic LRO interface can be used for
>> page based drivers.
>>
>> Again, many thanks to Jan-Bernd Themann for leading this effort.
>>
>> Drew
>>
>> Singed off by: Andrew Gallatin <gallatin@myri.com>
>>
> 
> 
> please take a look at my lro patch for ethtool and see if it works for 
> you, instead of adding another generic module parameter that doesn't 
> need to be there.

That looks very nice, and will indeed work for me.

Thanks,

Drew

^ permalink raw reply

* Re: BusyBox passwd requires root privileges
From: Scott Wood @ 2007-08-03 20:53 UTC (permalink / raw)
  To: khollan; +Cc: linuxppc-embedded
In-Reply-To: <11990563.post@talk.nabble.com>

khollan wrote:
> I log on as a user and I want to use passwd to change that users password but
> it gives me the 
> passwd: applet requires root privileges!
> I can login as root and change all user passwords, but I want individual
> owners to be able to update their passwords.  Any ideas?

passwd needs to be setuid root.

-Scott

^ permalink raw reply

* Re: [PATCH v3] Fix ibmvscsi client for multiplatform iSeries+pSeries kernel.
From: Brian King @ 2007-08-03 20:51 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Stephen Rothwell, Paul Mackerras, linuxppc-dev
In-Reply-To: <1185882169.3083.93.camel@pmac.infradead.org>

Acked by: Brian King <brking@linux.vnet.ibm.com>

David Woodhouse wrote:
> If you build a multiplatform kernel for iSeries and pSeries, with
> ibmvscsic support, the resulting client doesn't work on iSeries.
> 
> This patch should fix that, using the appropriate low-level operations
> for the machine detected at runtime.
> 
> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
> 
> ---
> This third version of the patch is updated to apply to Linus' current
> git tree following the recent ibmvscsi updates.
> 
> diff --git a/drivers/scsi/ibmvscsi/rpa_vscsi.c b/drivers/scsi/ibmvscsi/rpa_vscsi.c
> index 9c14e78..1821461 100644
> --- a/drivers/scsi/ibmvscsi/rpa_vscsi.c
> +++ b/drivers/scsi/ibmvscsi/rpa_vscsi.c
> @@ -42,14 +42,14 @@ static unsigned int partition_number = -1;
>   * Routines for managing the command/response queue
>   */
>  /**
> - * ibmvscsi_handle_event: - Interrupt handler for crq events
> + * rpavscsi_handle_event: - Interrupt handler for crq events
>   * @irq:	number of irq to handle, not used
>   * @dev_instance: ibmvscsi_host_data of host that received interrupt
>   *
>   * Disables interrupts and schedules srp_task
>   * Always returns IRQ_HANDLED
>   */
> -static irqreturn_t ibmvscsi_handle_event(int irq, void *dev_instance)
> +static irqreturn_t rpavscsi_handle_event(int irq, void *dev_instance)
>  {
>  	struct ibmvscsi_host_data *hostdata =
>  	    (struct ibmvscsi_host_data *)dev_instance;
> @@ -66,9 +66,9 @@ static irqreturn_t ibmvscsi_handle_event(int irq, void *dev_instance)
>   * Frees irq, deallocates a page for messages, unmaps dma, and unregisters
>   * the crq with the hypervisor.
>   */
> -void ibmvscsi_release_crq_queue(struct crq_queue *queue,
> -				struct ibmvscsi_host_data *hostdata,
> -				int max_requests)
> +static void rpavscsi_release_crq_queue(struct crq_queue *queue,
> +				       struct ibmvscsi_host_data *hostdata,
> +				       int max_requests)
>  {
>  	long rc;
>  	struct vio_dev *vdev = to_vio_dev(hostdata->dev);
> @@ -108,12 +108,13 @@ static struct viosrp_crq *crq_queue_next_crq(struct crq_queue *queue)
>  }
> 
>  /**
> - * ibmvscsi_send_crq: - Send a CRQ
> + * rpavscsi_send_crq: - Send a CRQ
>   * @hostdata:	the adapter
>   * @word1:	the first 64 bits of the data
>   * @word2:	the second 64 bits of the data
>   */
> -int ibmvscsi_send_crq(struct ibmvscsi_host_data *hostdata, u64 word1, u64 word2)
> +static int rpavscsi_send_crq(struct ibmvscsi_host_data *hostdata,
> +			     u64 word1, u64 word2)
>  {
>  	struct vio_dev *vdev = to_vio_dev(hostdata->dev);
> 
> @@ -121,10 +122,10 @@ int ibmvscsi_send_crq(struct ibmvscsi_host_data *hostdata, u64 word1, u64 word2)
>  }
> 
>  /**
> - * ibmvscsi_task: - Process srps asynchronously
> + * rpavscsi_task: - Process srps asynchronously
>   * @data:	ibmvscsi_host_data of host
>   */
> -static void ibmvscsi_task(void *data)
> +static void rpavscsi_task(void *data)
>  {
>  	struct ibmvscsi_host_data *hostdata = (struct ibmvscsi_host_data *)data;
>  	struct vio_dev *vdev = to_vio_dev(hostdata->dev);
> @@ -190,6 +191,42 @@ static void set_adapter_info(struct ibmvscsi_host_data *hostdata)
>  }
> 
>  /**
> + * reset_crq_queue: - resets a crq after a failure
> + * @queue:	crq_queue to initialize and register
> + * @hostdata:	ibmvscsi_host_data of host
> + *
> + */
> +static int rpavscsi_reset_crq_queue(struct crq_queue *queue,
> +				    struct ibmvscsi_host_data *hostdata)
> +{
> +	int rc;
> +	struct vio_dev *vdev = to_vio_dev(hostdata->dev);
> +
> +	/* Close the CRQ */
> +	do {
> +		rc = plpar_hcall_norets(H_FREE_CRQ, vdev->unit_address);
> +	} while ((rc == H_BUSY) || (H_IS_LONG_BUSY(rc)));
> +
> +	/* Clean out the queue */
> +	memset(queue->msgs, 0x00, PAGE_SIZE);
> +	queue->cur = 0;
> +
> +	set_adapter_info(hostdata);
> +
> +	/* And re-open it again */
> +	rc = plpar_hcall_norets(H_REG_CRQ,
> +				vdev->unit_address,
> +				queue->msg_token, PAGE_SIZE);
> +	if (rc == 2) {
> +		/* Adapter is good, but other end is not ready */
> +		dev_warn(hostdata->dev, "Partner adapter not ready\n");
> +	} else if (rc != 0) {
> +		dev_warn(hostdata->dev, "couldn't register crq--rc 0x%x\n", rc);
> +	}
> +	return rc;
> +}
> +
> +/**
>   * initialize_crq_queue: - Initializes and registers CRQ with hypervisor
>   * @queue:	crq_queue to initialize and register
>   * @hostdata:	ibmvscsi_host_data of host
> @@ -198,9 +235,9 @@ static void set_adapter_info(struct ibmvscsi_host_data *hostdata)
>   * the crq with the hypervisor.
>   * Returns zero on success.
>   */
> -int ibmvscsi_init_crq_queue(struct crq_queue *queue,
> -			    struct ibmvscsi_host_data *hostdata,
> -			    int max_requests)
> +static int rpavscsi_init_crq_queue(struct crq_queue *queue,
> +				   struct ibmvscsi_host_data *hostdata,
> +				   int max_requests)
>  {
>  	int rc;
>  	int retrc;
> @@ -227,7 +264,7 @@ int ibmvscsi_init_crq_queue(struct crq_queue *queue,
>  				queue->msg_token, PAGE_SIZE);
>  	if (rc == H_RESOURCE)
>  		/* maybe kexecing and resource is busy. try a reset */
> -		rc = ibmvscsi_reset_crq_queue(queue,
> +		rc = rpavscsi_reset_crq_queue(queue,
>  					      hostdata);
> 
>  	if (rc == 2) {
> @@ -240,7 +277,7 @@ int ibmvscsi_init_crq_queue(struct crq_queue *queue,
>  	}
> 
>  	if (request_irq(vdev->irq,
> -			ibmvscsi_handle_event,
> +			rpavscsi_handle_event,
>  			0, "ibmvscsi", (void *)hostdata) != 0) {
>  		dev_err(hostdata->dev, "couldn't register irq 0x%x\n",
>  			vdev->irq);
> @@ -256,7 +293,7 @@ int ibmvscsi_init_crq_queue(struct crq_queue *queue,
>  	queue->cur = 0;
>  	spin_lock_init(&queue->lock);
> 
> -	tasklet_init(&hostdata->srp_task, (void *)ibmvscsi_task,
> +	tasklet_init(&hostdata->srp_task, (void *)rpavscsi_task,
>  		     (unsigned long)hostdata);
> 
>  	return retrc;
> @@ -281,8 +318,8 @@ int ibmvscsi_init_crq_queue(struct crq_queue *queue,
>   * @hostdata:	ibmvscsi_host_data of host
>   *
>   */
> -int ibmvscsi_reenable_crq_queue(struct crq_queue *queue,
> -				 struct ibmvscsi_host_data *hostdata)
> +static int rpavscsi_reenable_crq_queue(struct crq_queue *queue,
> +				       struct ibmvscsi_host_data *hostdata)
>  {
>  	int rc;
>  	struct vio_dev *vdev = to_vio_dev(hostdata->dev);
> @@ -297,38 +334,10 @@ int ibmvscsi_reenable_crq_queue(struct crq_queue *queue,
>  	return rc;
>  }
> 
> -/**
> - * reset_crq_queue: - resets a crq after a failure
> - * @queue:	crq_queue to initialize and register
> - * @hostdata:	ibmvscsi_host_data of host
> - *
> - */
> -int ibmvscsi_reset_crq_queue(struct crq_queue *queue,
> -			      struct ibmvscsi_host_data *hostdata)
> -{
> -	int rc;
> -	struct vio_dev *vdev = to_vio_dev(hostdata->dev);
> -
> -	/* Close the CRQ */
> -	do {
> -		rc = plpar_hcall_norets(H_FREE_CRQ, vdev->unit_address);
> -	} while ((rc == H_BUSY) || (H_IS_LONG_BUSY(rc)));
> -
> -	/* Clean out the queue */
> -	memset(queue->msgs, 0x00, PAGE_SIZE);
> -	queue->cur = 0;
> -
> -	set_adapter_info(hostdata);
> -
> -	/* And re-open it again */
> -	rc = plpar_hcall_norets(H_REG_CRQ,
> -				vdev->unit_address,
> -				queue->msg_token, PAGE_SIZE);
> -	if (rc == 2) {
> -		/* Adapter is good, but other end is not ready */
> -		dev_warn(hostdata->dev, "Partner adapter not ready\n");
> -	} else if (rc != 0) {
> -		dev_warn(hostdata->dev, "couldn't register crq--rc 0x%x\n", rc);
> -	}
> -	return rc;
> -}
> +struct ibmvscsi_ops rpavscsi_ops = {
> +	.init_crq_queue = rpavscsi_init_crq_queue,
> +	.release_crq_queue = rpavscsi_release_crq_queue,
> +	.reset_crq_queue = rpavscsi_reset_crq_queue,
> +	.reenable_crq_queue = rpavscsi_reenable_crq_queue,
> +	.send_crq = rpavscsi_send_crq,
> +};
> diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
> index 5870866..ed9b675 100644
> --- a/drivers/scsi/ibmvscsi/ibmvscsi.c
> +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
> @@ -70,6 +70,7 @@
>  #include <linux/moduleparam.h>
>  #include <linux/dma-mapping.h>
>  #include <linux/delay.h>
> +#include <asm/firmware.h>
>  #include <asm/vio.h>
>  #include <scsi/scsi.h>
>  #include <scsi/scsi_cmnd.h>
> @@ -89,6 +90,8 @@ static int max_requests = IBMVSCSI_MAX_REQUESTS_DEFAULT;
> 
>  #define IBMVSCSI_VERSION "1.5.8"
> 
> +static struct ibmvscsi_ops *ibmvscsi_ops;
> +
>  MODULE_DESCRIPTION("IBM Virtual SCSI");
>  MODULE_AUTHOR("Dave Boutcher");
>  MODULE_LICENSE("GPL");
> @@ -512,8 +515,8 @@ static void ibmvscsi_reset_host(struct ibmvscsi_host_data *hostdata)
>  	atomic_set(&hostdata->request_limit, 0);
> 
>  	purge_requests(hostdata, DID_ERROR);
> -	if ((ibmvscsi_reset_crq_queue(&hostdata->queue, hostdata)) ||
> -	    (ibmvscsi_send_crq(hostdata, 0xC001000000000000LL, 0)) ||
> +	if ((ibmvscsi_ops->reset_crq_queue(&hostdata->queue, hostdata)) ||
> +	    (ibmvscsi_ops->send_crq(hostdata, 0xC001000000000000LL, 0)) ||
>  	    (vio_enable_interrupts(to_vio_dev(hostdata->dev)))) {
>  		atomic_set(&hostdata->request_limit, -1);
>  		dev_err(hostdata->dev, "error after reset\n");
> @@ -618,7 +621,7 @@ static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct,
>  	}
> 
>  	if ((rc =
> -	     ibmvscsi_send_crq(hostdata, crq_as_u64[0], crq_as_u64[1])) != 0) {
> +	     ibmvscsi_ops->send_crq(hostdata, crq_as_u64[0], crq_as_u64[1])) != 0) {
>  		list_del(&evt_struct->list);
>  		del_timer(&evt_struct->timer);
> 
> @@ -1222,8 +1225,8 @@ void ibmvscsi_handle_crq(struct viosrp_crq *crq,
>  		case 0x01:	/* Initialization message */
>  			dev_info(hostdata->dev, "partner initialized\n");
>  			/* Send back a response */
> -			if ((rc = ibmvscsi_send_crq(hostdata,
> -						    0xC002000000000000LL, 0)) == 0) {
> +			if ((rc = ibmvscsi_ops->send_crq(hostdata,
> +							 0xC002000000000000LL, 0)) == 0) {
>  				/* Now login */
>  				send_srp_login(hostdata);
>  			} else {
> @@ -1248,10 +1251,10 @@ void ibmvscsi_handle_crq(struct viosrp_crq *crq,
>  			/* We need to re-setup the interpartition connection */
>  			dev_info(hostdata->dev, "Re-enabling adapter!\n");
>  			purge_requests(hostdata, DID_REQUEUE);
> -			if ((ibmvscsi_reenable_crq_queue(&hostdata->queue,
> -							hostdata)) ||
> -			    (ibmvscsi_send_crq(hostdata,
> -					       0xC001000000000000LL, 0))) {
> +			if ((ibmvscsi_ops->reenable_crq_queue(&hostdata->queue,
> +							      hostdata)) ||
> +			    (ibmvscsi_ops->send_crq(hostdata,
> +						    0xC001000000000000LL, 0))) {
>  					atomic_set(&hostdata->request_limit,
>  						   -1);
>  					dev_err(hostdata->dev, "error after enable\n");
> @@ -1261,10 +1264,10 @@ void ibmvscsi_handle_crq(struct viosrp_crq *crq,
>  				crq->format);
> 
>  			purge_requests(hostdata, DID_ERROR);
> -			if ((ibmvscsi_reset_crq_queue(&hostdata->queue,
> -							hostdata)) ||
> -			    (ibmvscsi_send_crq(hostdata,
> -					       0xC001000000000000LL, 0))) {
> +			if ((ibmvscsi_ops->reset_crq_queue(&hostdata->queue,
> +							   hostdata)) ||
> +			    (ibmvscsi_ops->send_crq(hostdata,
> +						    0xC001000000000000LL, 0))) {
>  					atomic_set(&hostdata->request_limit,
>  						   -1);
>  					dev_err(hostdata->dev, "error after reset\n");
> @@ -1590,7 +1593,7 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id)
>  	atomic_set(&hostdata->request_limit, -1);
>  	hostdata->host->max_sectors = 32 * 8; /* default max I/O 32 pages */
> 
> -	rc = ibmvscsi_init_crq_queue(&hostdata->queue, hostdata, max_requests);
> +	rc = ibmvscsi_ops->init_crq_queue(&hostdata->queue, hostdata, max_requests);
>  	if (rc != 0 && rc != H_RESOURCE) {
>  		dev_err(&vdev->dev, "couldn't initialize crq. rc=%d\n", rc);
>  		goto init_crq_failed;
> @@ -1611,7 +1614,7 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id)
>  	 * to fail if the other end is not acive.  In that case we don't
>  	 * want to scan
>  	 */
> -	if (ibmvscsi_send_crq(hostdata, 0xC001000000000000LL, 0) == 0
> +	if (ibmvscsi_ops->send_crq(hostdata, 0xC001000000000000LL, 0) == 0
>  	    || rc == H_RESOURCE) {
>  		/*
>  		 * Wait around max init_timeout secs for the adapter to finish
> @@ -1637,7 +1640,7 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id)
>        add_host_failed:
>  	release_event_pool(&hostdata->pool, hostdata);
>        init_pool_failed:
> -	ibmvscsi_release_crq_queue(&hostdata->queue, hostdata, max_requests);
> +	ibmvscsi_ops->release_crq_queue(&hostdata->queue, hostdata, max_requests);
>        init_crq_failed:
>  	scsi_host_put(host);
>        scsi_host_alloc_failed:
> @@ -1648,8 +1651,8 @@ static int ibmvscsi_remove(struct vio_dev *vdev)
>  {
>  	struct ibmvscsi_host_data *hostdata = vdev->dev.driver_data;
>  	release_event_pool(&hostdata->pool, hostdata);
> -	ibmvscsi_release_crq_queue(&hostdata->queue, hostdata,
> -				   max_requests);
> +	ibmvscsi_ops->release_crq_queue(&hostdata->queue, hostdata,
> +					max_requests);
>  	
>  	scsi_remove_host(hostdata->host);
>  	scsi_host_put(hostdata->host);
> @@ -1679,6 +1682,13 @@ static struct vio_driver ibmvscsi_driver = {
> 
>  int __init ibmvscsi_module_init(void)
>  {
> +	if (firmware_has_feature(FW_FEATURE_ISERIES))
> +		ibmvscsi_ops = &iseriesvscsi_ops;
> +	else if (firmware_has_feature(FW_FEATURE_VIO))
> +		ibmvscsi_ops = &rpavscsi_ops;
> +	else
> +		return -ENODEV;
> +
>  	return vio_register_driver(&ibmvscsi_driver);
>  }
> 
> diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.h b/drivers/scsi/ibmvscsi/ibmvscsi.h
> index b19c2e2..46e850e 100644
> --- a/drivers/scsi/ibmvscsi/ibmvscsi.h
> +++ b/drivers/scsi/ibmvscsi/ibmvscsi.h
> @@ -98,21 +98,25 @@ struct ibmvscsi_host_data {
>  };
> 
>  /* routines for managing a command/response queue */
> -int ibmvscsi_init_crq_queue(struct crq_queue *queue,
> -			    struct ibmvscsi_host_data *hostdata,
> -			    int max_requests);
> -void ibmvscsi_release_crq_queue(struct crq_queue *queue,
> -				struct ibmvscsi_host_data *hostdata,
> -				int max_requests);
> -int ibmvscsi_reset_crq_queue(struct crq_queue *queue,
> -			      struct ibmvscsi_host_data *hostdata);
> -
> -int ibmvscsi_reenable_crq_queue(struct crq_queue *queue,
> -				struct ibmvscsi_host_data *hostdata);
> -
>  void ibmvscsi_handle_crq(struct viosrp_crq *crq,
>  			 struct ibmvscsi_host_data *hostdata);
> -int ibmvscsi_send_crq(struct ibmvscsi_host_data *hostdata,
> -		      u64 word1, u64 word2);
> +
> +struct ibmvscsi_ops {
> +	int (*init_crq_queue)(struct crq_queue *queue,
> +			      struct ibmvscsi_host_data *hostdata,
> +			      int max_requests);
> +	void (*release_crq_queue)(struct crq_queue *queue,
> +				  struct ibmvscsi_host_data *hostdata,
> +				  int max_requests);
> +	int (*reset_crq_queue)(struct crq_queue *queue,
> +			       struct ibmvscsi_host_data *hostdata);
> +	int (*reenable_crq_queue)(struct crq_queue *queue,
> +				  struct ibmvscsi_host_data *hostdata);
> +	int (*send_crq)(struct ibmvscsi_host_data *hostdata,
> +		       u64 word1, u64 word2);
> +};
> +
> +extern struct ibmvscsi_ops iseriesvscsi_ops;
> +extern struct ibmvscsi_ops rpavscsi_ops;
> 
>  #endif				/* IBMVSCSI_H */
> diff --git a/drivers/scsi/ibmvscsi/iseries_vscsi.c b/drivers/scsi/ibmvscsi/iseries_vscsi.c
> index 6aeb5f0..0775fde 100644
> --- a/drivers/scsi/ibmvscsi/iseries_vscsi.c
> +++ b/drivers/scsi/ibmvscsi/iseries_vscsi.c
> @@ -53,7 +53,7 @@ struct srp_lp_event {
>  /** 
>   * standard interface for handling logical partition events.
>   */
> -static void ibmvscsi_handle_event(struct HvLpEvent *lpevt)
> +static void iseriesvscsi_handle_event(struct HvLpEvent *lpevt)
>  {
>  	struct srp_lp_event *evt = (struct srp_lp_event *)lpevt;
> 
> @@ -74,9 +74,9 @@ static void ibmvscsi_handle_event(struct HvLpEvent *lpevt)
>  /* ------------------------------------------------------------
>   * Routines for driver initialization
>   */
> -int ibmvscsi_init_crq_queue(struct crq_queue *queue,
> -			    struct ibmvscsi_host_data *hostdata,
> -			    int max_requests)
> +static int iseriesvscsi_init_crq_queue(struct crq_queue *queue,
> +				       struct ibmvscsi_host_data *hostdata,
> +				       int max_requests)
>  {
>  	int rc;
> 
> @@ -88,7 +88,7 @@ int ibmvscsi_init_crq_queue(struct crq_queue *queue,
>  		goto viopath_open_failed;
>  	}
> 
> -	rc = vio_setHandler(viomajorsubtype_scsi, ibmvscsi_handle_event);
> +	rc = vio_setHandler(viomajorsubtype_scsi, iseriesvscsi_handle_event);
>  	if (rc < 0) {
>  		printk("vio_setHandler failed with rc %d in open_event_path\n",
>  		       rc);
> @@ -102,9 +102,9 @@ int ibmvscsi_init_crq_queue(struct crq_queue *queue,
>  	return -1;
>  }
> 
> -void ibmvscsi_release_crq_queue(struct crq_queue *queue,
> -				struct ibmvscsi_host_data *hostdata,
> -				int max_requests)
> +static void iseriesvscsi_release_crq_queue(struct crq_queue *queue,
> +					   struct ibmvscsi_host_data *hostdata,
> +					   int max_requests)
>  {
>  	vio_clearHandler(viomajorsubtype_scsi);
>  	viopath_close(viopath_hostLp, viomajorsubtype_scsi, max_requests);
> @@ -117,8 +117,8 @@ void ibmvscsi_release_crq_queue(struct crq_queue *queue,
>   *
>   * no-op for iSeries
>   */
> -int ibmvscsi_reset_crq_queue(struct crq_queue *queue,
> -			      struct ibmvscsi_host_data *hostdata)
> +static int iseriesvscsi_reset_crq_queue(struct crq_queue *queue,
> +					struct ibmvscsi_host_data *hostdata)
>  {
>  	return 0;
>  }
> @@ -130,19 +130,20 @@ int ibmvscsi_reset_crq_queue(struct crq_queue *queue,
>   *
>   * no-op for iSeries
>   */
> -int ibmvscsi_reenable_crq_queue(struct crq_queue *queue,
> -				struct ibmvscsi_host_data *hostdata)
> +static int iseriesvscsi_reenable_crq_queue(struct crq_queue *queue,
> +					   struct ibmvscsi_host_data *hostdata)
>  {
>  	return 0;
>  }
> 
>  /**
> - * ibmvscsi_send_crq: - Send a CRQ
> + * iseriesvscsi_send_crq: - Send a CRQ
>   * @hostdata:	the adapter
>   * @word1:	the first 64 bits of the data
>   * @word2:	the second 64 bits of the data
>   */
> -int ibmvscsi_send_crq(struct ibmvscsi_host_data *hostdata, u64 word1, u64 word2)
> +static int iseriesvscsi_send_crq(struct ibmvscsi_host_data *hostdata,
> +				 u64 word1, u64 word2)
>  {
>  	single_host_data = hostdata;
>  	return HvCallEvent_signalLpEventFast(viopath_hostLp,
> @@ -156,3 +157,11 @@ int ibmvscsi_send_crq(struct ibmvscsi_host_data *hostdata, u64 word1, u64 word2)
>  					     VIOVERSION << 16, word1, word2, 0,
>  					     0);
>  }
> +
> +struct ibmvscsi_ops iseriesvscsi_ops = {
> +	.init_crq_queue = iseriesvscsi_init_crq_queue,
> +	.release_crq_queue = iseriesvscsi_release_crq_queue,
> +	.reset_crq_queue = iseriesvscsi_reset_crq_queue,
> +	.reenable_crq_queue = iseriesvscsi_reenable_crq_queue,
> +	.send_crq = iseriesvscsi_send_crq,
> +};
> diff --git a/drivers/scsi/ibmvscsi/Makefile b/drivers/scsi/ibmvscsi/Makefile
> index f67d9ef..6ac0633 100644
> --- a/drivers/scsi/ibmvscsi/Makefile
> +++ b/drivers/scsi/ibmvscsi/Makefile
> @@ -1,9 +1,7 @@
>  obj-$(CONFIG_SCSI_IBMVSCSI)	+= ibmvscsic.o
> 
>  ibmvscsic-y			+= ibmvscsi.o
> -ifndef CONFIG_PPC_PSERIES
>  ibmvscsic-$(CONFIG_PPC_ISERIES)	+= iseries_vscsi.o 
> -endif
>  ibmvscsic-$(CONFIG_PPC_PSERIES)	+= rpa_vscsi.o 
> 
>  obj-$(CONFIG_SCSI_IBMVSCSIS)	+= ibmvstgt.o
> 


-- 
Brian King
Linux on Power Virtualization
IBM Linux Technology Center

^ permalink raw reply

* BusyBox passwd requires root privileges
From: khollan @ 2007-08-03 20:49 UTC (permalink / raw)
  To: linuxppc-embedded


I log on as a user and I want to use passwd to change that users password but
it gives me the 
passwd: applet requires root privileges!
I can login as root and change all user passwords, but I want individual
owners to be able to update their passwords.  Any ideas?
Thanks
khollan
-- 
View this message in context: http://www.nabble.com/BusyBox-passwd-requires-root-privileges-tf4214675.html#a11990563
Sent from the linuxppc-embedded mailing list archive at Nabble.com.

^ permalink raw reply

* Re: [PATCH] lro: myri10ge example how to use LRO
From: Kok, Auke @ 2007-08-03 20:30 UTC (permalink / raw)
  To: Andrew Gallatin
  Cc: tklein, jeff, themann, netdev, linux-kernel, linuxppc-dev, raisch,
	meder, stefan.roscher, davem
In-Reply-To: <46B363A8.4010407@myri.com>

Andrew Gallatin wrote:
> To follow up on Jan-Bernd Themann's LRO patch earlier today,
> this patch shows how the generic LRO interface can be used for
> page based drivers.
> 
> Again, many thanks to Jan-Bernd Themann for leading this effort.
> 
> Drew
> 
> Singed off by: Andrew Gallatin <gallatin@myri.com>
> 


please take a look at my lro patch for ethtool and see if it works for you, 
instead of adding another generic module parameter that doesn't need to be there.

Thanks.

Auke

^ permalink raw reply

* Re: [PATCH] lro: eHEA example how to use LRO
From: Kok, Auke @ 2007-08-03 20:29 UTC (permalink / raw)
  To: Jan-Bernd Themann
  Cc: Thomas Klein, Jeff Garzik, Jan-Bernd Themann, netdev,
	linux-kernel, linux-ppc, Christoph Raisch, Marcus Eder,
	Andrew Gallatin, Stefan Roscher, David Miller
In-Reply-To: <200708031441.26841.ossthema@de.ibm.com>

Jan-Bernd Themann wrote:
> This patch shows how the generic LRO interface is used for SKB mode
> 
> Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
> 
> ---
>  drivers/net/Kconfig             |    1 +
>  drivers/net/ehea/ehea.h         |    9 ++++-
>  drivers/net/ehea/ehea_ethtool.c |   15 +++++++
>  drivers/net/ehea/ehea_main.c    |   84 +++++++++++++++++++++++++++++++++++---
>  4 files changed, 101 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
> index f8a602c..fec4004 100644
> --- a/drivers/net/Kconfig
> +++ b/drivers/net/Kconfig

<snip>

> +module_param(use_lro, int, 0);

Have you looked at my generic lro get/set patch that I posted this week? this 
adds a useless module parameter while ethtool has all the structure already to 
accomodate setting lro on/off.

Auke

^ permalink raw reply

* Re: pci in arch/powerpc vs arch/ppc
From: Scott Wood @ 2007-08-03 20:10 UTC (permalink / raw)
  To: Alexandros Kostopoulos; +Cc: linuxppc-dev
In-Reply-To: <op.twhnwi18nhx3hy@phoenix>

On Fri, Aug 03, 2007 at 05:58:56PM +0300, Alexandros Kostopoulos wrote:
> Hi all,
> in the old arch/ppc tree, there was a function called pq2ads_setup_pci()  
> that set up PCI regs for 8272xx, in m82xx_pci.c. I was wandering, where  
> are these registers configured now in arch/powerpc? I can't seem to find  
> these code now.

It's done by the firmware or the bootwrapper.

> Also, I can see that now bus 0, dev 0 (which I think represents the host  
> bridge, right?) is now excluded using pq2_pci_exclude_device, but it  
> wasn't in older code. Why is that?

The older code probably either excluded all host bridges by class, or
just lived with the error message that gets printed on boot.

-Scott

^ permalink raw reply

* Page faults blowing up ... [was Re: [PATCH] Fix special PTE code for secondary hash bucket
From: Linas Vepstas @ 2007-08-03 19:32 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev, benh
In-Reply-To: <18098.61003.38084.554299@cargo.ozlabs.ibm.com>

On Fri, Aug 03, 2007 at 06:58:51PM +1000, Paul Mackerras wrote:
> The code for mapping special 4k pages on kernels using a 64kB base
> page size was missing the code for doing the RPN (real page number)
> manipulation when inserting the hardware PTE in the secondary hash
> bucket.  It needs the same code as has already been added to the
> code that inserts the HPTE in the primary hash bucket.  This adds it.

So what are the symptoms of hitting this? Does this affect only 
recent kernels, or old ones too?

I'm hitting the craziest bug I've seen in a while, I get some
corrputed value in a register: 0x80000000077b21e0  which sure looks
like an address with 0x8... instead of 0xc... and, what is even
stranger, I find that 0xc0000000077b21e0 is pointing at the data
that I *should have had* in the register!  And theres some other
oddball stuff hinting that a page fault handler ran and blew up:

3:mon> d c0000000077b21e0
c0000000077b21e0 e00000008004b224 0674100900000080  |.......$.t......|

Well, howdy doody, there's the value that should have been in r3 ....

c0000000077b21f0 c4008e0000000000 0000000049424d00  |............IBM.|

IBM ???

c0000000077b2200 5048003006000000 0000000000000000  |PH.0............|
c0000000077b2210 0000000000000000 4800000300000000  |........H.......|
c0000000077b2220 0000000000000000 0000000000000000  |................|
c0000000077b2230 5548001806000000 1000400000000000  |UH........@.....|
c0000000077b2240 0000200000000000 4d43002806000000  |.. .....MC.(....|
c0000000077b2250 0000000000000001 00c3000000000000  |................|
c0000000077b2260 e00000008004b224 0000000000000000  |.......$........|
c0000000077b2270 d0000000000d32c0 8000000000101032  |......2........2|

hey .. wait .. d0000000000d32c0 is the faulting adddress; whats it doing here ???
... and 8000000000101032 is the value of the MSR ... why is that here ??

c0000000077b2280 0000000000000000 0000000000000000  |................|
c0000000077b2290 0000000000000000 0000000000000000  |................|


Any hints or tips appreciated ... btw, I should mention
I'm seeing this exact same bug on both 2.6.9 (RHEL4) and 
on 2.6.16 (SLES10) so... wtf ??? why now ? 

--linas

^ permalink raw reply

* Re: [patch 06/10] 40x decrementer fixes
From: Sergei Shtylyov @ 2007-08-03 17:35 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev, paulus
In-Reply-To: <20070803123043.76ff5233@weaponx.rchland.ibm.com>

Josh Boyer wrote:

>>>>>   Why bother doing this?! This will only warrant you imprecise decrementer 
>>>>>interrupts while it should be interrupting at the precise period currently (if 
>>>>>you load PIT once)...

>>>>   I.e. the error will only accumulate. NAK.

>>>What error exactly?  I'm not following you there.  If there really is
>>   I was assuming that the decrementer is in auto-reload mode.  Brain fade. :-<

> Heh, ok.  Glad I wasn't completely lost there :).

    Actually, the current set_dec() which you're fixing made me think so. :-)

> josh

WBR, Sergei

^ permalink raw reply

* Re: [patch 06/10] 40x decrementer fixes
From: Josh Boyer @ 2007-08-03 17:30 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: linuxppc-dev, paulus
In-Reply-To: <46B36651.8070209@ru.mvista.com>

On Fri, 03 Aug 2007 21:30:57 +0400
Sergei Shtylyov <sshtylyov@ru.mvista.com> wrote:

> Josh Boyer wrote:
> 
> >>>>on 40x to match the behavior 44x currently has.
> 
> >>>    Why bother doing this?! This will only warrant you imprecise decrementer 
> >>>interrupts while it should be interrupting at the precise period currently (if 
> >>>you load PIT once)...
> 
> >>    I.e. the error will only accumulate. NAK.
> 
> > What error exactly?  I'm not following you there.  If there really is
> 
>    I was assuming that the decrementer is in auto-reload mode.  Brain fade. :-<

Heh, ok.  Glad I wasn't completely lost there :).

josh

^ permalink raw reply

* Re: [patch 06/10] 40x decrementer fixes
From: Sergei Shtylyov @ 2007-08-03 17:30 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev, paulus
In-Reply-To: <20070803122512.26a24d99@weaponx.rchland.ibm.com>

Josh Boyer wrote:

>>>>on 40x to match the behavior 44x currently has.

>>>    Why bother doing this?! This will only warrant you imprecise decrementer 
>>>interrupts while it should be interrupting at the precise period currently (if 
>>>you load PIT once)...

>>    I.e. the error will only accumulate. NAK.

> What error exactly?  I'm not following you there.  If there really is

   I was assuming that the decrementer is in auto-reload mode.  Brain fade. :-<

> josh

WBR, Sergei

^ permalink raw reply

* Re: [patch 06/10] 40x decrementer fixes
From: Josh Boyer @ 2007-08-03 17:25 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: linuxppc-dev, paulus
In-Reply-To: <46B3617B.10509@ru.mvista.com>

On Fri, 03 Aug 2007 21:10:19 +0400
Sergei Shtylyov <sshtylyov@ru.mvista.com> wrote:

> I wrote:
> 
> >>Allow generic_calibrate_decr to work for 40x platforms.  Given that the hardware
> >>behavior is identical, this also changes the set_dec function to reload the PIT
> 
>     It's not actually identical. When you're writing to the PIT reg on 40x, 
> you're alos writing to the hidden PIT auto-reload reg. which is not the case 
> for 440 that is true Book E.

I said the hardware _behavior_ is identical.  On both 440 and 405, if
the PIT/DEC counts down to 0 and ARE isn't set, it just doesn't tick
anymore.  The fact that writing to PIT sets the shadow reload reg on
405 doesn't matter since ARE isn't enabled.  The same is true for 440
at the moment, since DECAR is never set.

> 
> >>on 40x to match the behavior 44x currently has.
> 
> >     Why bother doing this?! This will only warrant you imprecise decrementer 
> > interrupts while it should be interrupting at the precise period currently (if 
> > you load PIT once)...
> 
>     I.e. the error will only accumulate. NAK.

What error exactly?  I'm not following you there.  If there really is
an error, then we can fix it but it seems that it would be common error
for both 440 and 405 at the moment.

josh

^ permalink raw reply

* Re: [patch 06/10] 40x decrementer fixes
From: Sergei Shtylyov @ 2007-08-03 17:25 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev, paulus
In-Reply-To: <20070803121525.61155586@weaponx.rchland.ibm.com>

Josh Boyer wrote:

>>>Allow generic_calibrate_decr to work for 40x platforms.  Given that the hardware
>>>behavior is identical, this also changes the set_dec function to reload the PIT
>>>on 40x to match the behavior 44x currently has.

>>    Why bother doing this?! This will only warrant you imprecise decrementer 
>>interrupts while it should be interrupting at the precise period currently (if 
>>you load PIT once)...

> Without some kind of fix, it doesn't function at all.  We can load the
> PIT once, but then we need to make sure ARE is set because if the PIT
> ticks down to zero it just sits there.

    Ah, sorry... somehow I thought 40x doesn't have TCR and so only a periodic 
mode. :-<

> josh

WBR, Sergei

^ permalink raw reply

* [PATCH] lro: myri10ge example how to use LRO
From: Andrew Gallatin @ 2007-08-03 17:19 UTC (permalink / raw)
  To: netdev
  Cc: tklein, jeff, themann, linux-kernel, linuxppc-dev, raisch, meder,
	stefan.roscher, davem

[-- Attachment #1: Type: text/plain, Size: 268 bytes --]

To follow up on Jan-Bernd Themann's LRO patch earlier today,
this patch shows how the generic LRO interface can be used for
page based drivers.

Again, many thanks to Jan-Bernd Themann for leading this effort.

Drew

Singed off by: Andrew Gallatin <gallatin@myri.com>

[-- Attachment #2: myri10ge_lro.diff --]
[-- Type: text/plain, Size: 6263 bytes --]

diff -urNp a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
--- a/drivers/net/myri10ge/myri10ge.c	2007-07-24 15:57:12.000000000 -0400
+++ b/drivers/net/myri10ge/myri10ge.c	2007-08-03 13:07:48.000000000 -0400
@@ -48,6 +48,7 @@
 #include <linux/etherdevice.h>
 #include <linux/if_ether.h>
 #include <linux/if_vlan.h>
+#include <linux/inet_lro.h>
 #include <linux/ip.h>
 #include <linux/inet.h>
 #include <linux/in.h>
@@ -62,6 +63,8 @@
 #include <linux/io.h>
 #include <linux/log2.h>
 #include <net/checksum.h>
+#include <net/ip.h>
+#include <net/tcp.h>
 #include <asm/byteorder.h>
 #include <asm/io.h>
 #include <asm/processor.h>
@@ -89,6 +92,7 @@ MODULE_LICENSE("Dual BSD/GPL");
 
 #define MYRI10GE_EEPROM_STRINGS_SIZE 256
 #define MYRI10GE_MAX_SEND_DESC_TSO ((65536 / 2048) * 2)
+#define MYRI10GE_MAX_LRO_DESCRIPTORS 8
 
 #define MYRI10GE_NO_CONFIRM_DATA htonl(0xffffffff)
 #define MYRI10GE_NO_RESPONSE_RESULT 0xffffffff
@@ -151,6 +155,8 @@ struct myri10ge_rx_done {
 	dma_addr_t bus;
 	int cnt;
 	int idx;
+	struct net_lro_mgr lro_mgr;
+	struct net_lro_desc lro_desc[MYRI10GE_MAX_LRO_DESCRIPTORS];
 };
 
 struct myri10ge_priv {
@@ -276,6 +282,14 @@ static int myri10ge_debug = -1;	/* defau
 module_param(myri10ge_debug, int, 0);
 MODULE_PARM_DESC(myri10ge_debug, "Debug level (0=none,...,16=all)");
 
+static int myri10ge_lro = 1;
+module_param(myri10ge_lro, int, S_IRUGO);
+MODULE_PARM_DESC(myri10ge_lro, "Enable large receive offload\n");
+
+static int myri10ge_lro_max_pkts = MYRI10GE_LRO_MAX_PKTS;
+module_param(myri10ge_lro_max_pkts, int, S_IRUGO);
+MODULE_PARM_DESC(myri10ge_lro, "Number of LRO packets to be aggregated\n");
+
 static int myri10ge_fill_thresh = 256;
 module_param(myri10ge_fill_thresh, int, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(myri10ge_fill_thresh, "Number of empty rx slots allowed\n");
@@ -1019,6 +1033,15 @@ myri10ge_rx_done(struct myri10ge_priv *m
 		remainder -= MYRI10GE_ALLOC_SIZE;
 	}
 
+	if (mgp->csum_flag && myri10ge_lro) {
+		rx_frags[0].page_offset += MXGEFW_PAD;
+		rx_frags[0].size -= MXGEFW_PAD;
+		len -= MXGEFW_PAD;
+		lro_receive_frags(&mgp->rx_done.lro_mgr, rx_frags,
+				  len, len, (void *)(unsigned long)csum, csum);
+		return 1;
+	}
+
 	hlen = MYRI10GE_HLEN > len ? len : MYRI10GE_HLEN;
 
 	/* allocate an skb to attach the page(s) to. */
@@ -1137,6 +1160,9 @@ static inline void myri10ge_clean_rx_don
 	mgp->stats.rx_packets += rx_packets;
 	mgp->stats.rx_bytes += rx_bytes;
 
+	if (myri10ge_lro)
+		lro_flush_all(&rx_done->lro_mgr);
+
 	/* restock receive rings if needed */
 	if (mgp->rx_small.fill_cnt - mgp->rx_small.cnt < myri10ge_fill_thresh)
 		myri10ge_alloc_rx_pages(mgp, &mgp->rx_small,
@@ -1378,7 +1404,8 @@ static const char myri10ge_gstrings_stat
 	"dropped_pause", "dropped_bad_phy", "dropped_bad_crc32",
 	"dropped_unicast_filtered", "dropped_multicast_filtered",
 	"dropped_runt", "dropped_overrun", "dropped_no_small_buffer",
-	"dropped_no_big_buffer"
+	"dropped_no_big_buffer", "LRO aggregated", "LRO flushed",
+	"LRO avg aggr", "LRO no_desc"
 };
 
 #define MYRI10GE_NET_STATS_LEN      21
@@ -1444,6 +1471,14 @@ myri10ge_get_ethtool_stats(struct net_de
 	data[i++] = (unsigned int)ntohl(mgp->fw_stats->dropped_overrun);
 	data[i++] = (unsigned int)ntohl(mgp->fw_stats->dropped_no_small_buffer);
 	data[i++] = (unsigned int)ntohl(mgp->fw_stats->dropped_no_big_buffer);
+	data[i++] = mgp->rx_done.lro_mgr.stats.aggregated;
+	data[i++] = mgp->rx_done.lro_mgr.stats.flushed;
+	if (mgp->rx_done.lro_mgr.stats.flushed)
+		data[i++] = mgp->rx_done.lro_mgr.stats.aggregated /
+		    mgp->rx_done.lro_mgr.stats.flushed;
+	else
+		data[i++] = 0;
+	data[i++] = mgp->rx_done.lro_mgr.stats.no_desc;
 }
 
 static void myri10ge_set_msglevel(struct net_device *netdev, u32 value)
@@ -1717,10 +1752,69 @@ static void myri10ge_free_irq(struct myr
 		pci_disable_msi(pdev);
 }
 
+static int
+myri10ge_get_frag_header(struct skb_frag_struct *frag, void **mac_hdr,
+			 void **ip_hdr, void **tcpudp_hdr,
+			 u64 * hdr_flags, void *priv)
+{
+	struct ethhdr *eh;
+	struct vlan_ethhdr *veh;
+	struct iphdr *iph;
+	u8 *va = page_address(frag->page) + frag->page_offset;
+	unsigned long ll_hlen;
+	__wsum csum = (__wsum) (unsigned long)priv;
+
+	/* find the mac header, aborting if not IPv4 */
+
+	eh = (struct ethhdr *)va;
+	*mac_hdr = eh;
+	ll_hlen = ETH_HLEN;
+	if (eh->h_proto != htons(ETH_P_IP)) {
+		if (eh->h_proto == htons(ETH_P_8021Q)) {
+			veh = (struct vlan_ethhdr *)va;
+			if (veh->h_vlan_encapsulated_proto != htons(ETH_P_IP))
+				return -1;
+
+			ll_hlen += VLAN_HLEN;
+
+			/*
+			 *  HW checksum starts ETH_HLEN bytes into
+			 *  frame, so we must subtract off the VLAN
+			 *  header's checksum before csum can be used
+			 */
+			csum = csum_sub(csum, csum_partial(va + ETH_HLEN,
+							   VLAN_HLEN, 0));
+		} else {
+			return -1;
+		}
+	}
+	*hdr_flags = LRO_IPV4;
+
+	iph = (struct iphdr *)(va + ll_hlen);
+	*ip_hdr = iph;
+	if (iph->protocol != IPPROTO_TCP)
+		return -1;
+	*hdr_flags |= LRO_TCP;
+	*tcpudp_hdr = (u8 *) (*ip_hdr) + (iph->ihl << 2);
+
+	/* verify the IP checksum */
+	if (unlikely(ip_fast_csum((u8 *) iph, iph->ihl)))
+		return -1;
+
+	/* verify the  checksum */
+	if (unlikely(csum_tcpudp_magic(iph->saddr, iph->daddr,
+				       ntohs(iph->tot_len) - (iph->ihl << 2),
+				       IPPROTO_TCP, csum)))
+		return -1;
+
+	return 0;
+}
+
 static int myri10ge_open(struct net_device *dev)
 {
 	struct myri10ge_priv *mgp;
 	struct myri10ge_cmd cmd;
+	struct net_lro_mgr *lro_mgr;
 	int status, big_pow2;
 
 	mgp = netdev_priv(dev);
@@ -1852,6 +1946,18 @@ static int myri10ge_open(struct net_devi
 	mgp->link_state = htonl(~0U);
 	mgp->rdma_tags_available = 15;
 
+	lro_mgr = &mgp->rx_done.lro_mgr;
+	lro_mgr->dev = dev;
+	lro_mgr->features = LRO_F_NAPI;
+	lro_mgr->ip_summed = CHECKSUM_COMPLETE;
+	lro_mgr->ip_summed_aggr = CHECKSUM_UNNECESSARY;
+	lro_mgr->max_desc = MYRI10GE_MAX_LRO_DESCRIPTORS;
+	lro_mgr->lro_arr = mgp->rx_done.lro_desc;
+	lro_mgr->get_frag_header = myri10ge_get_frag_header;
+	lro_mgr->max_aggr = myri10ge_lro_max_pkts;
+	if (lro_mgr->max_aggr > MAX_SKB_FRAGS)
+		lro_mgr->max_aggr = MAX_SKB_FRAGS;
+
 	netif_poll_enable(mgp->dev);	/* must happen prior to any irq */
 
 	status = myri10ge_send_cmd(mgp, MXGEFW_CMD_ETHERNET_UP, &cmd, 0);

^ permalink raw reply

* Re: [patch 06/10] 40x decrementer fixes
From: Josh Boyer @ 2007-08-03 17:15 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: linuxppc-dev, paulus
In-Reply-To: <46B35C07.4090806@ru.mvista.com>

On Fri, 03 Aug 2007 20:47:03 +0400
Sergei Shtylyov <sshtylyov@ru.mvista.com> wrote:

> Josh Boyer wrote:
> 
> > Allow generic_calibrate_decr to work for 40x platforms.  Given that the hardware
> > behavior is identical, this also changes the set_dec function to reload the PIT
> > on 40x to match the behavior 44x currently has.
> 
>     Why bother doing this?! This will only warrant you imprecise decrementer 
> interrupts while it should be interrupting at the precise period currently (if 
> you load PIT once)...

Without some kind of fix, it doesn't function at all.  We can load the
PIT once, but then we need to make sure ARE is set because if the PIT
ticks down to zero it just sits there.

If we want to do that, then fine but it should be common between 40x
and 44x.  I didn't see much of a reason to differ from what's there
today.

josh

^ permalink raw reply

* Re: [patch 06/10] 40x decrementer fixes
From: Sergei Shtylyov @ 2007-08-03 17:10 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev, paulus
In-Reply-To: <46B35C07.4090806@ru.mvista.com>

I wrote:

>>Allow generic_calibrate_decr to work for 40x platforms.  Given that the hardware
>>behavior is identical, this also changes the set_dec function to reload the PIT

    It's not actually identical. When you're writing to the PIT reg on 40x, 
you're alos writing to the hidden PIT auto-reload reg. which is not the case 
for 440 that is true Book E.

>>on 40x to match the behavior 44x currently has.

>     Why bother doing this?! This will only warrant you imprecise decrementer 
> interrupts while it should be interrupting at the precise period currently (if 
> you load PIT once)...

    I.e. the error will only accumulate. NAK.

WBR, Sergei

^ permalink raw reply

* Re: [patch 06/10] 40x decrementer fixes
From: Sergei Shtylyov @ 2007-08-03 16:47 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev, paulus
In-Reply-To: <20070803161710.931656000@linux.vnet.ibm.com>

Josh Boyer wrote:

> Allow generic_calibrate_decr to work for 40x platforms.  Given that the hardware
> behavior is identical, this also changes the set_dec function to reload the PIT
> on 40x to match the behavior 44x currently has.

    Why bother doing this?! This will only warrant you imprecise decrementer 
interrupts while it should be interrupting at the precise period currently (if 
you load PIT once)...

WBR, Sergei

^ permalink raw reply

* [patch 10/10] Bamboo zImage wrapper
From: Josh Boyer @ 2007-08-03 16:09 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20070803160900.069522000@linux.vnet.ibm.com>

Add a bootwrapper for the AMCC 440EP Bamboo Eval board.  This also adds a
common fixup_clock function for all 440EP(x) chips.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>

---
 arch/powerpc/boot/44x.h             |    1 
 arch/powerpc/boot/4xx.c             |   82 ++++++++++++++++++++++++++++++++++++
 arch/powerpc/boot/4xx.h             |    1 
 arch/powerpc/boot/Makefile          |    5 +-
 arch/powerpc/boot/bamboo.c          |   45 +++++++++++++++++++
 arch/powerpc/boot/dcr.h             |   10 ++++
 arch/powerpc/boot/treeboot-bamboo.c |   27 +++++++++++
 7 files changed, 169 insertions(+), 2 deletions(-)

--- linux-2.6.orig/arch/powerpc/boot/44x.h
+++ linux-2.6/arch/powerpc/boot/44x.h
@@ -11,5 +11,6 @@
 #define _PPC_BOOT_44X_H_
 
 void ebony_init(void *mac0, void *mac1);
+void bamboo_init(void);
 
 #endif /* _PPC_BOOT_44X_H_ */
--- linux-2.6.orig/arch/powerpc/boot/4xx.c
+++ linux-2.6/arch/powerpc/boot/4xx.c
@@ -109,3 +109,85 @@ void ibm4xx_fixup_ebc_ranges(const char 
 
 	setprop(devp, "ranges", ranges, (p - ranges) * sizeof(u32));
 }
+
+#define SPRN_CCR1 0x378
+void ibm440ep_fixup_clocks(unsigned int sysclk, unsigned int ser_clk)
+{
+	u32 cpu, plb, opb, ebc, tb, uart0, m, vco;
+	u32 reg;
+	u32 fwdva, fwdvb, fbdv, lfbdv, opbdv0, perdv0, spcid0, prbdv0, tmp;
+
+	mtdcr(DCRN_CPR0_ADDR, CPR0_PLLD0);
+	reg = mfdcr(DCRN_CPR0_DATA);
+	tmp = (reg & 0x000F0000) >> 16;
+	fwdva = tmp ? tmp : 16;
+	tmp = (reg & 0x00000700) >> 8;
+	fwdvb = tmp ? tmp : 8;
+	tmp = (reg & 0x1F000000) >> 24;
+	fbdv = tmp ? tmp : 32;
+	lfbdv = (reg & 0x0000007F);
+
+	mtdcr(DCRN_CPR0_ADDR, CPR0_OPBD0);
+	reg = mfdcr(DCRN_CPR0_DATA);
+	tmp = (reg & 0x03000000) >> 24;
+	opbdv0 = tmp ? tmp : 4;
+
+	mtdcr(DCRN_CPR0_ADDR, CPR0_PERD0);
+	reg = mfdcr(DCRN_CPR0_DATA);
+	tmp = (reg & 0x07000000) >> 24;
+	perdv0 = tmp ? tmp : 8;
+
+	mtdcr(DCRN_CPR0_ADDR, CPR0_PRIMBD0);
+	reg = mfdcr(DCRN_CPR0_DATA);
+	tmp = (reg & 0x07000000) >> 24;
+	prbdv0 = tmp ? tmp : 8;
+
+	mtdcr(DCRN_CPR0_ADDR, CPR0_SCPID);
+	reg = mfdcr(DCRN_CPR0_DATA);
+	tmp = (reg & 0x03000000) >> 24;
+	spcid0 = tmp ? tmp : 4;
+
+	/* Calculate M */
+	mtdcr(DCRN_CPR0_ADDR, CPR0_PLLC0);
+	reg = mfdcr(DCRN_CPR0_DATA);
+	tmp = (reg & 0x03000000) >> 24;
+	if (tmp == 0) { /* PLL output */
+		tmp = (reg & 0x20000000) >> 29;
+		if (!tmp) /* PLLOUTA */
+			m = fbdv * lfbdv * fwdva;
+		else
+			m = fbdv * lfbdv * fwdvb;
+	}
+	else if (tmp == 1) /* CPU output */
+		m = fbdv * fwdva;
+	else
+		m = perdv0 * opbdv0 * fwdvb;
+
+	vco = (m * sysclk) + (m >> 1);
+	cpu = vco / fwdva;
+	plb = vco / fwdvb / prbdv0;
+	opb = plb / opbdv0;
+	ebc = plb / perdv0;
+
+	/* FIXME */
+	uart0 = ser_clk;
+
+	/* Figure out timebase.  Either CPU or default TmrClk */
+	asm volatile (
+			"mfspr	%0,%1\n"
+			:
+			"=&r"(reg) : "i"(SPRN_CCR1));
+	if (reg & 0x0080)
+		tb = 25000000; /* TmrClk is 25MHz */
+	else
+		tb = cpu;
+
+	dt_fixup_cpu_clocks(cpu, tb, 0);
+	dt_fixup_clock("/plb", plb);
+	dt_fixup_clock("/plb/opb", opb);
+	dt_fixup_clock("/plb/opb/ebc", ebc);
+	dt_fixup_clock("/plb/opb/serial@ef600300", uart0);
+	dt_fixup_clock("/plb/opb/serial@ef600400", uart0);
+	dt_fixup_clock("/plb/opb/serial@ef600500", uart0);
+	dt_fixup_clock("/plb/opb/serial@ef600600", uart0);
+}
--- linux-2.6.orig/arch/powerpc/boot/4xx.h
+++ linux-2.6/arch/powerpc/boot/4xx.h
@@ -16,5 +16,6 @@ void ibm44x_dbcr_reset(void);
 void ibm40x_dbcr_reset(void);
 void ibm4xx_quiesce_eth(u32 *emac0, u32 *emac1);
 void ibm4xx_fixup_ebc_ranges(const char *ebc);
+void ibm440ep_fixup_clocks(unsigned int sysclk, unsigned int ser_clk);
 
 #endif /* _POWERPC_BOOT_4XX_H_ */
--- linux-2.6.orig/arch/powerpc/boot/Makefile
+++ linux-2.6/arch/powerpc/boot/Makefile
@@ -44,10 +44,10 @@ $(addprefix $(obj)/,$(zlib) gunzip_util.
 src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \
 		ns16550.c serial.c simple_alloc.c div64.S util.S \
 		gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \
-		4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c
+		4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c bamboo.c
 src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \
 		cuboot-ebony.c treeboot-ebony.c prpmc2800.c \
-		ps3-head.S ps3-hvcall.S ps3.c
+		ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c
 src-boot := $(src-wlib) $(src-plat) empty.c
 
 src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -142,6 +142,7 @@ ifneq ($(CONFIG_DEVICE_TREE),"")
 image-$(CONFIG_PPC_83xx)		+= cuImage.83xx
 image-$(CONFIG_PPC_85xx)		+= cuImage.85xx
 image-$(CONFIG_EBONY)			+= treeImage.ebony cuImage.ebony
+image-$(CONFIG_BAMBOO)			+= treeImage.bamboo
 endif
 
 # For 32-bit powermacs, build the COFF and miboot images
--- /dev/null
+++ linux-2.6/arch/powerpc/boot/bamboo.c
@@ -0,0 +1,45 @@
+/*
+ * Copyright IBM Corporation, 2007
+ * Josh Boyer <jwboyer@linux.vnet.ibm.com>
+ *
+ * Based on ebony wrapper:
+ * Copyright 2007 David Gibson, IBM Corporation.
+ *
+ * Clocking code based on code by:
+ * Stefan Roese <sr@denx.de>
+ *
+ * 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; version 2 of the License
+ */
+#include <stdarg.h>
+#include <stddef.h>
+#include "types.h"
+#include "elf.h"
+#include "string.h"
+#include "stdio.h"
+#include "page.h"
+#include "ops.h"
+#include "dcr.h"
+#include "4xx.h"
+#include "44x.h"
+
+extern char _dtb_start[];
+extern char _dtb_end[];
+
+static void bamboo_fixups(void)
+{
+	unsigned long sysclk = 33333333;
+
+	ibm440ep_fixup_clocks(sysclk, 11059200);
+	ibm4xx_fixup_memsize();
+	ibm4xx_quiesce_eth((u32 *)0xef600e00, (u32 *)0xef600f00);
+}
+
+void bamboo_init(void)
+{
+	platform_ops.fixups = bamboo_fixups;
+	platform_ops.exit = ibm44x_dbcr_reset;
+	ft_init(_dtb_start, 0, 32);
+	serial_console_init();
+}
--- linux-2.6.orig/arch/powerpc/boot/dcr.h
+++ linux-2.6/arch/powerpc/boot/dcr.h
@@ -123,4 +123,14 @@ static const unsigned long sdram_bxcr[] 
 
 #define DCRN_MAL0_CFG					0x180
 
+/* 440EP Clock/Power-on Reset regs */
+#define DCRN_CPR0_ADDR	0xc
+#define DCRN_CPR0_DATA	0xd
+#define CPR0_PLLD0	0x60
+#define CPR0_OPBD0	0xc0
+#define CPR0_PERD0	0xe0
+#define CPR0_PRIMBD0	0xa0
+#define CPR0_SCPID	0x120
+#define CPR0_PLLC0	0x40
+
 #endif	/* _PPC_BOOT_DCR_H_ */
--- /dev/null
+++ linux-2.6/arch/powerpc/boot/treeboot-bamboo.c
@@ -0,0 +1,27 @@
+/*
+ * Copyright IBM Corporation, 2007
+ * Josh Boyer <jwboyer@linux.vnet.ibm.com>
+ *
+ * Based on ebony wrapper:
+ * Copyright 2007 David Gibson, IBM Corporation.
+ *
+ * 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; version 2 of the License
+ */
+#include "ops.h"
+#include "stdio.h"
+#include "44x.h"
+
+extern char _end[];
+
+BSS_STACK(4096);
+
+void platform_init(void)
+{
+	unsigned long end_of_ram = 0x8000000;
+	unsigned long avail_ram = end_of_ram - (unsigned long)_end;
+
+	simple_alloc_init(_end, avail_ram, 32, 64);
+	bamboo_init();
+}

-- 

^ permalink raw reply

* [patch 09/10] Bamboo board support
From: Josh Boyer @ 2007-08-03 16:09 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20070803160900.069522000@linux.vnet.ibm.com>

Add support for the AMCC Bamboo board

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>

---
 arch/powerpc/configs/bamboo_defconfig |  775 ++++++++++++++++++++++++++++++++++
 arch/powerpc/platforms/44x/Kconfig    |   15 
 arch/powerpc/platforms/44x/Makefile   |    1 
 arch/powerpc/platforms/44x/bamboo.c   |   66 ++
 4 files changed, 850 insertions(+), 7 deletions(-)

--- /dev/null
+++ linux-2.6/arch/powerpc/configs/bamboo_defconfig
@@ -0,0 +1,775 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23-rc1
+# Fri Aug  3 10:46:53 2007
+#
+# CONFIG_PPC64 is not set
+
+#
+# Processor support
+#
+# CONFIG_6xx is not set
+# CONFIG_PPC_85xx is not set
+# CONFIG_PPC_8xx is not set
+# CONFIG_40x is not set
+CONFIG_44x=y
+# CONFIG_E200 is not set
+CONFIG_PPC_FPU=y
+CONFIG_4xx=y
+CONFIG_BOOKE=y
+CONFIG_PTE_64BIT=y
+CONFIG_PHYS_64BIT=y
+# CONFIG_PPC_MM_SLICES is not set
+CONFIG_NOT_COHERENT_CACHE=y
+CONFIG_PPC32=y
+CONFIG_PPC_MERGE=y
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_IRQ_PER_CPU=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
+CONFIG_PPC=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_GENERIC_NVRAM=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_PPC_OF=y
+CONFIG_OF=y
+CONFIG_PPC_UDBG_16550=y
+# CONFIG_GENERIC_TBSYNC is not set
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
+# CONFIG_DEFAULT_UIMAGE is not set
+CONFIG_PPC_DCR_NATIVE=y
+# CONFIG_PPC_DCR_MMIO is not set
+CONFIG_PPC_DCR=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+CONFIG_LBD=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# Platform support
+#
+# CONFIG_PPC_MPC52xx is not set
+# CONFIG_PPC_MPC5200 is not set
+# CONFIG_PPC_CELL is not set
+# CONFIG_PPC_CELL_NATIVE is not set
+# CONFIG_PQ2ADS is not set
+CONFIG_BAMBOO=y
+# CONFIG_EBONY is not set
+CONFIG_440EP=y
+CONFIG_IBM440EP_ERR42=y
+# CONFIG_MPIC is not set
+# CONFIG_MPIC_WEIRD is not set
+# CONFIG_PPC_I8259 is not set
+# CONFIG_PPC_RTAS is not set
+# CONFIG_MMIO_NVRAM is not set
+# CONFIG_PPC_MPC106 is not set
+# CONFIG_PPC_970_NAP is not set
+# CONFIG_PPC_INDIRECT_IO is not set
+# CONFIG_GENERIC_IOMAP is not set
+# CONFIG_CPU_FREQ is not set
+# CONFIG_CPM2 is not set
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_MATH_EMULATION is not set
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_RESOURCES_64BIT=y
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_PROC_DEVICETREE=y
+CONFIG_CMDLINE_BOOL=y
+CONFIG_CMDLINE=""
+CONFIG_SECCOMP=y
+CONFIG_WANT_DEVICE_TREE=y
+CONFIG_DEVICE_TREE="bamboo.dts"
+CONFIG_ISA_DMA_API=y
+
+#
+# Bus options
+#
+CONFIG_ZONE_DMA=y
+CONFIG_PPC_INDIRECT_PCI=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_SYSCALL=y
+# CONFIG_PCIEPORTBUS is not set
+CONFIG_ARCH_SUPPORTS_MSI=y
+# CONFIG_PCI_MSI is not set
+# CONFIG_PCI_DEBUG is not set
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+# CONFIG_HOTPLUG_PCI is not set
+
+#
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_CONSISTENT_START=0xff100000
+CONFIG_CONSISTENT_SIZE=0x00200000
+CONFIG_BOOT_LOAD=0x01000000
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+CONFIG_CONNECTOR=y
+CONFIG_PROC_EVENTS=y
+# CONFIG_MTD is not set
+CONFIG_OF_DEVICE=y
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=35000
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_XILINX_SYSACE is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_PHANTOM is not set
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_FIREWIRE is not set
+# CONFIG_IEEE1394 is not set
+# CONFIG_I2O is not set
+CONFIG_MACINTOSH_DRIVERS=y
+# CONFIG_MAC_EMUMOUSEBTN is not set
+# CONFIG_WINDFARM is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_ARCNET is not set
+# CONFIG_NET_ETHERNET is not set
+CONFIG_NETDEV_1000=y
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
+# CONFIG_SKGE is not set
+# CONFIG_SKY2 is not set
+# CONFIG_VIA_VELOCITY is not set
+# CONFIG_TIGON3 is not set
+# CONFIG_BNX2 is not set
+# CONFIG_QLA3XXX is not set
+# CONFIG_ATL1 is not set
+CONFIG_NETDEV_10000=y
+# CONFIG_CHELSIO_T1 is not set
+# CONFIG_CHELSIO_T3 is not set
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
+# CONFIG_MLX4_CORE is not set
+# CONFIG_TR is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+# CONFIG_INPUT is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_PCI is not set
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+CONFIG_SERIAL_8250_EXTENDED=y
+# CONFIG_SERIAL_8250_MANY_PORTS is not set
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+# CONFIG_SERIAL_8250_DETECT_IRQ is not set
+# CONFIG_SERIAL_8250_RSA is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_UARTLITE is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_JSM is not set
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_DEVPORT=y
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+
+#
+# Graphics support
+#
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=m
+# CONFIG_FB is not set
+# CONFIG_FB_IBM_GXT4500 is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+# CONFIG_MMC is not set
+# CONFIG_NEW_LEDS is not set
+# CONFIG_INFINIBAND is not set
+# CONFIG_EDAC is not set
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
+#
+# Userspace I/O
+#
+# CONFIG_UIO is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_EXT4DEV_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_CRAMFS=y
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+# CONFIG_NLS is not set
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+# CONFIG_UCC_SLOW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+
+#
+# Instrumentation Support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_DEBUG_STACKOVERFLOW is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_PAGEALLOC is not set
+CONFIG_DEBUGGER=y
+# CONFIG_KGDB is not set
+# CONFIG_XMON is not set
+# CONFIG_BDI_SWITCH is not set
+CONFIG_PPC_EARLY_DEBUG=y
+# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
+# CONFIG_PPC_EARLY_DEBUG_G5 is not set
+# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set
+# CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set
+# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
+# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
+# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
+# CONFIG_PPC_EARLY_DEBUG_BEAT is not set
+CONFIG_PPC_EARLY_DEBUG_44x=y
+CONFIG_PPC_EARLY_DEBUG_44x_PHYSLOW=0xef600300
+CONFIG_PPC_EARLY_DEBUG_44x_PHYSHIGH=0x0
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_MANAGER=y
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_PCBC=y
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+CONFIG_CRYPTO_HW=y
--- linux-2.6.orig/arch/powerpc/platforms/44x/Kconfig
+++ linux-2.6/arch/powerpc/platforms/44x/Kconfig
@@ -1,10 +1,10 @@
-#config BAMBOO
-#	bool "Bamboo"
-#	depends on 44x
-#	default n
-#	select 440EP
-#	help
-#	  This option enables support for the IBM PPC440EP evaluation board.
+config BAMBOO
+	bool "Bamboo"
+	depends on 44x
+	default n
+	select 440EP
+	help
+	  This option enables support for the IBM PPC440EP evaluation board.
 
 config EBONY
 	bool "Ebony"
@@ -35,6 +35,7 @@ config 440EP
 	bool
 	select PPC_FPU
 	select IBM440EP_ERR42
+#	select IBM_NEW_EMAC_ZMII
 
 config 440GP
 	bool
--- linux-2.6.orig/arch/powerpc/platforms/44x/Makefile
+++ linux-2.6/arch/powerpc/platforms/44x/Makefile
@@ -1,2 +1,3 @@
 obj-$(CONFIG_44x)	:= misc_44x.o
 obj-$(CONFIG_EBONY)	+= ebony.o
+obj-$(CONFIG_BAMBOO) += bamboo.o
--- /dev/null
+++ linux-2.6/arch/powerpc/platforms/44x/bamboo.c
@@ -0,0 +1,66 @@
+/*
+ * Bamboo board specific routines
+ *
+ * Wade Farnsworth <wfarnsworth@mvista.com>
+ * Copyright 2004 MontaVista Software Inc.
+ *
+ * Rewritten and ported to the merged powerpc tree:
+ * Josh Boyer <jwboyer@linux.vnet.ibm.com>
+ * Copyright 2007 IBM Corporation
+ *
+ * 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.
+ */
+#include <linux/init.h>
+#include <asm/machdep.h>
+#include <asm/prom.h>
+#include <asm/udbg.h>
+#include <asm/time.h>
+#include <asm/uic.h>
+#include <asm/of_platform.h>
+#include "44x.h"
+
+static struct of_device_id bamboo_of_bus[] = {
+	{ .compatible = "ibm,plb", },
+	{ .compatible = "ibm,opb", },
+	{ .compatible = "ibm,ebc", },
+	{},
+};
+
+static int __init bamboo_device_probe(void)
+{
+	if (!machine_is(bamboo))
+		return 0;
+
+	of_platform_bus_probe(NULL, bamboo_of_bus, NULL);
+
+	return 0;
+}
+device_initcall(bamboo_device_probe);
+
+static int __init bamboo_probe(void)
+{
+	unsigned long root = of_get_flat_dt_root();
+
+	if (!of_flat_dt_is_compatible(root, "amcc,bamboo"))
+		return 0;
+
+	return 1;
+}
+
+static void __init bamboo_setup_arch(void)
+{
+}
+
+define_machine(bamboo) {
+	.name 				= "Bamboo",
+	.probe 				= bamboo_probe,
+	.setup_arch 		= bamboo_setup_arch,
+	.progress 			= udbg_progress,
+	.init_IRQ 			= uic_init_tree,
+	.get_irq 			= uic_get_irq,
+	.restart			= ppc44x_reset_system,
+	.calibrate_decr 	= generic_calibrate_decr,
+};

-- 

^ permalink raw reply

* [patch 07/10] Fix 40x build
From: Josh Boyer @ 2007-08-03 16:09 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20070803160900.069522000@linux.vnet.ibm.com>

Remove inclusion of __res on 40x.  We don't need it in arch/powerpc

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>

---
 arch/powerpc/kernel/head_40x.S  |    1 -
 arch/powerpc/kernel/ppc_ksyms.c |    2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

--- linux-2.6.orig/arch/powerpc/kernel/ppc_ksyms.c
+++ linux-2.6/arch/powerpc/kernel/ppc_ksyms.c
@@ -180,7 +180,7 @@ EXPORT_SYMBOL(cacheable_memcpy);
 EXPORT_SYMBOL(cpm_install_handler);
 EXPORT_SYMBOL(cpm_free_handler);
 #endif /* CONFIG_8xx */
-#if defined(CONFIG_8xx) || defined(CONFIG_40x)
+#if defined(CONFIG_8xx)
 EXPORT_SYMBOL(__res);
 #endif
 
--- linux-2.6.orig/arch/powerpc/kernel/head_40x.S
+++ linux-2.6/arch/powerpc/kernel/head_40x.S
@@ -35,7 +35,6 @@
 #include <asm/page.h>
 #include <asm/mmu.h>
 #include <asm/pgtable.h>
-#include <asm/ibm4xx.h>
 #include <asm/cputable.h>
 #include <asm/thread_info.h>
 #include <asm/ppc_asm.h>

-- 

^ permalink raw reply

* [patch 08/10] Bamboo DTS
From: Josh Boyer @ 2007-08-03 16:09 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20070803160900.069522000@linux.vnet.ibm.com>

AMCC Bamboo board DTS

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>

---
 arch/powerpc/boot/dts/bamboo.dts |  248 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 248 insertions(+)

--- /dev/null
+++ linux-2.6/arch/powerpc/boot/dts/bamboo.dts
@@ -0,0 +1,248 @@
+/*
+ * Device Tree Source for AMCC Bamboo
+ *
+ * Copyright (c) 2006, 2007 IBM Corp.
+ * Josh Boyer <jwboyer@linux.vnet.ibm.com>
+ *
+ * FIXME: Draft only!
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed "as is" without
+ * any warranty of any kind, whether express or implied.
+ *
+ * To build:
+ *   dtc -I dts -O asm -o bamboo.S -b 0 bamboo.dts
+ *   dtc -I dts -O dtb -o bamboo.dtb -b 0 bamboo.dts
+ */
+
+/ {
+	#address-cells = <2>;
+	#size-cells = <1>;
+	model = "amcc,bamboo";
+	compatible = "amcc,bamboo";
+	dcr-parent = <&/cpus/PowerPC,440EP@0>;
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		PowerPC,440EP@0 {
+			device_type = "cpu";
+			reg = <0>;
+			clock-frequency = <0>; /* Filled in by zImage */
+			timebase-frequency = <0>; /* Filled in by zImage */
+			i-cache-line-size = <20>;
+			d-cache-line-size = <20>;
+			i-cache-size = <8000>;
+			d-cache-size = <8000>;
+			dcr-controller;
+			dcr-access-method = "native";
+		};
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0 0 0>; /* Filled in by zImage */
+	};
+
+	UIC0: interrupt-controller0 {
+		compatible = "ibm,uic-440gp","ibm,uic";
+		interrupt-controller;
+		cell-index = <0>;
+		dcr-reg = <0c0 009>;
+		#address-cells = <0>;
+		#size-cells = <0>;
+		#interrupt-cells = <2>;
+	};
+
+	UIC1: interrupt-controller1 {
+		compatible = "ibm,uic-440gp","ibm,uic";
+		interrupt-controller;
+		cell-index = <1>;
+		dcr-reg = <0d0 009>;
+		#address-cells = <0>;
+		#size-cells = <0>;
+		#interrupt-cells = <2>;
+		interrupts = <1e 4 1f 4>; /* cascade */
+		interrupt-parent = <&UIC0>;
+	};
+
+	SDR0: sdr {
+		compatible = "ibm,sdr-440ep";
+		dcr-reg = <00e 002>;
+	};
+
+	CPR0: cpr {
+		compatible = "ibm,cpr-440ep";
+		dcr-reg = <00c 002>;
+	};
+
+	plb {
+		compatible = "ibm,plb-440gp", "ibm,plb4";
+		#address-cells = <2>;
+		#size-cells = <1>;
+		ranges;
+		clock-frequency = <0>; /* Filled in by zImage */
+
+		SDRAM0: sdram {
+			compatible = "ibm,sdram-405gp";
+			dcr-reg = <010 2>;
+		};
+
+		DMA0: dma {
+			compatible = "ibm,dma-440gp";
+			dcr-reg = <100 027>;
+		};
+
+		MAL0: mcmal {
+			compatible = "ibm,mcmal-440gp", "ibm,mcmal";
+			dcr-reg = <180 62>;
+			num-tx-chans = <4>;
+			num-rx-chans = <4>;
+			interrupt-parent = <&MAL0>;
+			interrupts = <0 1 2 3 4>;
+			#interrupt-cells = <1>;
+			interrupt-map = </*TXEOB*/ 0 &UIC0 a 4
+					/*RXEOB*/ 1 &UIC0 b 4
+					/*SERR*/  2 &UIC1 0 4
+					/*TXDE*/  3 &UIC1 1 4
+					/*RXDE*/  4 &UIC1 3 4>;
+		};
+
+		POB0: opb {
+		  	compatible = "ibm,opb-440gp", "ibm,opb";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			/* Bamboo is oddball in the 44x world and doesn't use the ERPN
+			 * bits.
+			 */
+		  	ranges = <00000000 0 00000000 80000000
+			          80000000 0 80000000 80000000>;
+		  	interrupt-parent = <&UIC1>;
+		  	interrupts = <7 4>;
+		  	clock-frequency = <0>; /* Filled in by zImage */
+
+			EBC0: ebc {
+				compatible = "ibm,ebc-440gp", "ibm,ebc";
+				dcr-reg = <012 2>;
+				#address-cells = <2>;
+				#size-cells = <1>;
+				clock-frequency = <0>; /* Filled in by zImage */
+				ranges;
+				interrupts = <5 1>;
+				interrupt-parent = <&UIC1>;
+			};
+
+			UART0: serial@ef600300 {
+		   		device_type = "serial";
+		   		compatible = "ns16550";
+		   		reg = <ef600300 8>;
+		   		virtual-reg = <ef600300>;
+		   		clock-frequency = <0>; /* Filled in by zImage */
+		   		current-speed = <1c200>;
+		   		interrupt-parent = <&UIC0>;
+		   		interrupts = <0 4>;
+	   		};
+
+			UART1: serial@ef600400 {
+		   		device_type = "serial";
+		   		compatible = "ns16550";
+		   		reg = <ef600400 8>;
+		   		virtual-reg = <ef600400>;
+		   		clock-frequency = <0>;
+		   		current-speed = <0>;
+		   		interrupt-parent = <&UIC0>;
+		   		interrupts = <1 4>;
+	   		};
+
+			UART2: serial@ef600500 {
+		   		device_type = "serial";
+		   		compatible = "ns16550";
+		   		reg = <ef600500 8>;
+		   		virtual-reg = <ef600500>;
+		   		clock-frequency = <0>;
+		   		current-speed = <0>;
+		   		interrupt-parent = <&UIC0>;
+		   		interrupts = <3 4>;
+	   		};
+
+			UART3: serial@ef600600 {
+		   		device_type = "serial";
+		   		compatible = "ns16550";
+		   		reg = <ef600600 8>;
+		   		virtual-reg = <ef600600>;
+		   		clock-frequency = <0>;
+		   		current-speed = <0>;
+		   		interrupt-parent = <&UIC0>;
+		   		interrupts = <4 4>;
+	   		};
+
+			IIC0: i2c@ef600700 {
+				device_type = "i2c";
+				compatible = "ibm,iic-440gp", "ibm,iic";
+				reg = <ef600700 14>;
+				interrupt-parent = <&UIC0>;
+				interrupts = <2 4>;
+			};
+
+			IIC1: i2c@ef600800 {
+				device_type = "i2c";
+				compatible = "ibm,iic-44gp", "ibm,iic";
+				reg = <ef600800 14>;
+				interrupt-parent = <&UIC0>;
+				interrupts = <7 4>;
+			};
+
+			ZMII0: emac-zmii@ef600d00 {
+				device_type = "zmii-interface";
+				compatible = "ibm,zmii-440gp", "ibm,zmii";
+				reg = <ef600d00 c>;
+			};
+
+			EMAC0: ethernet@ef600e00 {
+				device_type = "network";
+				compatible = "ibm,emac-440gp", "ibm,emac";
+				interrupt-parent = <&UIC1>;
+				interrupts = <1c 4 1d 4>;
+				reg = <ef600e00 70>;
+				local-mac-address = [000000000000];
+				mal-device = <&MAL0>;
+				mal-tx-channel = <0 1>;
+				mal-rx-channel = <0>;
+				cell-index = <0>;
+				max-frame-size = <5dc>;
+				rx-fifo-size = <1000>;
+				tx-fifo-size = <800>;
+				phy-mode = "rmii";
+				phy-map = <00000001>;
+				zmii-device = <&ZMII0>;
+				zmii-channel = <0>;
+			};
+
+			EMAC1: ethernet@ef600f00 {
+				device_type = "network";
+				compatible = "ibm,emac-440gp", "ibm,emac";
+				interrupt-parent = <&UIC1>;
+				interrupts = <1e 4 1f 4>;
+				reg = <ef600f00 70>;
+				local-mac-address = [000000000000];
+				mal-device = <&MAL0>;
+				mal-tx-channel = <2 3>;
+				mal-rx-channel = <1>;
+				cell-index = <1>;
+				max-frame-size = <5dc>;
+				rx-fifo-size = <1000>;
+				tx-fifo-size = <800>;
+				phy-mode = "rmii";
+				phy-map = <00000001>;
+				zmii-device = <&ZMII0>;
+				zmii-channel = <1>;
+			};
+		};
+	};
+
+	chosen {
+		linux,stdout-path = "/plb/opb/serial@ef600300";
+		bootargs = "console=ttyS0,115200";
+	};
+};

-- 

^ permalink raw reply

* [patch 06/10] 40x decrementer fixes
From: Josh Boyer @ 2007-08-03 16:09 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20070803160900.069522000@linux.vnet.ibm.com>

Allow generic_calibrate_decr to work for 40x platforms.  Given that the hardware
behavior is identical, this also changes the set_dec function to reload the PIT
on 40x to match the behavior 44x currently has.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>

---
 arch/powerpc/kernel/time.c |    2 +-
 include/asm-powerpc/time.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.orig/arch/powerpc/kernel/time.c
+++ linux-2.6/arch/powerpc/kernel/time.c
@@ -867,7 +867,7 @@ void __init generic_calibrate_decr(void)
 				"(not found)\n");
 	}
 
-#ifdef CONFIG_BOOKE
+#if defined(CONFIG_BOOKE) || defined(CONFIG_40x)
 	/* Set the time base to zero */
 	mtspr(SPRN_TBWL, 0);
 	mtspr(SPRN_TBWU, 0);
--- linux-2.6.orig/include/asm-powerpc/time.h
+++ linux-2.6/include/asm-powerpc/time.h
@@ -174,7 +174,7 @@ static inline unsigned int get_dec(void)
 static inline void set_dec(int val)
 {
 #if defined(CONFIG_40x)
-	return;		/* Have to let it auto-reload */
+	mtspr(SPRN_PIT, val);
 #elif defined(CONFIG_8xx_CPU6)
 	set_dec_cpu6(val);
 #else

-- 

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox