LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 3/3] mtd/nand : workaround for Freescale FCM to support large-page Nand chip
From: Artem Bityutskiy @ 2011-12-17 14:35 UTC (permalink / raw)
  To: Scott Wood
  Cc: Artem.Bityutskiy, linuxppc-dev, linux-kernel, shuo.liu, linux-mtd,
	akpm, dwmw2
In-Reply-To: <4EE6725C.3050706@freescale.com>

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

On Mon, 2011-12-12 at 15:30 -0600, Scott Wood wrote:
> On 12/12/2011 03:19 PM, Artem Bityutskiy wrote:
> > On Mon, 2011-12-12 at 15:15 -0600, Scott Wood wrote:
> >> NAND chips come from the factory with bad blocks marked at a certain
> >> offset into each page.  This offset is normally in the OOB area, but
> >> since we change the layout from "4k data, 128 byte oob" to "2k data, 64
> >> byte oob, 2k data, 64 byte oob" the marker is no longer in the oob.  On
> >> first use we need to migrate the markers so that they are still in the oob.
> > 
> > Ah, I see, thanks. Are you planning to implement in-kernel migration or
> > use a user-space tool?
> 
> That's the kind of answer I was hoping to get from Shuo. :-)
> 
> Most likely is a firmware-based tool, but I'd like there to be some way
> for the tool to mark that this has happened, so that the Linux driver
> can refuse to do non-raw accesses to a chip that isn't marked as having
> been migrated (or at least yell loudly in the log).
> 
> Speaking of raw accesses, these are currently broken in the eLBC
> driver... we need some way for the generic layer to tell us what kind of
> access it is before the transaction starts, not once it wants to read
> out the buffer (unless we add more hacks to delay the start of a read
> transaction until first buffer access...).  We'd be better off with a
> high-level "read page/write page" function that does the whole thing
> (not just buffer access, but command issuance as well).

It looks like currently you can re-define chip->read_page, so I guess
you should rework MTD and make chip->write_page re-definable?

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: [PATCH v2] powerpc/setup_{32, 64}.c: remove unneeded boot_cpuid{, _phys}
From: Benjamin Herrenschmidt @ 2011-12-16 22:09 UTC (permalink / raw)
  To: Scott Wood
  Cc: McClintock Matthew-B29882, Gala Kumar-B11780,
	linuxppc-dev@lists.ozlabs.org
In-Reply-To: <4EEBB84C.2050001@freescale.com>

On Fri, 2011-12-16 at 15:29 -0600, Scott Wood wrote:
> It would be nice if we could eliminate all usage of the boot cpu dtb
> field -- it's easy to forget to set it, especially if you're not making
> an AMP config.  The default -1 means this patch would break booting with
> such a tree.
> 
> If we don't want to record the PIR of the first CPU to enter as the boot
> CPU (is the concern implementations where the CPU node's reg is not the
> same as what's in PIR?), how about just having a variable that gets set
> before releasing secondaries?  If you're in the boot entry code and that
> variable is set, you're a secondary.  Or, use a distinct release address
> for secondaries rather than __early_start.

Of course you can only do that on processors that have a reliable
PIR :-)

Cheers,
Ben.

^ permalink raw reply

* Re: [PATCH v2] powerpc/setup_{32, 64}.c: remove unneeded boot_cpuid{, _phys}
From: Scott Wood @ 2011-12-16 21:29 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: McClintock Matthew-B29882, Gala Kumar-B11780,
	linuxppc-dev@lists.ozlabs.org
In-Reply-To: <1324006543.4875.1.camel@pasglop>

On 12/15/2011 09:35 PM, Benjamin Herrenschmidt wrote:
> On Fri, 2011-12-16 at 03:29 +0000, McClintock Matthew-B29882 wrote:
>> On Thu, Dec 15, 2011 at 9:12 PM, Benjamin Herrenschmidt
>> <benh@kernel.crashing.org> wrote:
>>> On Mon, 2011-11-28 at 22:24 -0600, Matthew McClintock wrote:
>>>> boot_cpuid and init_thread_info.cpu are redundant, just use the
>>>> var that stays around longer and add a define to make boot_cpuid
>>>> point at the correct value
>>>>
>>>> boot_cpudid_phys is not needed and can completly go away from the
>>>> SMP case, we leave it there for the non-SMP case since the paca
>>>> struct is not around to store this info
>>>>
>>>> This patch also has the effect of having the logical cpu number
>>>> of the boot cpu be updated correctly independently of the ordering
>>>> of the cpu nodes in the device tree.

Where does the ordering matter currently?

>>> So what about head_fsl_booke.S comparing boot_cpuid to -1 ? That seems
>>> to be broken now in at least 2 ways, boot_cpuid doesn't exist anymore
>>> and you don't initialize it to -1 either...
>>
>> This is 4/5 which is also waiting for your review.
>>
>> http://lists.ozlabs.org/pipermail/linuxppc-dev/2011-October/093474.html
> 
> Ah missed that. This is FSL specific, I'd need Kumar and/or Scott's ack
> for that one.

It would be nice if we could eliminate all usage of the boot cpu dtb
field -- it's easy to forget to set it, especially if you're not making
an AMP config.  The default -1 means this patch would break booting with
such a tree.

If we don't want to record the PIR of the first CPU to enter as the boot
CPU (is the concern implementations where the CPU node's reg is not the
same as what's in PIR?), how about just having a variable that gets set
before releasing secondaries?  If you're in the boot entry code and that
variable is set, you're a secondary.  Or, use a distinct release address
for secondaries rather than __early_start.

-Scott

^ permalink raw reply

* Re: [PATCH] phylib: update mdiobus_alloc() to allocate extra private space
From: Timur Tabi @ 2011-12-16 20:37 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, afleming, linuxppc-dev
In-Reply-To: <20111216.153254.1998330487051662169.davem@davemloft.net>

David Miller wrote:
> Make the change how I suggested, where mdiobus_alloc() retains it's current
> function signature and semantics.  Then you can edit drivers as needed rather
> than from the beginning.

Yes, your approach makes much more sense.  I should have thought of it.

-- 
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply

* Re: [PATCH] phylib: update mdiobus_alloc() to allocate extra private space
From: David Miller @ 2011-12-16 20:32 UTC (permalink / raw)
  To: timur; +Cc: netdev, afleming, linuxppc-dev
In-Reply-To: <4EEA2A61.8050302@freescale.com>

From: Timur Tabi <timur@freescale.com>
Date: Thu, 15 Dec 2011 11:12:01 -0600

> Andy Fleming wrote:
>> Why? Doesn't this just obfuscate things a little, while providing no immediate benefit?
> 
> I see code like this frequently:
> 
> 	bus = mdiobus_alloc();
> 	if (bus == NULL)
> 		return -ENOMEM;
> 	priv = kzalloc(sizeof(*priv), GFP_KERNEL);
> 	if (priv == NULL) {
> 		err = -ENOMEM;
> 		goto out_free;
> 	}
> 	bus->priv = priv;

Where "frequently", all of the mdiobus_alloc() call sites in your patch just
get translated to pass "0" for the private size.

Make the change how I suggested, where mdiobus_alloc() retains it's current
function signature and semantics.  Then you can edit drivers as needed rather
than from the beginning.

^ permalink raw reply

* Re: [PATCH] phylib: update mdiobus_alloc() to allocate extra private space
From: David Miller @ 2011-12-16 20:31 UTC (permalink / raw)
  To: timur; +Cc: netdev, afleming, linuxppc-dev
In-Reply-To: <1323967895-5205-1-git-send-email-timur@freescale.com>

From: Timur Tabi <timur@freescale.com>
Date: Thu, 15 Dec 2011 10:51:35 -0600

> Augment mdiobus_alloc() to take a parameter indicating the number of extra
> bytes to allocate for private data.  Almost all callers of mdiobus_alloc()
> separately allocate a private data structure.  By allowing mdiobus_alloc()
> to allocate extra memory, the two allocations can be merged into one.
> 
> This patch does not change any of the callers to actually take advantage
> of this feature, however.  That change can be made by the individual
> maintainers at their leisure.  For now, all callers ask for zero additional
> bytes, which mimics the previous behavior.
> 
> Signed-off-by: Timur Tabi <timur@freescale.com>

Come on...

Not one driver even uses the new facility, and on top of it you edit
all of these drivers for no reason at all.

You could edit only two source files instead of more than 30 by simply
doing:

struct mii_bus *mdiobus_alloc_size(size_t size);

static inline struct mii_bus *mdiobus_alloc(void)
{
	return mdiobus_alloc_size(0):
}

^ permalink raw reply

* Re: [PATCH 3/3] mtd/nand : workaround for Freescale FCM to support large-page Nand chip
From: Scott Wood @ 2011-12-16 17:59 UTC (permalink / raw)
  To: LiuShuo
  Cc: Artem.Bityutskiy, dedekind1, linuxppc-dev, linux-kernel, shuo.liu,
	linux-mtd, akpm, dwmw2
In-Reply-To: <4EEAB076.30000@freescale.com>

On 12/15/2011 08:44 PM, LiuShuo wrote:
> hi Artem,
> Could this patch be applied now and we make a independent patch for  bad
> block information
> migration later?

This patch is not safe to use without migration.

-Scott

^ permalink raw reply

* Re: [PATCH v3 2/3] hvc_init(): Enforce one-time initialization.
From: Amit Shah @ 2011-12-16  6:00 UTC (permalink / raw)
  To: Miche Baker-Harvey
  Cc: Stephen Rothwell, xen-devel, Konrad Rzeszutek Wilk, Rusty Russell,
	linux-kernel, virtualization, Anton Blanchard, Mike Waychison,
	ppc-dev, Greg Kroah-Hartman, Eric Northrup
In-Reply-To: <CAB8Rdar=qOokxZkjQVRmo=zN_f75jPwzU+6=WBRo0g+P7w+pAw@mail.gmail.com>

On (Tue) 06 Dec 2011 [09:05:38], Miche Baker-Harvey wrote:
> Amit,
> 
> Ah, indeed.  I am not using MSI-X, so virtio_pci::vp_try_to_find_vqs()
> calls vp_request_intx() and sets up an interrupt callback.  From
> there, when an interrupt occurs, the stack looks something like this:
> 
> virtio_pci::vp_interrupt()
>   virtio_pci::vp_vring_interrupt()
>     virtio_ring::vring_interrupt()
>       vq->vq.callback()  <-- in this case, that's virtio_console::control_intr()
>         workqueue::schedule_work()
>           workqueue::queue_work()
>             queue_work_on(get_cpu())  <-- queues the work on the current CPU.
> 
> I'm not doing anything to keep multiple control message from being
> sent concurrently to the guest, and we will take those interrupts on
> any CPU. I've confirmed that the two instances of
> handle_control_message() are occurring on different CPUs.

Hi Miche,

Here's a quick-and-dirty hack that should help.  I've not tested this,
and it's not yet signed-off-by.  Let me know if this helps.

>From 16708fa247c0dd34aa55d78166d65e463f9be6d6 Mon Sep 17 00:00:00 2001
Message-Id: <16708fa247c0dd34aa55d78166d65e463f9be6d6.1324015123.git.amit.shah@redhat.com>
From: Amit Shah <amit.shah@redhat.com>
Date: Fri, 16 Dec 2011 11:27:04 +0530
Subject: [PATCH 1/1] virtio: console: Serialise control work

We currently allow multiple instances of the control work handler to run
in parallel.  This isn't expected to work; serialise access by disabling
interrupts on new packets from the Host and enable them when all the
existing ones are consumed.
---
 drivers/char/virtio_console.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 8e3c46d..72d396c 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1466,6 +1466,7 @@ static void control_work_handler(struct work_struct *work)
 	portdev = container_of(work, struct ports_device, control_work);
 	vq = portdev->c_ivq;
 
+ start:
 	spin_lock(&portdev->cvq_lock);
 	while ((buf = virtqueue_get_buf(vq, &len))) {
 		spin_unlock(&portdev->cvq_lock);
@@ -1483,6 +1484,10 @@ static void control_work_handler(struct work_struct *work)
 		}
 	}
 	spin_unlock(&portdev->cvq_lock);
+	if (unlikely(!virtqueue_enable_cb(vq))) {
+		virtqueue_disable_cb(vq);
+		goto start;
+	}
 }
 
 static void out_intr(struct virtqueue *vq)
@@ -1533,6 +1538,7 @@ static void control_intr(struct virtqueue *vq)
 {
 	struct ports_device *portdev;
 
+	virtqueue_disable_cb(vq);
 	portdev = vq->vdev->priv;
 	schedule_work(&portdev->control_work);
 }
-- 
1.7.7.4



		Amit

^ permalink raw reply related

* Re: [PATCH v2] powerpc/setup_{32, 64}.c: remove unneeded boot_cpuid{, _phys}
From: McClintock Matthew-B29882 @ 2011-12-16  3:42 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: McClintock Matthew-B29882, Gala Kumar-B11780,
	linuxppc-dev@lists.ozlabs.org
In-Reply-To: <1324006543.4875.1.camel@pasglop>

On Thu, Dec 15, 2011 at 9:35 PM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
>> This is 4/5 which is also waiting for your review.
>>
>> http://lists.ozlabs.org/pipermail/linuxppc-dev/2011-October/093474.html
>
> Ah missed that. This is FSL specific, I'd need Kumar and/or Scott's ack
> for that one.

I believe Kumar was waiting on your review of 5/5. I'll let you guys discus=
s.

-M=

^ permalink raw reply

* Re: [PATCH v2] powerpc/setup_{32, 64}.c: remove unneeded boot_cpuid{, _phys}
From: Benjamin Herrenschmidt @ 2011-12-16  3:35 UTC (permalink / raw)
  To: McClintock Matthew-B29882
  Cc: Gala Kumar-B11780, linuxppc-dev@lists.ozlabs.org
In-Reply-To: <CAEsOVNcZPH_MJUdy0q7AjwomHTZhg2DoHSV+y9xatq-2SohC2A@mail.gmail.com>

On Fri, 2011-12-16 at 03:29 +0000, McClintock Matthew-B29882 wrote:
> On Thu, Dec 15, 2011 at 9:12 PM, Benjamin Herrenschmidt
> <benh@kernel.crashing.org> wrote:
> > On Mon, 2011-11-28 at 22:24 -0600, Matthew McClintock wrote:
> >> boot_cpuid and init_thread_info.cpu are redundant, just use the
> >> var that stays around longer and add a define to make boot_cpuid
> >> point at the correct value
> >>
> >> boot_cpudid_phys is not needed and can completly go away from the
> >> SMP case, we leave it there for the non-SMP case since the paca
> >> struct is not around to store this info
> >>
> >> This patch also has the effect of having the logical cpu number
> >> of the boot cpu be updated correctly independently of the ordering
> >> of the cpu nodes in the device tree.
> >
> > So what about head_fsl_booke.S comparing boot_cpuid to -1 ? That seems
> > to be broken now in at least 2 ways, boot_cpuid doesn't exist anymore
> > and you don't initialize it to -1 either...
> 
> This is 4/5 which is also waiting for your review.
> 
> http://lists.ozlabs.org/pipermail/linuxppc-dev/2011-October/093474.html

Ah missed that. This is FSL specific, I'd need Kumar and/or Scott's ack
for that one.

Cheers,
Ben.

^ permalink raw reply

* Re: [PATCH v2] powerpc/setup_{32, 64}.c: remove unneeded boot_cpuid{, _phys}
From: McClintock Matthew-B29882 @ 2011-12-16  3:29 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: Gala Kumar-B11780, linuxppc-dev@lists.ozlabs.org
In-Reply-To: <1324005174.4875.0.camel@pasglop>

On Thu, Dec 15, 2011 at 9:12 PM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> On Mon, 2011-11-28 at 22:24 -0600, Matthew McClintock wrote:
>> boot_cpuid and init_thread_info.cpu are redundant, just use the
>> var that stays around longer and add a define to make boot_cpuid
>> point at the correct value
>>
>> boot_cpudid_phys is not needed and can completly go away from the
>> SMP case, we leave it there for the non-SMP case since the paca
>> struct is not around to store this info
>>
>> This patch also has the effect of having the logical cpu number
>> of the boot cpu be updated correctly independently of the ordering
>> of the cpu nodes in the device tree.
>
> So what about head_fsl_booke.S comparing boot_cpuid to -1 ? That seems
> to be broken now in at least 2 ways, boot_cpuid doesn't exist anymore
> and you don't initialize it to -1 either...

This is 4/5 which is also waiting for your review.

http://lists.ozlabs.org/pipermail/linuxppc-dev/2011-October/093474.html

-M=

^ permalink raw reply

* Re: [PATCH v2] powerpc/setup_{32, 64}.c: remove unneeded boot_cpuid{, _phys}
From: Benjamin Herrenschmidt @ 2011-12-16  3:12 UTC (permalink / raw)
  To: Matthew McClintock; +Cc: kumar.gala, linuxppc-dev
In-Reply-To: <1322540669-6834-1-git-send-email-msm@freescale.com>

On Mon, 2011-11-28 at 22:24 -0600, Matthew McClintock wrote:
> boot_cpuid and init_thread_info.cpu are redundant, just use the
> var that stays around longer and add a define to make boot_cpuid
> point at the correct value
> 
> boot_cpudid_phys is not needed and can completly go away from the
> SMP case, we leave it there for the non-SMP case since the paca
> struct is not around to store this info
> 
> This patch also has the effect of having the logical cpu number
> of the boot cpu be updated correctly independently of the ordering
> of the cpu nodes in the device tree.

So what about head_fsl_booke.S comparing boot_cpuid to -1 ? That seems
to be broken now in at least 2 ways, boot_cpuid doesn't exist anymore
and you don't initialize it to -1 either...

Cheers,
Ben.

> Signed-off-by: Matthew McClintock <msm@freescale.com>
> ---
> v2: Fix compile issue for peries
>     Remove '-1' initial value
> 
>  arch/powerpc/include/asm/smp.h         |    2 +-
>  arch/powerpc/kernel/setup_32.c         |    5 +++--
>  arch/powerpc/kernel/setup_64.c         |    1 -
>  arch/powerpc/sysdev/xics/xics-common.c |    1 +
>  4 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h
> index adba970..f26c554 100644
> --- a/arch/powerpc/include/asm/smp.h
> +++ b/arch/powerpc/include/asm/smp.h
> @@ -29,7 +29,7 @@
>  #endif
>  #include <asm/percpu.h>
>  
> -extern int boot_cpuid;
> +#define boot_cpuid 	(init_thread_info.cpu)
>  extern int spinning_secondaries;
>  
>  extern void cpu_die(void);
> diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
> index ac76108..8d4df4c 100644
> --- a/arch/powerpc/kernel/setup_32.c
> +++ b/arch/powerpc/kernel/setup_32.c
> @@ -46,10 +46,11 @@
>  
>  extern void bootx_init(unsigned long r4, unsigned long phys);
>  
> -int boot_cpuid = -1;
> -EXPORT_SYMBOL_GPL(boot_cpuid);
> +/* we need a place to store phys cpu for non-SMP case */
> +#ifndef CONFIG_SMP
>  int boot_cpuid_phys;
>  EXPORT_SYMBOL_GPL(boot_cpuid_phys);
> +#endif
>  
>  int smp_hw_index[NR_CPUS];
>  
> diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
> index fb9bb46..6d0f00f 100644
> --- a/arch/powerpc/kernel/setup_64.c
> +++ b/arch/powerpc/kernel/setup_64.c
> @@ -73,7 +73,6 @@
>  #define DBG(fmt...)
>  #endif
>  
> -int boot_cpuid = 0;
>  int __initdata spinning_secondaries;
>  u64 ppc64_pft_size;
>  
> diff --git a/arch/powerpc/sysdev/xics/xics-common.c b/arch/powerpc/sysdev/xics/xics-common.c
> index d72eda6..8998b7a 100644
> --- a/arch/powerpc/sysdev/xics/xics-common.c
> +++ b/arch/powerpc/sysdev/xics/xics-common.c
> @@ -20,6 +20,7 @@
>  #include <linux/of.h>
>  #include <linux/slab.h>
>  #include <linux/spinlock.h>
> +#include <linux/sched.h>
>  
>  #include <asm/prom.h>
>  #include <asm/io.h>

^ permalink raw reply

* Re: [PATCH 3/3] mtd/nand : workaround for Freescale FCM to support large-page Nand chip
From: LiuShuo @ 2011-12-16  2:44 UTC (permalink / raw)
  To: Scott Wood, dedekind1
  Cc: Artem.Bityutskiy, linuxppc-dev, linux-kernel, shuo.liu, linux-mtd,
	akpm, dwmw2
In-Reply-To: <4EE903CE.1010903@freescale.com>

=E4=BA=8E 2011=E5=B9=B412=E6=9C=8815=E6=97=A5 04:15, Scott Wood =E5=86=99=
=E9=81=93:
> On 12/14/2011 02:41 AM, LiuShuo wrote:
>> =E4=BA=8E 2011=E5=B9=B412=E6=9C=8813=E6=97=A5 10:46, LiuShuo =E5=86=99=
=E9=81=93:
>>> =E4=BA=8E 2011=E5=B9=B412=E6=9C=8813=E6=97=A5 05:30, Scott Wood =E5=86=
=99=E9=81=93:
>>>> On 12/12/2011 03:19 PM, Artem Bityutskiy wrote:
>>>>> On Mon, 2011-12-12 at 15:15 -0600, Scott Wood wrote:
>>>>>> NAND chips come from the factory with bad blocks marked at a certa=
in
>>>>>> offset into each page.  This offset is normally in the OOB area, b=
ut
>>>>>> since we change the layout from "4k data, 128 byte oob" to "2k
>>>>>> data, 64
>>>>>> byte oob, 2k data, 64 byte oob" the marker is no longer in the
>>>>>> oob.  On
>>>>>> first use we need to migrate the markers so that they are still in
>>>>>> the oob.
>>>>> Ah, I see, thanks. Are you planning to implement in-kernel migratio=
n or
>>>>> use a user-space tool?
>>>> That's the kind of answer I was hoping to get from Shuo. :-)
>>> OK, I try to do this. Wait for a couple of days.
>>>
>>> -LiuShuo
>> I found it's too complex to do the migration in Linux driver.
>>
>> Maybe we can add a uboot command (e.g. nand bbmigrate) to do it, once =
is
>> enough.
> Any reason not to do it automatically on the first U-Boot bad block
> scan, if the flash isn't marked as already migrated?
>
> Further discussion on the details of how to do it in U-Boot should move
> to the U-Boot list.
>
>> And let user ensure it been completed before linux use the Nand flash =
chip.
> I don't want to trust the user here.  It's too easy to skip it, and
> things will appear to work, but have subtle problems.
>
>> Even if we don't do the migration, the bad block also can be marked as=
 bad
>> by wearing. So, do we really need to take much time to implement it ?
>> (code looks too complex.)
> It is not acceptable to ignore factory bad block markers just because
> some methods of using the flash may eventually detect an error (possibl=
y
> after data is lost -- no guarantee that the badness is ECC-correctable)
> and mark the block bad again.
>
> If you don't feel up to the task, I can look at it, but won't have time
> until January.
hi Scott,
It's really hard to me and I have much other works to do now. Thanks for=20
your help.

hi Artem,
Could this patch be applied now and we make a independent patch for  bad=20
block information
migration later?

-LiuShuo

> -Scott

^ permalink raw reply

* Re: Linux port availability for p5010 processor
From: tiejun.chen @ 2011-12-16  1:57 UTC (permalink / raw)
  To: Vineeth; +Cc: Scott Wood, linuxppc-dev
In-Reply-To: <CAFbQSaA6yK7d+O0C6-BguKamRcBNnsU-yimO48cQV8G_evmJjw@mail.gmail.com>

Vineeth wrote:
> found p5020_ds.c in platforms/85xx;
> why is it a part of 85xx directory ? the core of P5020 is E5500 where the
> core of 85xx is e500;
> 

e5500 is e500mc-64bit Power Architecture core.

> Do we have the processor initialization code (start.S, head.S) files, port
> available with linux ?
> 

So it should go head_64.S/entry_64.S with CONFIG_PPC_BOOK3E.

Tiejun

^ permalink raw reply

* Help needed with porting ether-net driver from ADS5121 to TWR-MPC5125
From: G.H.Lee @ 2011-12-16  0:38 UTC (permalink / raw)
  To: linuxppc-dev

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

Hello, all

I am a new user of the board TWR-MPC5125 made by freescale. Now I am trying to porting the new kernel, i.e. the version 3.0.4, to this board. I have porting the serial driver and the nand flash driver successfully. And I can also mount the root file system. But I can not use the ether-net interface now. I have tried to port the ether-net driver based on the ether-net driver for ADS 5121, which is provided by the new kernel 3.0.4. The only thing I have to do in the porting is that I should change the MII mode in ADS5121 board to RMII mode in my board. And I find that I can send packages out if I use the "ping" command. But I can not receive any package for responding. And I also found that the interrupt routine for sending packages was running but the interrupt routine for receiving message was not called by the kernel. I don't know why. 

Can anyone help me? Should I change some other codes beyond the ether-net driver? Someone told me that I should regulate the kernel because of the differences among the different kerenl versions if the MAC was integrated inside the SOC, which was the fatto in my board. But I don't know how to regulate.

B.T.W. : The hardware is good enough because I can use the ether net interface in u-boot and if using the kernel provided by freescale. Moreover, the u-boot is also good and I have not change it. So the ether net pins are configured correctly. But I have not porting the driver for DMA. But I think it is Ok because the "ping" command can be used correctly if using the kernel provided by freescale when I cancel the DMA driver when configuring the kernel.

Thanks.




Guohu Li

[-- Attachment #2: Type: text/html, Size: 2965 bytes --]

^ permalink raw reply

* Re: [PATCH 1/3]arch:powerpc:sysdev:mpic.c Remove extra semicolon.
From: Justin Mattock @ 2011-12-15 19:26 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel
In-Reply-To: <alpine.LNX.2.00.1112151845550.23478@pobox.suse.cz>

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

Ill check through the commits.. Thank you for applying..

On Dec 15, 2011 9:46 AM, "Jiri Kosina" <jkosina@suse.cz> wrote:

> On Thu, 15 Dec 2011, Justin P. Mattock wrote:
>
> > what would be the status of these? should I resend/rebase to the current
> > etc?..
>
> Check linux-next, it's already there.
>
> >
> > On 11/21/2011 08:43 AM, Justin P. Mattock wrote:
> > > From: "Justin P. Mattock"<justinmattock@gmail.com>
> > >
> > > The patch below removes an extra semicolon.
> > >
> > > Signed-off-by: Justin P. Mattock<justinmattock@gmail.com>
> > > CC: linuxppc-dev@lists.ozlabs.org
> > > CC: Paul Mackerras<paulus@samba.org>
> > > ---
> > >   arch/powerpc/sysdev/mpic.c |    2 +-
> > >   1 files changed, 1 insertions(+), 1 deletions(-)
> > >
> > > diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> > > index 8c7e852..b3fa3d7 100644
> > > --- a/arch/powerpc/sysdev/mpic.c
> > > +++ b/arch/powerpc/sysdev/mpic.c
> > > @@ -901,7 +901,7 @@ int mpic_set_irq_type(struct irq_data *d, unsigned
> int
> > > flow_type)
> > >     if (vold != vnew)
> > >             mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI), vnew);
> > >
> > > -   return IRQ_SET_MASK_OK_NOCOPY;;
> > > +   return IRQ_SET_MASK_OK_NOCOPY;
> > >   }
> > >
> > >   void mpic_set_vector(unsigned int virq, unsigned int vector)
> >
>
> --
> Jiri Kosina
> SUSE Labs
>

[-- Attachment #2: Type: text/html, Size: 2048 bytes --]

^ permalink raw reply

* Re: [PATCH 1/3]arch:powerpc:sysdev:mpic.c Remove extra semicolon.
From: Jiri Kosina @ 2011-12-15 17:46 UTC (permalink / raw)
  To: Justin P. Mattock; +Cc: Paul Mackerras, linuxppc-dev, linux-kernel
In-Reply-To: <4EEA2A5A.2050008@gmail.com>

On Thu, 15 Dec 2011, Justin P. Mattock wrote:

> what would be the status of these? should I resend/rebase to the current
> etc?..

Check linux-next, it's already there.

> 
> On 11/21/2011 08:43 AM, Justin P. Mattock wrote:
> > From: "Justin P. Mattock"<justinmattock@gmail.com>
> > 
> > The patch below removes an extra semicolon.
> > 
> > Signed-off-by: Justin P. Mattock<justinmattock@gmail.com>
> > CC: linuxppc-dev@lists.ozlabs.org
> > CC: Paul Mackerras<paulus@samba.org>
> > ---
> >   arch/powerpc/sysdev/mpic.c |    2 +-
> >   1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> > index 8c7e852..b3fa3d7 100644
> > --- a/arch/powerpc/sysdev/mpic.c
> > +++ b/arch/powerpc/sysdev/mpic.c
> > @@ -901,7 +901,7 @@ int mpic_set_irq_type(struct irq_data *d, unsigned int
> > flow_type)
> >   	if (vold != vnew)
> >   		mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI), vnew);
> > 
> > -	return IRQ_SET_MASK_OK_NOCOPY;;
> > +	return IRQ_SET_MASK_OK_NOCOPY;
> >   }
> > 
> >   void mpic_set_vector(unsigned int virq, unsigned int vector)
> 

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply

* Re: [PATCH 3/3] mtd/nand : workaround for Freescale FCM to support large-page Nand chip
From: Scott Wood @ 2011-12-15 17:32 UTC (permalink / raw)
  To: Li Yang
  Cc: Artem.Bityutskiy, dedekind1, dwmw2, LiuShuo, linux-kernel,
	shuo.liu, linux-mtd, akpm, linuxppc-dev
In-Reply-To: <CADRPPNRRXTWzBEvY=vhe9+v0b8Ntq8KNoaXFN8pQZGmMc-dJYw@mail.gmail.com>

On 12/14/2011 10:59 PM, Li Yang wrote:
> The limitation of the proposed bad block marker migration is that you
> need to make sure the migration is done and only done once.  If it is
> done more than once, the factory bad block marker is totally messed
> up.  It requires a complex mechanism to automatically guarantee the
> migration is only done once, and it still won't be 100% safe.
> 
> I would suggest we use a much easier compromise that we form the BBT
> base on the factory bad block marker on first use of the flash, and
> after that the factory bad block marker is dropped.  We just relies on
> the BBT for information about bad blocks.  Although by doing so we
> can't regenerate the BBT again,  as there is mirror for the BBT I
> don't think we have too much risk.

I have corrupted the BBT too often during development (e.g. a bug makes
all accesses fail, so the upper layers decide to mark everything bad) to
be comfortable with this.

Elsewhere in the thread I suggested a way to let the marker be in either
the bbt or in a dedicated block, depending on whether it's a development
situation where the BBT needs to be erasable.

-Scott

^ permalink raw reply

* Re: [PATCH] phylib: update mdiobus_alloc() to allocate extra private space
From: Timur Tabi @ 2011-12-15 17:12 UTC (permalink / raw)
  To: Andy Fleming; +Cc: netdev, davem, linuxppc-dev
In-Reply-To: <8ABCAC4C-1D11-41AD-AE46-96EB9D40588D@freescale.com>

Andy Fleming wrote:
> Why? Doesn't this just obfuscate things a little, while providing no immediate benefit?

I see code like this frequently:

	bus = mdiobus_alloc();
	if (bus == NULL)
		return -ENOMEM;
	priv = kzalloc(sizeof(*priv), GFP_KERNEL);
	if (priv == NULL) {
		err = -ENOMEM;
		goto out_free;
	}
	bus->priv = priv;

This can be replaced with:

	bus = mdiobus_alloc(sizeof(*priv));
	if (bus == NULL)
		return -ENOMEM;

So the benefit is in simplifying memory management.  Now you have only one allocation to manage, instead of two.

fbdev does the same thing, which is where I got the idea from.  See framebuffer_alloc().

-- 
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply

* Re: [PATCH] phylib: update mdiobus_alloc() to allocate extra private space
From: Andy Fleming @ 2011-12-15 17:06 UTC (permalink / raw)
  To: Timur Tabi; +Cc: netdev, davem, linuxppc-dev
In-Reply-To: <1323967895-5205-1-git-send-email-timur@freescale.com>


On Dec 15, 2011, at 11:51 AM, Timur Tabi wrote:

> Augment mdiobus_alloc() to take a parameter indicating the number of =
extra
> bytes to allocate for private data.  Almost all callers of =
mdiobus_alloc()
> separately allocate a private data structure.  By allowing =
mdiobus_alloc()
> to allocate extra memory, the two allocations can be merged into one.
>=20
> This patch does not change any of the callers to actually take =
advantage
> of this feature, however.  That change can be made by the individual
> maintainers at their leisure.  For now, all callers ask for zero =
additional
> bytes, which mimics the previous behavior.


Why? Doesn't this just obfuscate things a little, while providing no =
immediate benefit?

Andy=

^ permalink raw reply

* Re: [PATCH 1/3]arch:powerpc:sysdev:mpic.c Remove extra semicolon.
From: Justin P. Mattock @ 2011-12-15 17:11 UTC (permalink / raw)
  To: Justin P. Mattock; +Cc: linuxppc-dev, trivial, linux-kernel, Paul Mackerras
In-Reply-To: <1321893808-3721-1-git-send-email-justinmattock@gmail.com>

what would be the status of these? should I resend/rebase to the current 
etc?..

On 11/21/2011 08:43 AM, Justin P. Mattock wrote:
> From: "Justin P. Mattock"<justinmattock@gmail.com>
>
> The patch below removes an extra semicolon.
>
> Signed-off-by: Justin P. Mattock<justinmattock@gmail.com>
> CC: linuxppc-dev@lists.ozlabs.org
> CC: Paul Mackerras<paulus@samba.org>
> ---
>   arch/powerpc/sysdev/mpic.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> index 8c7e852..b3fa3d7 100644
> --- a/arch/powerpc/sysdev/mpic.c
> +++ b/arch/powerpc/sysdev/mpic.c
> @@ -901,7 +901,7 @@ int mpic_set_irq_type(struct irq_data *d, unsigned int flow_type)
>   	if (vold != vnew)
>   		mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI), vnew);
>
> -	return IRQ_SET_MASK_OK_NOCOPY;;
> +	return IRQ_SET_MASK_OK_NOCOPY;
>   }
>
>   void mpic_set_vector(unsigned int virq, unsigned int vector)

^ permalink raw reply

* [PATCH] phylib: update mdiobus_alloc() to allocate extra private space
From: Timur Tabi @ 2011-12-15 16:51 UTC (permalink / raw)
  To: davem, afleming, netdev, linuxppc-dev

Augment mdiobus_alloc() to take a parameter indicating the number of extra
bytes to allocate for private data.  Almost all callers of mdiobus_alloc()
separately allocate a private data structure.  By allowing mdiobus_alloc()
to allocate extra memory, the two allocations can be merged into one.

This patch does not change any of the callers to actually take advantage
of this feature, however.  That change can be made by the individual
maintainers at their leisure.  For now, all callers ask for zero additional
bytes, which mimics the previous behavior.

Signed-off-by: Timur Tabi <timur@freescale.com>
---
 arch/powerpc/platforms/pasemi/gpio_mdio.c         |    2 +-
 drivers/net/ethernet/adi/bfin_mac.c               |    2 +-
 drivers/net/ethernet/aeroflex/greth.c             |    2 +-
 drivers/net/ethernet/amd/au1000_eth.c             |    2 +-
 drivers/net/ethernet/broadcom/bcm63xx_enet.c      |    2 +-
 drivers/net/ethernet/broadcom/sb1250-mac.c        |    2 +-
 drivers/net/ethernet/broadcom/tg3.c               |    2 +-
 drivers/net/ethernet/cadence/macb.c               |    2 +-
 drivers/net/ethernet/dnet.c                       |    2 +-
 drivers/net/ethernet/ethoc.c                      |    2 +-
 drivers/net/ethernet/faraday/ftgmac100.c          |    2 +-
 drivers/net/ethernet/freescale/fec.c              |    2 +-
 drivers/net/ethernet/freescale/fec_mpc52xx_phy.c  |    2 +-
 drivers/net/ethernet/freescale/fs_enet/mii-fec.c  |    2 +-
 drivers/net/ethernet/freescale/fsl_pq_mdio.c      |    2 +-
 drivers/net/ethernet/lantiq_etop.c                |    2 +-
 drivers/net/ethernet/marvell/mv643xx_eth.c        |    2 +-
 drivers/net/ethernet/marvell/pxa168_eth.c         |    2 +-
 drivers/net/ethernet/rdc/r6040.c                  |    2 +-
 drivers/net/ethernet/s6gmac.c                     |    2 +-
 drivers/net/ethernet/smsc/smsc911x.c              |    2 +-
 drivers/net/ethernet/smsc/smsc9420.c              |    2 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c |    2 +-
 drivers/net/ethernet/ti/cpmac.c                   |    2 +-
 drivers/net/ethernet/ti/davinci_mdio.c            |    2 +-
 drivers/net/ethernet/toshiba/tc35815.c            |    2 +-
 drivers/net/ethernet/xilinx/ll_temac_mdio.c       |    2 +-
 drivers/net/ethernet/xilinx/xilinx_emaclite.c     |    2 +-
 drivers/net/ethernet/xscale/ixp4xx_eth.c          |    2 +-
 drivers/net/phy/fixed.c                           |    2 +-
 drivers/net/phy/mdio-bitbang.c                    |    2 +-
 drivers/net/phy/mdio-octeon.c                     |    2 +-
 drivers/net/phy/mdio_bus.c                        |   20 +++++++++++++++++---
 drivers/staging/et131x/et131x.c                   |    2 +-
 include/linux/phy.h                               |    2 +-
 net/dsa/dsa.c                                     |    2 +-
 36 files changed, 52 insertions(+), 38 deletions(-)

diff --git a/arch/powerpc/platforms/pasemi/gpio_mdio.c b/arch/powerpc/platforms/pasemi/gpio_mdio.c
index 9886296..754a57b 100644
--- a/arch/powerpc/platforms/pasemi/gpio_mdio.c
+++ b/arch/powerpc/platforms/pasemi/gpio_mdio.c
@@ -230,7 +230,7 @@ static int __devinit gpio_mdio_probe(struct platform_device *ofdev)
 	if (!priv)
 		goto out;
 
-	new_bus = mdiobus_alloc();
+	new_bus = mdiobus_alloc(0);
 
 	if (!new_bus)
 		goto out_free_priv;
diff --git a/drivers/net/ethernet/adi/bfin_mac.c b/drivers/net/ethernet/adi/bfin_mac.c
index b6d69c9..ea71758 100644
--- a/drivers/net/ethernet/adi/bfin_mac.c
+++ b/drivers/net/ethernet/adi/bfin_mac.c
@@ -1659,7 +1659,7 @@ static int __devinit bfin_mii_bus_probe(struct platform_device *pdev)
 	}
 
 	rc = -ENOMEM;
-	miibus = mdiobus_alloc();
+	miibus = mdiobus_alloc(0);
 	if (miibus == NULL)
 		goto out_err_alloc;
 	miibus->read = bfin_mdiobus_read;
diff --git a/drivers/net/ethernet/aeroflex/greth.c b/drivers/net/ethernet/aeroflex/greth.c
index c885aa9..c6bc550 100644
--- a/drivers/net/ethernet/aeroflex/greth.c
+++ b/drivers/net/ethernet/aeroflex/greth.c
@@ -1326,7 +1326,7 @@ static int greth_mdio_init(struct greth_private *greth)
 	int ret, phy;
 	unsigned long timeout;
 
-	greth->mdio = mdiobus_alloc();
+	greth->mdio = mdiobus_alloc(0);
 	if (!greth->mdio) {
 		return -ENOMEM;
 	}
diff --git a/drivers/net/ethernet/amd/au1000_eth.c b/drivers/net/ethernet/amd/au1000_eth.c
index cc9262b..5c30544 100644
--- a/drivers/net/ethernet/amd/au1000_eth.c
+++ b/drivers/net/ethernet/amd/au1000_eth.c
@@ -1159,7 +1159,7 @@ static int __devinit au1000_probe(struct platform_device *pdev)
 		goto err_mdiobus_alloc;
 	}
 
-	aup->mii_bus = mdiobus_alloc();
+	aup->mii_bus = mdiobus_alloc(0);
 	if (aup->mii_bus == NULL) {
 		dev_err(&pdev->dev, "failed to allocate mdiobus structure\n");
 		err = -ENOMEM;
diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
index a11a8ad..c847801 100644
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -1715,7 +1715,7 @@ static int __devinit bcm_enet_probe(struct platform_device *pdev)
 	/* MII bus registration */
 	if (priv->has_phy) {
 
-		priv->mii_bus = mdiobus_alloc();
+		priv->mii_bus = mdiobus_alloc(0);
 		if (!priv->mii_bus) {
 			ret = -ENOMEM;
 			goto out_uninit_hw;
diff --git a/drivers/net/ethernet/broadcom/sb1250-mac.c b/drivers/net/ethernet/broadcom/sb1250-mac.c
index 8fa7abc..4ff830e 100644
--- a/drivers/net/ethernet/broadcom/sb1250-mac.c
+++ b/drivers/net/ethernet/broadcom/sb1250-mac.c
@@ -2252,7 +2252,7 @@ static int sbmac_init(struct platform_device *pldev, long long base)
 	/* This is needed for PASS2 for Rx H/W checksum feature */
 	sbmac_set_iphdr_offset(sc);
 
-	sc->mii_bus = mdiobus_alloc();
+	sc->mii_bus = mdiobus_alloc(0);
 	if (sc->mii_bus == NULL) {
 		err = -ENOMEM;
 		goto uninit_ctx;
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 1979151..6ce2c4c 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -1323,7 +1323,7 @@ static int tg3_mdio_init(struct tg3 *tp)
 	if (!tg3_flag(tp, USE_PHYLIB) || tg3_flag(tp, MDIOBUS_INITED))
 		return 0;
 
-	tp->mdio_bus = mdiobus_alloc();
+	tp->mdio_bus = mdiobus_alloc(0);
 	if (tp->mdio_bus == NULL)
 		return -ENOMEM;
 
diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index a437b46..dc3b09e 100644
--- a/drivers/net/ethernet/cadence/macb.c
+++ b/drivers/net/ethernet/cadence/macb.c
@@ -234,7 +234,7 @@ static int macb_mii_init(struct macb *bp)
 	/* Enable management port */
 	macb_writel(bp, NCR, MACB_BIT(MPE));
 
-	bp->mii_bus = mdiobus_alloc();
+	bp->mii_bus = mdiobus_alloc(0);
 	if (bp->mii_bus == NULL) {
 		err = -ENOMEM;
 		goto err_out;
diff --git a/drivers/net/ethernet/dnet.c b/drivers/net/ethernet/dnet.c
index ce88c0f..04a55a4 100644
--- a/drivers/net/ethernet/dnet.c
+++ b/drivers/net/ethernet/dnet.c
@@ -316,7 +316,7 @@ static int dnet_mii_init(struct dnet *bp)
 {
 	int err, i;
 
-	bp->mii_bus = mdiobus_alloc();
+	bp->mii_bus = mdiobus_alloc(0);
 	if (bp->mii_bus == NULL)
 		return -ENOMEM;
 
diff --git a/drivers/net/ethernet/ethoc.c b/drivers/net/ethernet/ethoc.c
index 60f0e78..9916475 100644
--- a/drivers/net/ethernet/ethoc.c
+++ b/drivers/net/ethernet/ethoc.c
@@ -1056,7 +1056,7 @@ static int __devinit ethoc_probe(struct platform_device *pdev)
 	ethoc_set_mac_address(netdev, netdev->dev_addr);
 
 	/* register MII bus */
-	priv->mdio = mdiobus_alloc();
+	priv->mdio = mdiobus_alloc(0);
 	if (!priv->mdio) {
 		ret = -ENOMEM;
 		goto free;
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
index fb5579a..19fc332 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.c
+++ b/drivers/net/ethernet/faraday/ftgmac100.c
@@ -1248,7 +1248,7 @@ static int ftgmac100_probe(struct platform_device *pdev)
 	priv->irq = irq;
 
 	/* initialize mdio bus */
-	priv->mii_bus = mdiobus_alloc();
+	priv->mii_bus = mdiobus_alloc(0);
 	if (!priv->mii_bus) {
 		err = -EIO;
 		goto err_alloc_mdiobus;
diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c
index 01ee9cc..ab1d39c 100644
--- a/drivers/net/ethernet/freescale/fec.c
+++ b/drivers/net/ethernet/freescale/fec.c
@@ -1066,7 +1066,7 @@ static int fec_enet_mii_init(struct platform_device *pdev)
 	fep->phy_speed <<= 1;
 	writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED);
 
-	fep->mii_bus = mdiobus_alloc();
+	fep->mii_bus = mdiobus_alloc(0);
 	if (fep->mii_bus == NULL) {
 		err = -ENOMEM;
 		goto err_out;
diff --git a/drivers/net/ethernet/freescale/fec_mpc52xx_phy.c b/drivers/net/ethernet/freescale/fec_mpc52xx_phy.c
index 360a578..f5918c1 100644
--- a/drivers/net/ethernet/freescale/fec_mpc52xx_phy.c
+++ b/drivers/net/ethernet/freescale/fec_mpc52xx_phy.c
@@ -70,7 +70,7 @@ static int mpc52xx_fec_mdio_probe(struct platform_device *of)
 	struct resource res;
 	int err;
 
-	bus = mdiobus_alloc();
+	bus = mdiobus_alloc(0);
 	if (bus == NULL)
 		return -ENOMEM;
 	priv = kzalloc(sizeof(*priv), GFP_KERNEL);
diff --git a/drivers/net/ethernet/freescale/fs_enet/mii-fec.c b/drivers/net/ethernet/freescale/fs_enet/mii-fec.c
index 55bb867..74964ce 100644
--- a/drivers/net/ethernet/freescale/fs_enet/mii-fec.c
+++ b/drivers/net/ethernet/freescale/fs_enet/mii-fec.c
@@ -116,7 +116,7 @@ static int __devinit fs_enet_mdio_probe(struct platform_device *ofdev)
 		return -EINVAL;
 	get_bus_freq = match->data;
 
-	new_bus = mdiobus_alloc();
+	new_bus = mdiobus_alloc(0);
 	if (!new_bus)
 		goto out;
 
diff --git a/drivers/net/ethernet/freescale/fsl_pq_mdio.c b/drivers/net/ethernet/freescale/fsl_pq_mdio.c
index f109602..332418a 100644
--- a/drivers/net/ethernet/freescale/fsl_pq_mdio.c
+++ b/drivers/net/ethernet/freescale/fsl_pq_mdio.c
@@ -266,7 +266,7 @@ static int fsl_pq_mdio_probe(struct platform_device *ofdev)
 	if (!priv)
 		return -ENOMEM;
 
-	new_bus = mdiobus_alloc();
+	new_bus = mdiobus_alloc(0);
 	if (!new_bus) {
 		err = -ENOMEM;
 		goto err_free_priv;
diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
index 0b3567a..94a6055 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
@@ -425,7 +425,7 @@ ltq_etop_mdio_init(struct net_device *dev)
 	int i;
 	int err;
 
-	priv->mii_bus = mdiobus_alloc();
+	priv->mii_bus = mdiobus_alloc(0);
 	if (!priv->mii_bus) {
 		netdev_err(dev, "failed to allocate mii bus\n");
 		err = -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index e87847e..250e0cc 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -2604,7 +2604,7 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev)
 	 * Set up and register SMI bus.
 	 */
 	if (pd == NULL || pd->shared_smi == NULL) {
-		msp->smi_bus = mdiobus_alloc();
+		msp->smi_bus = mdiobus_alloc(0);
 		if (msp->smi_bus == NULL)
 			goto out_unmap;
 
diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c
index 5ec409e..2dfb98a 100644
--- a/drivers/net/ethernet/marvell/pxa168_eth.c
+++ b/drivers/net/ethernet/marvell/pxa168_eth.c
@@ -1543,7 +1543,7 @@ static int pxa168_eth_probe(struct platform_device *pdev)
 	pep->timeout.function = rxq_refill_timer_wrapper;
 	pep->timeout.data = (unsigned long)pep;
 
-	pep->smi_bus = mdiobus_alloc();
+	pep->smi_bus = mdiobus_alloc(0);
 	if (pep->smi_bus == NULL) {
 		err = -ENOMEM;
 		goto err_base;
diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c
index 4bf68cf..4175e57 100644
--- a/drivers/net/ethernet/rdc/r6040.c
+++ b/drivers/net/ethernet/rdc/r6040.c
@@ -1176,7 +1176,7 @@ static int __devinit r6040_init_one(struct pci_dev *pdev,
 
 	netif_napi_add(dev, &lp->napi, r6040_poll, 64);
 
-	lp->mii_bus = mdiobus_alloc();
+	lp->mii_bus = mdiobus_alloc(0);
 	if (!lp->mii_bus) {
 		dev_err(&pdev->dev, "mdiobus_alloc() failed\n");
 		err = -ENOMEM;
diff --git a/drivers/net/ethernet/s6gmac.c b/drivers/net/ethernet/s6gmac.c
index a7ff8ea..d8f11ef 100644
--- a/drivers/net/ethernet/s6gmac.c
+++ b/drivers/net/ethernet/s6gmac.c
@@ -994,7 +994,7 @@ static int __devinit s6gmac_probe(struct platform_device *pdev)
 			dev->name);
 		goto errdev;
 	}
-	mb = mdiobus_alloc();
+	mb = mdiobus_alloc(0);
 	if (!mb) {
 		printk(KERN_ERR DRV_PRMT "error allocating mii bus\n");
 		goto errmii;
diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c
index 06d0df6..103297b 100644
--- a/drivers/net/ethernet/smsc/smsc911x.c
+++ b/drivers/net/ethernet/smsc/smsc911x.c
@@ -1037,7 +1037,7 @@ static int __devinit smsc911x_mii_init(struct platform_device *pdev,
 	struct smsc911x_data *pdata = netdev_priv(dev);
 	int err = -ENXIO, i;
 
-	pdata->mii_bus = mdiobus_alloc();
+	pdata->mii_bus = mdiobus_alloc(0);
 	if (!pdata->mii_bus) {
 		err = -ENOMEM;
 		goto err_out_1;
diff --git a/drivers/net/ethernet/smsc/smsc9420.c b/drivers/net/ethernet/smsc/smsc9420.c
index a9efbdf..16738a1 100644
--- a/drivers/net/ethernet/smsc/smsc9420.c
+++ b/drivers/net/ethernet/smsc/smsc9420.c
@@ -1205,7 +1205,7 @@ static int smsc9420_mii_init(struct net_device *dev)
 	struct smsc9420_pdata *pd = netdev_priv(dev);
 	int err = -ENXIO, i;
 
-	pd->mii_bus = mdiobus_alloc();
+	pd->mii_bus = mdiobus_alloc(0);
 	if (!pd->mii_bus) {
 		err = -ENOMEM;
 		goto err_out_1;
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
index 9c3b9d5..5dc0396 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
@@ -144,7 +144,7 @@ int stmmac_mdio_register(struct net_device *ndev)
 	if (!mdio_bus_data)
 		return 0;
 
-	new_bus = mdiobus_alloc();
+	new_bus = mdiobus_alloc(0);
 	if (new_bus == NULL)
 		return -ENOMEM;
 
diff --git a/drivers/net/ethernet/ti/cpmac.c b/drivers/net/ethernet/ti/cpmac.c
index aaac0c7..b13df3c 100644
--- a/drivers/net/ethernet/ti/cpmac.c
+++ b/drivers/net/ethernet/ti/cpmac.c
@@ -1227,7 +1227,7 @@ int __devinit cpmac_init(void)
 	u32 mask;
 	int i, res;
 
-	cpmac_mii = mdiobus_alloc();
+	cpmac_mii = mdiobus_alloc(0);
 	if (cpmac_mii == NULL)
 		return -ENOMEM;
 
diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
index 7615040..fffddef 100644
--- a/drivers/net/ethernet/ti/davinci_mdio.c
+++ b/drivers/net/ethernet/ti/davinci_mdio.c
@@ -300,7 +300,7 @@ static int __devinit davinci_mdio_probe(struct platform_device *pdev)
 
 	data->pdata = pdata ? (*pdata) : default_pdata;
 
-	data->bus = mdiobus_alloc();
+	data->bus = mdiobus_alloc(0);
 	if (!data->bus) {
 		dev_err(dev, "failed to alloc mii bus\n");
 		ret = -ENOMEM;
diff --git a/drivers/net/ethernet/toshiba/tc35815.c b/drivers/net/ethernet/toshiba/tc35815.c
index 71b785c..4538908 100644
--- a/drivers/net/ethernet/toshiba/tc35815.c
+++ b/drivers/net/ethernet/toshiba/tc35815.c
@@ -673,7 +673,7 @@ static int tc_mii_init(struct net_device *dev)
 	int err;
 	int i;
 
-	lp->mii_bus = mdiobus_alloc();
+	lp->mii_bus = mdiobus_alloc(0);
 	if (lp->mii_bus == NULL) {
 		err = -ENOMEM;
 		goto err_out;
diff --git a/drivers/net/ethernet/xilinx/ll_temac_mdio.c b/drivers/net/ethernet/xilinx/ll_temac_mdio.c
index 8cf9d4f..7d0ebf5 100644
--- a/drivers/net/ethernet/xilinx/ll_temac_mdio.c
+++ b/drivers/net/ethernet/xilinx/ll_temac_mdio.c
@@ -81,7 +81,7 @@ int temac_mdio_setup(struct temac_local *lp, struct device_node *np)
 	temac_indirect_out32(lp, XTE_MC_OFFSET, 1 << 6 | clk_div);
 	mutex_unlock(&lp->indirect_mutex);
 
-	bus = mdiobus_alloc();
+	bus = mdiobus_alloc(0);
 	if (!bus)
 		return -ENOMEM;
 
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index dca6541..4ecd7ac 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -861,7 +861,7 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev)
 	out_be32(lp->base_addr + XEL_MDIOCTRL_OFFSET,
 		 XEL_MDIOCTRL_MDIOEN_MASK);
 
-	bus = mdiobus_alloc();
+	bus = mdiobus_alloc(0);
 	if (!bus)
 		return -ENOMEM;
 
diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c
index f45c85a..43b4892 100644
--- a/drivers/net/ethernet/xscale/ixp4xx_eth.c
+++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c
@@ -509,7 +509,7 @@ static int ixp4xx_mdio_register(void)
 {
 	int err;
 
-	if (!(mdio_bus = mdiobus_alloc()))
+	if (!(mdio_bus = mdiobus_alloc(0)))
 		return -ENOMEM;
 
 	if (cpu_is_ixp43x()) {
diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c
index 1fa4d73..18e838e 100644
--- a/drivers/net/phy/fixed.c
+++ b/drivers/net/phy/fixed.c
@@ -214,7 +214,7 @@ static int __init fixed_mdio_bus_init(void)
 		goto err_pdev;
 	}
 
-	fmb->mii_bus = mdiobus_alloc();
+	fmb->mii_bus = mdiobus_alloc(0);
 	if (fmb->mii_bus == NULL) {
 		ret = -ENOMEM;
 		goto err_mdiobus_reg;
diff --git a/drivers/net/phy/mdio-bitbang.c b/drivers/net/phy/mdio-bitbang.c
index daec9b0..097cf50 100644
--- a/drivers/net/phy/mdio-bitbang.c
+++ b/drivers/net/phy/mdio-bitbang.c
@@ -214,7 +214,7 @@ struct mii_bus *alloc_mdio_bitbang(struct mdiobb_ctrl *ctrl)
 {
 	struct mii_bus *bus;
 
-	bus = mdiobus_alloc();
+	bus = mdiobus_alloc(0);
 	if (!bus)
 		return NULL;
 
diff --git a/drivers/net/phy/mdio-octeon.c b/drivers/net/phy/mdio-octeon.c
index bd12ba9..4c68668 100644
--- a/drivers/net/phy/mdio-octeon.c
+++ b/drivers/net/phy/mdio-octeon.c
@@ -99,7 +99,7 @@ static int __devinit octeon_mdiobus_probe(struct platform_device *pdev)
 	/* The platform_device id is our unit number.  */
 	bus->unit = pdev->id;
 
-	bus->mii_bus = mdiobus_alloc();
+	bus->mii_bus = mdiobus_alloc(0);
 
 	if (!bus->mii_bus)
 		goto err;
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index 6c58da2..e6fd35d 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -41,14 +41,28 @@
  *
  * Description: called by a bus driver to allocate an mii_bus
  * structure to fill in.
+ *
+ * 'size' is an an extra amount of memory to allocate for private storage.
+ * If non-zero, then bus->priv is points to that memory.
  */
-struct mii_bus *mdiobus_alloc(void)
+struct mii_bus *mdiobus_alloc(size_t size)
 {
 	struct mii_bus *bus;
+	size_t aligned_size = ALIGN(sizeof(*bus), NETDEV_ALIGN);
+	size_t alloc_size;
+
+	/* If we alloc extra space, it should be aligned */
+	if (size)
+		alloc_size = aligned_size + size;
+	else
+		alloc_size = sizeof(*bus);
 
-	bus = kzalloc(sizeof(*bus), GFP_KERNEL);
-	if (bus != NULL)
+	bus = kzalloc(alloc_size, GFP_KERNEL);
+	if (bus) {
 		bus->state = MDIOBUS_ALLOCATED;
+		if (size)
+			bus->priv = (void *)bus + aligned_size;
+	}
 
 	return bus;
 }
diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
index 0c1c6ca..1f5a2f9 100644
--- a/drivers/staging/et131x/et131x.c
+++ b/drivers/staging/et131x/et131x.c
@@ -5396,7 +5396,7 @@ static int __devinit et131x_pci_setup(struct pci_dev *pdev,
 	et1310_disable_phy_coma(adapter);
 
 	/* Setup the mii_bus struct */
-	adapter->mii_bus = mdiobus_alloc();
+	adapter->mii_bus = mdiobus_alloc(0);
 	if (!adapter->mii_bus) {
 		dev_err(&pdev->dev, "Alloc of mii_bus struct failed\n");
 		goto err_mem_free;
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 79f337c..603153f 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -129,7 +129,7 @@ struct mii_bus {
 };
 #define to_mii_bus(d) container_of(d, struct mii_bus, dev)
 
-struct mii_bus *mdiobus_alloc(void);
+struct mii_bus *mdiobus_alloc(size_t size);
 int mdiobus_register(struct mii_bus *bus);
 void mdiobus_unregister(struct mii_bus *bus);
 void mdiobus_free(struct mii_bus *bus);
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index 88e7c2f..dd0e270 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -154,7 +154,7 @@ dsa_switch_setup(struct dsa_switch_tree *dst, int index,
 	if (ret < 0)
 		goto out;
 
-	ds->slave_mii_bus = mdiobus_alloc();
+	ds->slave_mii_bus = mdiobus_alloc(0);
 	if (ds->slave_mii_bus == NULL) {
 		ret = -ENOMEM;
 		goto out;
-- 
1.7.3.4

^ permalink raw reply related

* Re: linux-next bad Kconfig for drivers/hid
From: Randy Dunlap @ 2011-12-15 17:43 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Jeremy Fitzhardinge, LinuxPPC-dev, Linux Kernel ML
In-Reply-To: <alpine.LNX.2.00.1112151107020.21970@pobox.suse.cz>

On 12/15/2011 02:08 AM, Jiri Kosina wrote:
> On Mon, 12 Dec 2011, Tony Breeds wrote:
> 
>> On Mon, Dec 12, 2011 at 12:21:16AM +0100, Jiri Kosina wrote:
>>> On Thu, 8 Dec 2011, Jeremy Fitzhardinge wrote:
>>>>
>>>> Hm.  How about making it "depends on HID && POWER_SUPPLY"?  I think that
>>>> would needlessly disable it if HID is also modular, but I'm not sure how
>>>> to fix that.  "depends on HID && POWER_SUPPLY && HID == POWER_SUPPLY"?
>>
>> That would work, but I think technically I think you could end up with
>> HID=m and POWER_SUPPLY=m which would still allow HID_BATTERY_STRENGTH=y
>> which is the same problem.
>>
>> I don't know what kind of .config contortions you'd need to do to get
>> there.
>>  
>>> How about making it 'default POWER_SUPPLY' instead?
>>
>> By itself that wont help as POWER_SUPPLY=m statisfies.
>>
>> So it looks like we have Jeremy's:
>> 	HID && POWER_SUPPLY && HID == POWER_SUPPLY
> 
> Tony,
> 
> have you actually tested this one to work in the configuration you have 
> been seeing it to fail?
> 
> I don't seem to be able to find any use of '==' in other Kconfig files 
> (and never used it myself), so I'd like to have confirmation that it 
> actually works and fixes the problem before I apply it :)

Documentation/kbuild/kconfig-language.txt does not list "==":

<expr> ::= <symbol>                             (1)
           <symbol> '=' <symbol>                (2)
           <symbol> '!=' <symbol>               (3)
           '(' <expr> ')'                       (4)
           '!' <expr>                           (5)
           <expr> '&&' <expr>                   (6)
           <expr> '||' <expr>                   (7)


-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply

* Re: Linux port availability for p5010 processor
From: Tabi Timur-B04825 @ 2011-12-15 14:30 UTC (permalink / raw)
  To: Vineeth; +Cc: Wood Scott-B07421, linuxppc-dev@ozlabs.org
In-Reply-To: <CAFbQSaA6yK7d+O0C6-BguKamRcBNnsU-yimO48cQV8G_evmJjw@mail.gmail.com>

On Thu, Dec 15, 2011 at 5:45 AM, Vineeth <vneethv@gmail.com> wrote:
>
> why is it a part of 85xx directory ? the core of P5020 is E5500 where the
> core of 85xx is e500;

e5500 is very similar to e500, so it's all part of the same family of cores=
.

--=20
Timur Tabi
Linux kernel developer at Freescale=

^ permalink raw reply

* [PATCH 5/5] KVM: PPC: Book3s HV: Implement H_CLEAR_REF and H_CLEAR_MOD hcalls
From: Paul Mackerras @ 2011-12-15 12:04 UTC (permalink / raw)
  To: Alexander Graf; +Cc: linuxppc-dev, kvm-ppc
In-Reply-To: <20111215120018.GA20629@bloggs.ozlabs.ibm.com>

This adds implementations for the H_CLEAR_REF (test and clear reference
bit) and H_CLEAR_MOD (test and clear changed bit) hypercalls.  These
hypercalls are not used by Linux guests at this stage, and these
implementations are only compile tested.

Signed-off-by: Paul Mackerras <paulus@samba.org>
---
 arch/powerpc/kvm/book3s_hv_rm_mmu.c     |   69 +++++++++++++++++++++++++++++++
 arch/powerpc/kvm/book3s_hv_rmhandlers.S |    4 +-
 2 files changed, 71 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kvm/book3s_hv_rm_mmu.c b/arch/powerpc/kvm/book3s_hv_rm_mmu.c
index 76864a8..718b5a7 100644
--- a/arch/powerpc/kvm/book3s_hv_rm_mmu.c
+++ b/arch/powerpc/kvm/book3s_hv_rm_mmu.c
@@ -624,6 +624,75 @@ long kvmppc_h_read(struct kvm_vcpu *vcpu, unsigned long flags,
 	return H_SUCCESS;
 }
 
+long kvmppc_h_clear_ref(struct kvm_vcpu *vcpu, unsigned long flags,
+			unsigned long pte_index)
+{
+	struct kvm *kvm = vcpu->kvm;
+	unsigned long *hpte, v, r, gr;
+	struct revmap_entry *rev;
+
+	if (pte_index >= HPT_NPTE)
+		return H_PARAMETER;
+
+	rev = real_vmalloc_addr(&kvm->arch.revmap[pte_index]);
+	hpte = (unsigned long *)(kvm->arch.hpt_virt + (pte_index << 4));
+	while (!try_lock_hpte(hpte, HPTE_V_HVLOCK))
+		cpu_relax();
+	v = hpte[0];
+	r = hpte[1];
+	gr = rev->guest_rpte;
+	rev->guest_rpte &= ~HPTE_R_R;
+	if (v & HPTE_V_VALID) {
+		gr |= r & (HPTE_R_R | HPTE_R_C);
+		if (r & HPTE_R_R)
+			kvmppc_clear_ref_hpte(kvm, hpte, pte_index);
+	}
+	unlock_hpte(hpte, v & ~HPTE_V_HVLOCK);
+
+	if (!(v & (HPTE_V_VALID | HPTE_V_ABSENT)))
+		return H_NOT_FOUND;
+
+	vcpu->arch.gpr[4] = gr;
+	return H_SUCCESS;
+}
+
+long kvmppc_h_clear_mod(struct kvm_vcpu *vcpu, unsigned long flags,
+			unsigned long pte_index)
+{
+	struct kvm *kvm = vcpu->kvm;
+	unsigned long *hpte, v, r, gr;
+	struct revmap_entry *rev;
+
+	if (pte_index >= HPT_NPTE)
+		return H_PARAMETER;
+
+	rev = real_vmalloc_addr(&kvm->arch.revmap[pte_index]);
+	hpte = (unsigned long *)(kvm->arch.hpt_virt + (pte_index << 4));
+	while (!try_lock_hpte(hpte, HPTE_V_HVLOCK))
+		cpu_relax();
+	v = hpte[0];
+	r = hpte[1];
+	gr = rev->guest_rpte;
+	rev->guest_rpte &= ~HPTE_R_C;
+	if (v & HPTE_V_VALID) {
+		gr |= r & (HPTE_R_R | HPTE_R_C);
+		if (r & HPTE_R_C) {
+			hpte[0] |= HPTE_V_ABSENT;
+			kvmppc_invalidate_hpte(kvm, hpte, pte_index);
+			hpte[1] &= ~HPTE_R_C;
+			eieio();
+			hpte[0] = v;
+		}
+	}
+	unlock_hpte(hpte, v & ~HPTE_V_HVLOCK);
+
+	if (!(v & (HPTE_V_VALID | HPTE_V_ABSENT)))
+		return H_NOT_FOUND;
+
+	vcpu->arch.gpr[4] = gr;
+	return H_SUCCESS;
+}
+
 void kvmppc_invalidate_hpte(struct kvm *kvm, unsigned long *hptep,
 			unsigned long pte_index)
 {
diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
index b70bf22..4c52d6d 100644
--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
@@ -1276,8 +1276,8 @@ hcall_real_table:
 	.long	.kvmppc_h_remove - hcall_real_table
 	.long	.kvmppc_h_enter - hcall_real_table
 	.long	.kvmppc_h_read - hcall_real_table
-	.long	0		/* 0x10 - H_CLEAR_MOD */
-	.long	0		/* 0x14 - H_CLEAR_REF */
+	.long	.kvmppc_h_clear_mod - hcall_real_table
+	.long	.kvmppc_h_clear_ref - hcall_real_table
 	.long	.kvmppc_h_protect - hcall_real_table
 	.long	0		/* 0x1c - H_GET_TCE */
 	.long	.kvmppc_h_put_tce - hcall_real_table
-- 
1.7.7.3

^ permalink raw reply related


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