* Re: [PATCH 23/33] net/ps3: gelic - Add missing annotations
From: Benjamin Herrenschmidt @ 2009-06-15 6:31 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linuxppc-dev, cbe-oss-dev
In-Reply-To: <1244644748-24211-24-git-send-email-Geert.Uytterhoeven@sonycom.com>
On Wed, 2009-06-10 at 16:38 +0200, Geert Uytterhoeven wrote:
> probe functions should be __devinit
>
> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> Cc: Geoff Levand <geoffrey.levand@am.sony.com>
Please send to netdev or get an ack from davem.
Cheers,
Ben.
> ---
> drivers/net/ps3_gelic_net.c | 22 ++++++++++++----------
> drivers/net/ps3_gelic_wireless.c | 6 +++---
> 2 files changed, 15 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c
> index 2b38f39..d1a5fb4 100644
> --- a/drivers/net/ps3_gelic_net.c
> +++ b/drivers/net/ps3_gelic_net.c
> @@ -214,9 +214,10 @@ static void gelic_card_free_chain(struct gelic_card *card,
> *
> * returns 0 on success, <0 on failure
> */
> -static int gelic_card_init_chain(struct gelic_card *card,
> - struct gelic_descr_chain *chain,
> - struct gelic_descr *start_descr, int no)
> +static int __devinit gelic_card_init_chain(struct gelic_card *card,
> + struct gelic_descr_chain *chain,
> + struct gelic_descr *start_descr,
> + int no)
> {
> int i;
> struct gelic_descr *descr;
> @@ -407,7 +408,7 @@ rewind:
> *
> * returns 0 on success, < 0 on failure
> */
> -static int gelic_card_alloc_rx_skbs(struct gelic_card *card)
> +static int __devinit gelic_card_alloc_rx_skbs(struct gelic_card *card)
> {
> struct gelic_descr_chain *chain;
> int ret;
> @@ -1422,8 +1423,8 @@ static const struct net_device_ops gelic_netdevice_ops = {
> *
> * fills out function pointers in the net_device structure
> */
> -static void gelic_ether_setup_netdev_ops(struct net_device *netdev,
> - struct napi_struct *napi)
> +static void __devinit gelic_ether_setup_netdev_ops(struct net_device *netdev,
> + struct napi_struct *napi)
> {
> netdev->watchdog_timeo = GELIC_NET_WATCHDOG_TIMEOUT;
> /* NAPI */
> @@ -1443,7 +1444,8 @@ static void gelic_ether_setup_netdev_ops(struct net_device *netdev,
> * gelic_ether_setup_netdev initializes the net_device structure
> * and register it.
> **/
> -int gelic_net_setup_netdev(struct net_device *netdev, struct gelic_card *card)
> +int __devinit gelic_net_setup_netdev(struct net_device *netdev,
> + struct gelic_card *card)
> {
> int status;
> u64 v1, v2;
> @@ -1491,7 +1493,7 @@ int gelic_net_setup_netdev(struct net_device *netdev, struct gelic_card *card)
> * the card and net_device structures are linked to each other
> */
> #define GELIC_ALIGN (32)
> -static struct gelic_card *gelic_alloc_card_net(struct net_device **netdev)
> +static struct gelic_card * __devinit gelic_alloc_card_net(struct net_device **netdev)
> {
> struct gelic_card *card;
> struct gelic_port *port;
> @@ -1542,7 +1544,7 @@ static struct gelic_card *gelic_alloc_card_net(struct net_device **netdev)
> return card;
> }
>
> -static void gelic_card_get_vlan_info(struct gelic_card *card)
> +static void __devinit gelic_card_get_vlan_info(struct gelic_card *card)
> {
> u64 v1, v2;
> int status;
> @@ -1616,7 +1618,7 @@ static void gelic_card_get_vlan_info(struct gelic_card *card)
> /**
> * ps3_gelic_driver_probe - add a device to the control of this driver
> */
> -static int ps3_gelic_driver_probe(struct ps3_system_bus_device *dev)
> +static int __devinit ps3_gelic_driver_probe(struct ps3_system_bus_device *dev)
> {
> struct gelic_card *card;
> struct net_device *netdev;
> diff --git a/drivers/net/ps3_gelic_wireless.c b/drivers/net/ps3_gelic_wireless.c
> index 4f3ada6..b6b3ca9 100644
> --- a/drivers/net/ps3_gelic_wireless.c
> +++ b/drivers/net/ps3_gelic_wireless.c
> @@ -2442,7 +2442,7 @@ static const struct iw_handler_def gelic_wl_wext_handler_def = {
> #endif
> };
>
> -static struct net_device *gelic_wl_alloc(struct gelic_card *card)
> +static struct net_device * __devinit gelic_wl_alloc(struct gelic_card *card)
> {
> struct net_device *netdev;
> struct gelic_port *port;
> @@ -2722,7 +2722,7 @@ static struct ethtool_ops gelic_wl_ethtool_ops = {
> .set_rx_csum = gelic_net_set_rx_csum,
> };
>
> -static void gelic_wl_setup_netdev_ops(struct net_device *netdev)
> +static void __devinit gelic_wl_setup_netdev_ops(struct net_device *netdev)
> {
> struct gelic_wl_info *wl;
> wl = port_wl(netdev_priv(netdev));
> @@ -2738,7 +2738,7 @@ static void gelic_wl_setup_netdev_ops(struct net_device *netdev)
> /*
> * driver probe/remove
> */
> -int gelic_wl_driver_probe(struct gelic_card *card)
> +int __devinit gelic_wl_driver_probe(struct gelic_card *card)
> {
> int ret;
> struct net_device *netdev;
^ permalink raw reply
* Re: [PATCH 26/33] sound/ps3: Fix checkpatch issues
From: Takashi Iwai @ 2009-06-15 6:07 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: Geert Uytterhoeven, linuxppc-dev, alsa-devel, cbe-oss-dev,
James Bottomley
In-Reply-To: <1245045063.19217.38.camel@pasglop>
At Mon, 15 Jun 2009 15:51:03 +1000,
Benjamin Herrenschmidt wrote:
>
> On Mon, 2009-06-15 at 07:43 +0200, Takashi Iwai wrote:
> > The alsa part also already reached to the upstream, so we have to give
> > revert patches if needed. But, in the case of sound bits, I think
> > they can remain there as they are independent changes.
> > But, if you think it's better to revert for the whole maintainability,
> > I'll revert in the next pull request that'll be sent soon later.
> >
> No, that's ok, I'll remove those from my pile.
OK, thanks!
Takashi
^ permalink raw reply
* Re: [PATCH 05/33] block: Add bio_list_peek()
From: Jens Axboe @ 2009-06-15 5:56 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Geert Uytterhoeven, linuxppc-dev, cbe-oss-dev
In-Reply-To: <1245029952.19217.4.camel@pasglop>
On Mon, Jun 15 2009, Benjamin Herrenschmidt wrote:
> On Wed, 2009-06-10 at 16:38 +0200, Geert Uytterhoeven wrote:
> > Introduce bio_list_peek(), to obtain a pointer to the first bio on the bio_list
> > without actually removing it from the list. This is needed when you want to
> > serialize based on the list being empty or not.
>
> Leaving that one (and the next one) out for now until Jens Ack them.
You can add my acked-by, this one is trivial and a good addition.
>
> Cheers,
> Ben.
>
> > Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> > Cc: Jens Axboe <axboe@kernel.dk>
> > ---
> > include/linux/bio.h | 5 +++++
> > 1 files changed, 5 insertions(+), 0 deletions(-)
> >
> > diff --git a/include/linux/bio.h b/include/linux/bio.h
> > index 7b214fd..618bb7d 100644
> > --- a/include/linux/bio.h
> > +++ b/include/linux/bio.h
> > @@ -590,6 +590,11 @@ static inline void bio_list_merge_head(struct bio_list *bl,
> > bl->head = bl2->head;
> > }
> >
> > +static inline struct bio *bio_list_peek(struct bio_list *bl)
> > +{
> > + return bl->head;
> > +}
> > +
> > static inline struct bio *bio_list_pop(struct bio_list *bl)
> > {
> > struct bio *bio = bl->head;
>
--
Jens Axboe
^ permalink raw reply
* Re: [PATCH 26/33] sound/ps3: Fix checkpatch issues
From: Benjamin Herrenschmidt @ 2009-06-15 5:51 UTC (permalink / raw)
To: Takashi Iwai
Cc: Geert Uytterhoeven, linuxppc-dev, alsa-devel, cbe-oss-dev,
James Bottomley
In-Reply-To: <s5hski2dpba.wl%tiwai@suse.de>
On Mon, 2009-06-15 at 07:43 +0200, Takashi Iwai wrote:
> The alsa part also already reached to the upstream, so we have to give
> revert patches if needed. But, in the case of sound bits, I think
> they can remain there as they are independent changes.
> But, if you think it's better to revert for the whole maintainability,
> I'll revert in the next pull request that'll be sent soon later.
>
No, that's ok, I'll remove those from my pile.
Cheers,
Ben.
^ permalink raw reply
* Re: [PATCH 26/33] sound/ps3: Fix checkpatch issues
From: Takashi Iwai @ 2009-06-15 5:43 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: Geert Uytterhoeven, linuxppc-dev, alsa-devel, cbe-oss-dev,
James Bottomley
In-Reply-To: <1245032528.19217.20.camel@pasglop>
At Mon, 15 Jun 2009 12:22:08 +1000,
Benjamin Herrenschmidt wrote:
>
> On Wed, 2009-06-10 at 16:55 +0200, Takashi Iwai wrote:
> > At Wed, 10 Jun 2009 16:39:01 +0200,
> > Geert Uytterhoeven wrote:
> > >
> > > Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> > > Cc: alsa-devel@alsa-project.org
> > > Cc: Takashi Iwai <tiwai@suse.de>
> >
> > Thanks, applied these three patches (26,27,28) to sound git tree.
>
> Are you sure they don't depend on the previous patches ? We're already
> having fallover from the SCSI tree merging some of them while I haven't
> merge the previous ones yet...
These three patches are just trivial changes: coding-style fixes,
shuffle of function lines, and addition of __devinit/__devexit
notations. So they should be fairly safe and independent (thus I
applied them). At least, the test cross-build was OK.
> Geert, there are several "procedural" issues with your series here: In
> addition to the whole thing being submitted too late that is :-)
>
> You don't have the same CC list on all patches. That is fine except that
> you also don't provide merge instructions after the signature, such as
> "this patch depends on XX from this series" etc...
>
> A bunch of them do have such dependencies. In fact, there's even a patch
> that changes something in the block layer (it's not a big deal, just
> adding an accessor, but I still -need- an Ack from Jens to merge it) and
> so I have to block all patches that depend on this one. But then, we
> have indirect dependencies where some patch don't apply because they
> touch the same file that was patched by the patch who had the dependency
> etc...
>
> I ended up stopping mid-way through the series. I'll push some of the
> patches to my -next branch tonight, and the rest once I get the Ack from
> Jens.
>
> I recommend all maintainers (scsi, alsa) just drop these patches for now
> and instead give me Ack's so I can merge them via the powerpc tree along
> with their respective dependencies. James, feel free to do a revert if
> you don't want to rebase, that will break bisect on ps3 for a little
> while, but that's the price Geert will have to pay for his mistakes :-)
The alsa part also already reached to the upstream, so we have to give
revert patches if needed. But, in the case of sound bits, I think
they can remain there as they are independent changes.
But, if you think it's better to revert for the whole maintainability,
I'll revert in the next pull request that'll be sent soon later.
thanks,
Takashi
^ permalink raw reply
* Re: [PATCH 1/2] lib: Provide generic atomic64_t implementation
From: Paul Mackerras @ 2009-06-15 4:30 UTC (permalink / raw)
To: Roland Dreier
Cc: linux-kernel, linuxppc-dev, Avi Kivity, akpm, Linus Torvalds
In-Reply-To: <ada4ouixlk2.fsf@cisco.com>
Roland Dreier writes:
> FWIW, Nehalem EX actually goes to 8 cores/16 threads per socket. But
> worrying about 32-bit performance on Nehalem is a little silly -- this
> simplest solution is simply to run a 64-bit kernel.
I'm not worried about ANY x86 processor, 32-bit or 64-bit, in fact,
since x86 already has an atomic64_t implementation for both 32-bit and
64-bit.
It is interesting, though, that arch/x86/include/asm/atomic_32.h
unconditionally uses cmpxchg8b to implement atomic64_t, but I thought
that cmpxchg8b didn't exist in processors prior to the Pentium.
Presumably you can't use perf_counters on a 386 or 486.
Paul.
^ permalink raw reply
* Re: [PATCH 1/2] lib: Provide generic atomic64_t implementation
From: Roland Dreier @ 2009-06-15 2:44 UTC (permalink / raw)
To: Avi Kivity
Cc: linux-kernel, linuxppc-dev, Paul Mackerras, akpm, Linus Torvalds
In-Reply-To: <4A34F564.2010500@redhat.com>
> The new Nehalems provide 8 logical threads in a single socket. All
> those threads share a cache, and they have cmpxchg8b anyway, so this
> won't matter.
FWIW, Nehalem EX actually goes to 8 cores/16 threads per socket. But
worrying about 32-bit performance on Nehalem is a little silly -- this
simplest solution is simply to run a 64-bit kernel.
- R.
^ permalink raw reply
* Re: [PATCH v4] 83xx: add support for the kmeter1 board.
From: David Gibson @ 2009-06-15 2:42 UTC (permalink / raw)
To: Heiko Schocher; +Cc: Scott Wood, linuxppc-dev
In-Reply-To: <4A31E74E.6090505@denx.de>
On Fri, Jun 12, 2009 at 07:27:42AM +0200, Heiko Schocher wrote:
> Hello David,
>
> David Gibson wrote:
> > On Thu, Jun 11, 2009 at 08:10:41PM +0200, Heiko Schocher wrote:
> >> The following series implements basic board support for
> >> the kmeter1 board from keymile, based on a MPC8360.
> >
> > [snip]
> >> + par_io@1400 {
> >> + reg = <0x1400 0x100>;
> >> + device_type = "par_io";
> >
> > This should have a compatible value instead of a device_type value.
>
> compatible = "fsl,mpc8360-par_io"; ?
Sounds reasonable, if there isn't an existing precedent to follow.
> > [snip]
> >
> >> + num-ports = <7>;
> >> +
> >> + pio_ucc1: ucc_pin@00 {
> >
> > Since these nodes have addresses, they should also have reg
> > properties. And the parent should have #address-cells and
> > #size-cells.
>
> added "#address-cells" and "#size-cells", but couldn;t find what
> I should write in a "reg" entry ... I think something like that:
>
> reg = <0x00 0x01>;
If you just want a plain index number, which is what it seems you have
here, then you'll want #address-cells = 1, #size-cells = 0 and reg
will then have one cell (i.e. 1 u32) with the index number
so subnode@0 {
reg = <0>;
}
subnode@1 {
reg = <1>;
}
Note also that it's usual for the unit addresses (that's the bits
after the @ sign) to be formatted without leading zeroes.
>
> ?
>
> > [snip]
> >> + qe@100000 {
> >> + #address-cells = <1>;
> >> + #size-cells = <1>;
> >> + device_type = "qe";
> >
> > This device_type should not be here.
>
> deleted.
Ok.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH 26/33] sound/ps3: Fix checkpatch issues
From: Benjamin Herrenschmidt @ 2009-06-15 2:22 UTC (permalink / raw)
To: Takashi Iwai
Cc: Geert Uytterhoeven, linuxppc-dev, alsa-devel, cbe-oss-dev,
James Bottomley
In-Reply-To: <s5hk53kf89j.wl%tiwai@suse.de>
On Wed, 2009-06-10 at 16:55 +0200, Takashi Iwai wrote:
> At Wed, 10 Jun 2009 16:39:01 +0200,
> Geert Uytterhoeven wrote:
> >
> > Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> > Cc: alsa-devel@alsa-project.org
> > Cc: Takashi Iwai <tiwai@suse.de>
>
> Thanks, applied these three patches (26,27,28) to sound git tree.
Are you sure they don't depend on the previous patches ? We're already
having fallover from the SCSI tree merging some of them while I haven't
merge the previous ones yet...
Geert, there are several "procedural" issues with your series here: In
addition to the whole thing being submitted too late that is :-)
You don't have the same CC list on all patches. That is fine except that
you also don't provide merge instructions after the signature, such as
"this patch depends on XX from this series" etc...
A bunch of them do have such dependencies. In fact, there's even a patch
that changes something in the block layer (it's not a big deal, just
adding an accessor, but I still -need- an Ack from Jens to merge it) and
so I have to block all patches that depend on this one. But then, we
have indirect dependencies where some patch don't apply because they
touch the same file that was patched by the patch who had the dependency
etc...
I ended up stopping mid-way through the series. I'll push some of the
patches to my -next branch tonight, and the rest once I get the Ack from
Jens.
I recommend all maintainers (scsi, alsa) just drop these patches for now
and instead give me Ack's so I can merge them via the powerpc tree along
with their respective dependencies. James, feel free to do a revert if
you don't want to rebase, that will break bisect on ps3 for a little
while, but that's the price Geert will have to pay for his mistakes :-)
Cheers,
Ben.
> Takashi
>
> > ---
> > sound/ppc/snd_ps3.c | 32 +++++++++++++++-----------------
> > 1 files changed, 15 insertions(+), 17 deletions(-)
> >
> > diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c
> > index f361c26..d660b0f 100644
> > --- a/sound/ppc/snd_ps3.c
> > +++ b/sound/ppc/snd_ps3.c
> > @@ -165,8 +165,7 @@ static const struct snd_pcm_hardware snd_ps3_pcm_hw = {
> > .fifo_size = PS3_AUDIO_FIFO_SIZE
> > };
> >
> > -static struct snd_pcm_ops snd_ps3_pcm_spdif_ops =
> > -{
> > +static struct snd_pcm_ops snd_ps3_pcm_spdif_ops = {
> > .open = snd_ps3_pcm_open,
> > .close = snd_ps3_pcm_close,
> > .prepare = snd_ps3_pcm_prepare,
> > @@ -183,7 +182,7 @@ static int snd_ps3_verify_dma_stop(struct snd_ps3_card_info *card,
> > int dma_ch, done, retries, stop_forced = 0;
> > uint32_t status;
> >
> > - for (dma_ch = 0; dma_ch < 8; dma_ch ++) {
> > + for (dma_ch = 0; dma_ch < 8; dma_ch++) {
> > retries = count;
> > do {
> > status = read_reg(PS3_AUDIO_KICK(dma_ch)) &
> > @@ -259,9 +258,7 @@ static void snd_ps3_kick_dma(struct snd_ps3_card_info *card)
> > /*
> > * convert virtual addr to ioif bus addr.
> > */
> > -static dma_addr_t v_to_bus(struct snd_ps3_card_info *card,
> > - void * paddr,
> > - int ch)
> > +static dma_addr_t v_to_bus(struct snd_ps3_card_info *card, void *paddr, int ch)
> > {
> > return card->dma_start_bus_addr[ch] +
> > (paddr - card->dma_start_vaddr[ch]);
> > @@ -321,7 +318,7 @@ static int snd_ps3_program_dma(struct snd_ps3_card_info *card,
> > spin_lock_irqsave(&card->dma_lock, irqsave);
> > for (ch = 0; ch < 2; ch++) {
> > start_vaddr = card->dma_next_transfer_vaddr[0];
> > - for (stage = 0; stage < fill_stages; stage ++) {
> > + for (stage = 0; stage < fill_stages; stage++) {
> > dma_ch = stage * 2 + ch;
> > if (silent)
> > dma_addr = card->null_buffer_start_dma_addr;
> > @@ -619,7 +616,7 @@ static int snd_ps3_change_avsetting(struct snd_ps3_card_info *card)
> > PS3_AUDIO_AO_3WMCTRL_ASOEN(2) |
> > PS3_AUDIO_AO_3WMCTRL_ASOEN(3)),
> > 0);
> > - wmb(); /* ensure the hardware sees the change */
> > + wmb(); /* ensure the hardware sees the change */
> > /* wait for actually stopped */
> > retries = 1000;
> > while ((read_reg(PS3_AUDIO_AO_3WMCTRL) &
> > @@ -798,20 +795,20 @@ static struct snd_kcontrol_new spdif_ctls[] = {
> > {
> > .access = SNDRV_CTL_ELEM_ACCESS_READ,
> > .iface = SNDRV_CTL_ELEM_IFACE_PCM,
> > - .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK),
> > + .name = SNDRV_CTL_NAME_IEC958("", PLAYBACK, CON_MASK),
> > .info = snd_ps3_spdif_mask_info,
> > .get = snd_ps3_spdif_cmask_get,
> > },
> > {
> > .access = SNDRV_CTL_ELEM_ACCESS_READ,
> > .iface = SNDRV_CTL_ELEM_IFACE_PCM,
> > - .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,PRO_MASK),
> > + .name = SNDRV_CTL_NAME_IEC958("", PLAYBACK, PRO_MASK),
> > .info = snd_ps3_spdif_mask_info,
> > .get = snd_ps3_spdif_pmask_get,
> > },
> > {
> > .iface = SNDRV_CTL_ELEM_IFACE_PCM,
> > - .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
> > + .name = SNDRV_CTL_NAME_IEC958("", PLAYBACK, DEFAULT),
> > .info = snd_ps3_spdif_mask_info,
> > .get = snd_ps3_spdif_default_get,
> > .put = snd_ps3_spdif_default_put,
> > @@ -1020,11 +1017,12 @@ static int __init snd_ps3_driver_probe(struct ps3_system_bus_device *dev)
> > * its size should be lager than PS3_AUDIO_FIFO_STAGE_SIZE * 2
> > * PAGE_SIZE is enogh
> > */
> > - if (!(the_card.null_buffer_start_vaddr =
> > - dma_alloc_coherent(&the_card.ps3_dev->core,
> > - PAGE_SIZE,
> > - &the_card.null_buffer_start_dma_addr,
> > - GFP_KERNEL))) {
> > + the_card.null_buffer_start_vaddr =
> > + dma_alloc_coherent(&the_card.ps3_dev->core,
> > + PAGE_SIZE,
> > + &the_card.null_buffer_start_dma_addr,
> > + GFP_KERNEL);
> > + if (!the_card.null_buffer_start_vaddr) {
> > pr_info("%s: nullbuffer alloc failed\n", __func__);
> > goto clean_preallocate;
> > }
> > @@ -1148,7 +1146,7 @@ static irqreturn_t snd_ps3_interrupt(int irq, void *dev_id)
> > SND_PS3_DMA_FILLTYPE_SILENT_FIRSTFILL :
> > SND_PS3_DMA_FILLTYPE_SILENT_RUNNING);
> > snd_ps3_kick_dma(card);
> > - card->silent --;
> > + card->silent--;
> > } else {
> > snd_ps3_program_dma(card,
> > (underflow_occured) ?
> > --
> > 1.6.2.4
> >
^ permalink raw reply
* [PATCH] powerpc: Add memory clobber to mtspr()
From: Benjamin Herrenschmidt @ 2009-06-15 2:16 UTC (permalink / raw)
To: linuxppc-dev
Without this clobber, mtspr can be re-ordered by gcc vs. surrounding
memory accesses. While this might be ok for some cases, it's not in
others and I'm not confident that all callers get it right (In fact
I'm sure some of them don't).
So for now, let's make mtspr() itself contain a memory clobber until
we can audit and fix everything, at which point we can remove it
if we think it's worth doing so.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
arch/powerpc/include/asm/reg.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- linux-work.orig/arch/powerpc/include/asm/reg.h 2009-06-15 12:01:06.000000000 +1000
+++ linux-work/arch/powerpc/include/asm/reg.h 2009-06-15 12:01:17.000000000 +1000
@@ -755,7 +755,8 @@
#define mfspr(rn) ({unsigned long rval; \
asm volatile("mfspr %0," __stringify(rn) \
: "=r" (rval)); rval;})
-#define mtspr(rn, v) asm volatile("mtspr " __stringify(rn) ",%0" : : "r" (v))
+#define mtspr(rn, v) asm volatile("mtspr " __stringify(rn) ",%0" : : "r" (v)\
+ : "memory")
#ifdef __powerpc64__
#ifdef CONFIG_PPC_CELL
^ permalink raw reply
* [git pull] Please pull powerpc.git merge branch
From: Benjamin Herrenschmidt @ 2009-06-15 2:08 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linuxppc-dev list, Andrew Morton, Linux Kernel list
Hi Linus !
Here's the first half of the powerpc merge for 2.6.31. I'll have the
rest in a couple of days, just dealing with some of my own backlog here
plus some collisions.
The few things outside of arch/powerpc are powerpc-specific drivers (and
an addition to pci_ids.h). There's also a cleanup of
drivers/pci/Makefile removing another unused ppc specific bit.
No major highlight this time around. Lots of minor fixes, tweaks and
cleanups, swiotlb is now available on some crazy embedded platforms (not
something to be -that- happy about), some new embedded boards, ...
There's a rather big ps3 update queued up for the next batch, but it
didn't make it here. Pauls atomic64_t for 32-bit platforms is in the
next batch too. Hopefully I'll have it ready for you in a day or two (I
want to let it simmer in -next for a couple of days).
Cheers,
Ben.
The following changes since commit 45e3e1935e2857c54783291107d33323b3ef33c8:
Linus Torvalds (1):
Merge branch 'master' of git://git.kernel.org/.../sam/kbuild-next
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git next
Anton Blanchard (2):
powerpc: Improve decrementer accuracy
powerpc: Convert RTAS event scan from kernel thread to workqueue
Anton Vorontsov (6):
powerpc/85xx: Add PCI IDs for MPC8569 family processors
powerpc/85xx: Fix mpc8569emds crypto node to include SNOW unit
powerpc/85xx: Fix reg & interrupts for mpc8569emds localbus added NAND
powerpc/85xx: Add eSDHC support for MPC8569E-MDS boards
powerpc/85xx: Enable Serial RapidIO for MPC85xx MDS boards
powerpc/85xx: Add STMicro M25P40 serial flash support for MPC8569E-MDS
Becky Bruce (4):
powerpc/86xx: Add 36-bit device tree for mpc8641hpcn
powerpc: make dma_window_* in pci_controller struct avail on 32b
powerpc: Use sg->dma_length in sg_dma_len() macro on 32-bit
powerpc: Add support for swiotlb on 32-bit
Benjamin Herrenschmidt (12):
Merge branch 'merge' into next
powerpc/mm: Fix some SMP issues with MMU context handling
powerpc/mm: Fix a AB->BA deadlock scenario with nohash MMU context lock
powerpc: Set init_bootmem_done on NUMA platforms as well
powerpc: Move VMX and VSX asm code to vector.S
powerpc: Introduce CONFIG_PPC_BOOK3S
powerpc: Split exception handling out of head_64.S
powerpc: Separate PACA fields for server CPUs
powerpc: Shield code specific to 64-bit server processors
Merge commit 'jwb/next' into next
powerpc: Fix bug in move of altivec code to vector.S
Merge commit 'origin/master' into next
Geert Uytterhoeven (1):
powerpc: Keep track of emulated instructions
Geoff Levand (1):
powerpc/ps3: Use smp_request_message_ipi
Grant Likely (1):
powerpc/virtex: refactor intc driver and add support for i8259 cascading
Haiying Wang (7):
powerpc/85xx: clean up for mpc8568_mds name
powerpc/qe: update risc allocation for QE
net/ucc_geth: update riscTx and riscRx in ucc_geth
powerpc/qe: update QE Serial Number
net/ucc_geth: Assign six threads to Rx for UEC
powerpc/85xx: Add MPC8569MDS board support
powerpc/qe: add new qe properties for QE based chips
Jan Blunck (1):
powerpc/spufs: Remove double check for non-negative dentry
John Linn (1):
fbdev: Add PLB support and cleanup DCR in xilinxfb driver.
Josh Boyer (3):
powerpc/4xx: Disable PCI_LEGACY
powerpc/40x: Convert AMCC Makalu board to ppc40x_simple
powerpc/40x: Convert AMCC Kilauea/Halekala boards to ppc40x_simple
Kumar Gala (32):
powerpc/fsl: Remove cell-index from PCI nodes
powerpc: Refactor board check for PCI quirks on FSL boards with uli1575
powerpc/fsl: use of_iomap() for rstcr mapping
powerpc/85xx: Add binding for LAWs and ECM
powerpc/85xx: Add new LAW & ECM device tree nodes for all 85xx systems
powerpc/86xx: Add binding for LAWs and MCM
powerpc/86xx: Add new LAW & MCM device tree nodes for all 86xx systems
powerpc/cpm: Remove some cruft code and defines
powerpc/86xx: clean up smp init code
powerpc/fsl: Removed reg property from 85xx/86xx soc node
fsldma: Fix compile warnings
powerpc/85xx: Add MSI nodes for MPC8568/9 MDS systems
powerpc/fsl: Support unique MSI addresses per PCIe Root Complex
powerpc/8xxx: Update PCI outbound window addresses for 36-bit configs
powerpc/fsl_rio: Fix compile warnings
powerpc/fsl: Update FSL esdhc binding
powerpc/85xx: Add P2020DS board support
powerpc/fsl: Setup PCI inbound window based on actual amount of memory
powerpc: Fix up elf_read_implies_exec() usage
powerpc/pci: Clean up direct access to sysdata by indirect ops
powerpc/pci: Clean up direct access to sysdata by FSL platforms
powerpc/pci: Clean up direct access to sysdata by 52xx platforms
powerpc/pci: Clean up direct access to sysdata by 4xx platforms
powerpc/pci: Clean up direct access to sysdata by CHRP platforms
powerpc/pci: Clean up direct access to sysdata on tsi108 platforms
powerpc/pci: Clean up direct access to sysdata by powermac platforms
powerpc/pci: Clean up direct access to sysdata by RTAS
powerpc/pci: Clean up direct access to sysdata by celleb platforms
powerpc/pci: Move pseries code into pseries platform specific area
powerpc/pci: Cleanup some minor cruft
powerpc/pci: Remove redundant pcnet32 fixup
powerpc/pci: clean up direct access to sysdata by iseries platform
Li Yang (2):
powerpc/fsl_rio: use LAW address from device tree
rapidio: fix section mismatch warnings
Michael Ellerman (10):
powerpc/oprofile: Remove unused dump_pmcs() in FSL oprofile
powerpc/irq: Move #ifdef'ed body of do_IRQ() into a separate function
powerpc/irq: Move stack overflow check into a separate function
powerpc/irq: Move get_irq() comment into header
powerpc/irq: Remove fallback to __do_IRQ()
powerpc/powermac: Use generic_handle_irq() in gatwick_action()
powerpc/irq: We don't need __do_IRQ() anymore
powerpc/ftrace: Use ppc_function_entry() instead of GET_ADDR
powerpc/ftrace: Remove unused macros
powerpc/ftrace: Use PPC_INST_NOP directly
Michael Neuling (3):
powerpc: Cleanup macros in ppc-opcode.h
powerpc: Move VSX load/stores into ppc-opcode.h
powerpc: Make the NR_CPUS max 8192
Michel Dänzer (1):
therm_adt746x: Always clear hardware bit which inverts fan speed range.
Milton Miller (2):
powerpc: Enable MMU feature sections for inline asm
powerpc: Add 2.06 tlbie mnemonics
Nathan Fontenot (1):
powerpc: Display processor virtualization resource allocs in lparcfg
Robert Jennings (1):
powerpc/pseries: CMO unused page hinting
Roderick Colenbrander (3):
powerpc/virtex: Add support for Xilinx PCI host bridge
powerpc/virtex: Add Xilinx ML510 reference design support
powerpc/virtex: Add ml510 reference design device tree
Roland McGrath (1):
powerpc: Add PTRACE_SINGLEBLOCK support
Sean MacLennan (2):
powerpc: Update Warp to use leds-gpio driver
i2c: Fix confusing i2c-ibm_iic message
Stefan Roese (1):
powerpc/4xx: Sequoia: Enable NAND support
Stephen Rothwell (5):
powerpc/pci: Fix annotation of pcibios_claim_one_bus
powerpc/pseries: Fix warnings when printing resource_size_t
powerpc/xmon: Remove unused variable in xmon.c
powerpc: Fix warning when printing a resource_size_t
powerpc/spufs: Remove unused error path
Tony Breeds (1):
powerpc/mpic: Cleanup mpic_find() implementation
Vinay Sridhar (1):
powerpc/xmon: Add dl command to dump contents of __log_buf
roel kluin (1):
tape: beyond ARRAY_SIZE of viocd_diskinfo
Documentation/kernel-parameters.txt | 7 +
Documentation/powerpc/dts-bindings/ecm.txt | 64 ++
.../powerpc/dts-bindings/fsl/cpm_qe/qe.txt | 3 +
Documentation/powerpc/dts-bindings/fsl/esdhc.txt | 5 +-
Documentation/powerpc/dts-bindings/fsl/mcm.txt | 64 ++
arch/powerpc/Kconfig | 16 +-
arch/powerpc/Kconfig.debug | 13 +
arch/powerpc/Makefile | 1 +
arch/powerpc/boot/dts/gef_ppc9a.dts | 14 +-
arch/powerpc/boot/dts/gef_sbc310.dts | 14 +-
arch/powerpc/boot/dts/gef_sbc610.dts | 14 +-
arch/powerpc/boot/dts/ksi8560.dts | 13 +
arch/powerpc/boot/dts/mpc832x_mds.dts | 3 +-
arch/powerpc/boot/dts/mpc832x_rdb.dts | 3 +-
arch/powerpc/boot/dts/mpc8349emitx.dts | 2 -
arch/powerpc/boot/dts/mpc8349emitxgp.dts | 1 -
arch/powerpc/boot/dts/mpc834x_mds.dts | 2 -
arch/powerpc/boot/dts/mpc836x_mds.dts | 3 +-
arch/powerpc/boot/dts/mpc836x_rdk.dts | 2 +
arch/powerpc/boot/dts/mpc8377_mds.dts | 1 -
arch/powerpc/boot/dts/mpc8378_mds.dts | 1 -
arch/powerpc/boot/dts/mpc8379_mds.dts | 1 -
arch/powerpc/boot/dts/mpc8536ds.dts | 18 +-
arch/powerpc/boot/dts/mpc8540ads.dts | 15 +-
arch/powerpc/boot/dts/mpc8541cds.dts | 16 +-
arch/powerpc/boot/dts/mpc8544ds.dts | 18 +-
arch/powerpc/boot/dts/mpc8548cds.dts | 17 +-
arch/powerpc/boot/dts/mpc8555cds.dts | 16 +-
arch/powerpc/boot/dts/mpc8560ads.dts | 15 +-
arch/powerpc/boot/dts/mpc8568mds.dts | 51 +-
arch/powerpc/boot/dts/mpc8569mds.dts | 583 +++++++++++
arch/powerpc/boot/dts/mpc8572ds.dts | 17 +-
arch/powerpc/boot/dts/mpc8572ds_36b.dts | 39 +-
arch/powerpc/boot/dts/mpc8572ds_camp_core0.dts | 16 +-
arch/powerpc/boot/dts/mpc8572ds_camp_core1.dts | 2 -
arch/powerpc/boot/dts/mpc8610_hpcd.dts | 16 +-
arch/powerpc/boot/dts/mpc8641_hpcn.dts | 16 +-
arch/powerpc/boot/dts/mpc8641_hpcn_36b.dts | 609 +++++++++++
arch/powerpc/boot/dts/p2020ds.dts | 704 +++++++++++++
arch/powerpc/boot/dts/sbc8349.dts | 1 -
arch/powerpc/boot/dts/sbc8548.dts | 16 +-
arch/powerpc/boot/dts/sbc8560.dts | 15 +-
arch/powerpc/boot/dts/sbc8641d.dts | 16 +-
arch/powerpc/boot/dts/sequoia.dts | 22 +
arch/powerpc/boot/dts/socrates.dts | 15 +-
arch/powerpc/boot/dts/stx_gp3_8560.dts | 15 +-
arch/powerpc/boot/dts/tqm8540.dts | 15 +-
arch/powerpc/boot/dts/tqm8541.dts | 15 +-
arch/powerpc/boot/dts/tqm8548-bigflash.dts | 16 +-
arch/powerpc/boot/dts/tqm8548.dts | 16 +-
arch/powerpc/boot/dts/tqm8555.dts | 15 +-
arch/powerpc/boot/dts/tqm8560.dts | 15 +-
arch/powerpc/boot/dts/virtex440-ml510.dts | 465 +++++++++
arch/powerpc/boot/dts/warp.dts | 27 +-
arch/powerpc/configs/40x/acadia_defconfig | 2 +-
arch/powerpc/configs/40x/ep405_defconfig | 2 +-
arch/powerpc/configs/40x/kilauea_defconfig | 81 ++-
arch/powerpc/configs/40x/makalu_defconfig | 81 ++-
arch/powerpc/configs/40x/virtex_defconfig | 2 +-
arch/powerpc/configs/44x/arches_defconfig | 2 +-
arch/powerpc/configs/44x/bamboo_defconfig | 2 +-
arch/powerpc/configs/44x/canyonlands_defconfig | 6 +-
arch/powerpc/configs/44x/ebony_defconfig | 2 +-
arch/powerpc/configs/44x/katmai_defconfig | 2 +-
arch/powerpc/configs/44x/rainier_defconfig | 2 +-
arch/powerpc/configs/44x/redwood_defconfig | 2 +-
arch/powerpc/configs/44x/sam440ep_defconfig | 2 +-
arch/powerpc/configs/44x/sequoia_defconfig | 111 ++-
arch/powerpc/configs/44x/taishan_defconfig | 2 +-
arch/powerpc/configs/44x/virtex5_defconfig | 2 +-
arch/powerpc/include/asm/cpm2.h | 4 -
arch/powerpc/include/asm/dma-mapping.h | 11 +
arch/powerpc/include/asm/elf.h | 4 +-
arch/powerpc/include/asm/emulated_ops.h | 73 ++
arch/powerpc/include/asm/feature-fixups.h | 25 +-
arch/powerpc/include/asm/lppaca.h | 6 +
arch/powerpc/include/asm/machdep.h | 4 +
arch/powerpc/include/asm/mmu.h | 9 +-
arch/powerpc/include/asm/mpc86xx.h | 33 -
arch/powerpc/include/asm/paca.h | 12 +-
arch/powerpc/include/asm/page.h | 5 +
arch/powerpc/include/asm/pci-bridge.h | 13 +-
arch/powerpc/include/asm/pgtable-ppc64.h | 5 +
arch/powerpc/include/asm/ppc-opcode.h | 25 +-
arch/powerpc/include/asm/ppc_asm.h | 10 -
arch/powerpc/include/asm/ptrace.h | 4 +
arch/powerpc/include/asm/qe.h | 21 +-
arch/powerpc/include/asm/scatterlist.h | 6 +-
arch/powerpc/include/asm/swiotlb.h | 27 +
arch/powerpc/include/asm/system.h | 2 +-
arch/powerpc/include/asm/xilinx_pci.h | 21 +
arch/powerpc/kernel/Makefile | 4 +-
arch/powerpc/kernel/align.c | 20 +-
arch/powerpc/kernel/asm-offsets.c | 32 +-
arch/powerpc/kernel/cputable.c | 6 +-
arch/powerpc/kernel/dma-swiotlb.c | 163 +++
arch/powerpc/kernel/dma.c | 2 +-
arch/powerpc/kernel/exceptions-64s.S | 978 +++++++++++++++++
arch/powerpc/kernel/ftrace.c | 29 +-
arch/powerpc/kernel/head_32.S | 101 +--
arch/powerpc/kernel/head_64.S | 1095 +-------------------
arch/powerpc/kernel/head_booke.h | 10 +-
arch/powerpc/kernel/irq.c | 127 ++--
arch/powerpc/kernel/lparcfg.c | 40 +-
arch/powerpc/kernel/misc_64.S | 92 --
arch/powerpc/kernel/paca.c | 14 +-
arch/powerpc/kernel/pci-common.c | 3 +-
arch/powerpc/kernel/pci_32.c | 19 -
arch/powerpc/kernel/pci_64.c | 17 +-
arch/powerpc/kernel/pci_dn.c | 28 +-
arch/powerpc/kernel/process.c | 2 +-
arch/powerpc/kernel/prom.c | 2 +-
arch/powerpc/kernel/ptrace.c | 23 +-
arch/powerpc/kernel/rtas_pci.c | 10 +-
arch/powerpc/kernel/setup_32.c | 6 +
arch/powerpc/kernel/setup_64.c | 11 +-
arch/powerpc/kernel/time.c | 21 +-
arch/powerpc/kernel/traps.c | 130 +++-
arch/powerpc/kernel/vector.S | 210 ++++
arch/powerpc/mm/Makefile | 7 +-
arch/powerpc/mm/hash_native_64.c | 13 +-
arch/powerpc/mm/init_64.c | 2 +
arch/powerpc/mm/mmu_context_nohash.c | 19 +-
arch/powerpc/mm/numa.c | 2 +
arch/powerpc/oprofile/op_model_fsl_emb.c | 14 -
arch/powerpc/platforms/40x/Kconfig | 2 +
arch/powerpc/platforms/40x/Makefile | 2 -
arch/powerpc/platforms/40x/kilauea.c | 60 --
arch/powerpc/platforms/40x/makalu.c | 60 --
arch/powerpc/platforms/40x/ppc40x_simple.c | 5 +-
arch/powerpc/platforms/40x/virtex.c | 2 +
arch/powerpc/platforms/44x/Kconfig | 13 +-
arch/powerpc/platforms/44x/Makefile | 1 +
arch/powerpc/platforms/44x/virtex.c | 2 +
arch/powerpc/platforms/44x/virtex_ml510.c | 29 +
arch/powerpc/platforms/44x/warp.c | 76 +-
arch/powerpc/platforms/52xx/efika.c | 4 +-
arch/powerpc/platforms/52xx/mpc52xx_pci.c | 4 +-
arch/powerpc/platforms/82xx/pq2ads.h | 13 -
arch/powerpc/platforms/85xx/Kconfig | 1 +
arch/powerpc/platforms/85xx/mpc85xx_ds.c | 43 +-
arch/powerpc/platforms/85xx/mpc85xx_mds.c | 52 +-
arch/powerpc/platforms/86xx/gef_ppc9a.c | 1 -
arch/powerpc/platforms/86xx/gef_sbc310.c | 1 -
arch/powerpc/platforms/86xx/gef_sbc610.c | 1 -
arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 1 -
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 1 -
arch/powerpc/platforms/86xx/mpc86xx_smp.c | 8 +-
arch/powerpc/platforms/86xx/sbc8641d.c | 1 -
arch/powerpc/platforms/8xx/mpc885ads.h | 4 -
arch/powerpc/platforms/Kconfig | 4 +
arch/powerpc/platforms/Kconfig.cputype | 26 +-
arch/powerpc/platforms/cell/celleb_pci.c | 10 +-
arch/powerpc/platforms/cell/celleb_scc_epci.c | 13 +-
arch/powerpc/platforms/cell/celleb_scc_pciex.c | 12 +-
arch/powerpc/platforms/cell/spufs/inode.c | 6 -
arch/powerpc/platforms/chrp/pci.c | 8 +-
arch/powerpc/platforms/fsl_uli1575.c | 24 +-
arch/powerpc/platforms/iseries/iommu.c | 2 +-
arch/powerpc/platforms/iseries/pci.c | 8 +-
arch/powerpc/platforms/powermac/pic.c | 2 +-
arch/powerpc/platforms/powermac/setup.c | 2 +-
arch/powerpc/platforms/ps3/smp.c | 16 +-
arch/powerpc/platforms/pseries/iommu.c | 4 +-
arch/powerpc/platforms/pseries/lpar.c | 52 +
arch/powerpc/platforms/pseries/rtasd.c | 76 +-
arch/powerpc/platforms/pseries/setup.c | 25 +
arch/powerpc/sysdev/Makefile | 1 +
arch/powerpc/sysdev/cpm2.c | 2 +-
arch/powerpc/sysdev/fsl_msi.c | 9 +-
arch/powerpc/sysdev/fsl_pci.c | 138 +++-
arch/powerpc/sysdev/fsl_pci.h | 6 +-
arch/powerpc/sysdev/fsl_rio.c | 15 +-
arch/powerpc/sysdev/fsl_soc.c | 14 +-
arch/powerpc/sysdev/indirect_pci.c | 4 +-
arch/powerpc/sysdev/mpic.c | 23 +-
arch/powerpc/sysdev/ppc4xx_pci.c | 4 +-
arch/powerpc/sysdev/qe_lib/qe.c | 75 ++-
arch/powerpc/sysdev/tsi108_pci.c | 4 +-
arch/powerpc/sysdev/xilinx_intc.c | 81 ++-
arch/powerpc/sysdev/xilinx_pci.c | 132 +++
arch/powerpc/xmon/xmon.c | 47 +
drivers/char/viotape.c | 2 +-
drivers/i2c/busses/i2c-ibm_iic.c | 6 +-
drivers/macintosh/therm_adt746x.c | 4 +-
drivers/net/ucc_geth.c | 24 +-
drivers/net/ucc_geth.h | 4 +-
drivers/of/base.c | 1 +
drivers/pci/Makefile | 1 -
drivers/rapidio/rio-scan.c | 6 +-
drivers/video/xilinxfb.c | 290 +++---
include/linux/pci_ids.h | 4 +
192 files changed, 6191 insertions(+), 2357 deletions(-)
create mode 100644 Documentation/powerpc/dts-bindings/ecm.txt
create mode 100644 Documentation/powerpc/dts-bindings/fsl/mcm.txt
create mode 100644 arch/powerpc/boot/dts/mpc8569mds.dts
create mode 100644 arch/powerpc/boot/dts/mpc8641_hpcn_36b.dts
create mode 100644 arch/powerpc/boot/dts/p2020ds.dts
create mode 100644 arch/powerpc/boot/dts/virtex440-ml510.dts
create mode 100644 arch/powerpc/include/asm/emulated_ops.h
delete mode 100644 arch/powerpc/include/asm/mpc86xx.h
create mode 100644 arch/powerpc/include/asm/swiotlb.h
create mode 100644 arch/powerpc/include/asm/xilinx_pci.h
create mode 100644 arch/powerpc/kernel/dma-swiotlb.c
create mode 100644 arch/powerpc/kernel/exceptions-64s.S
delete mode 100644 arch/powerpc/platforms/40x/kilauea.c
delete mode 100644 arch/powerpc/platforms/40x/makalu.c
create mode 100644 arch/powerpc/platforms/44x/virtex_ml510.c
create mode 100644 arch/powerpc/sysdev/xilinx_pci.c
^ permalink raw reply
* Re: [PATCH] powerpc: Make RTAS instantiation depend on CONFIG_PPC_RTAS
From: Benjamin Herrenschmidt @ 2009-06-15 1:49 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev
In-Reply-To: <56982642b8954ea193ae48c5d02e8dbd84d72f17.1244779685.git.michael@ellerman.id.au>
On Fri, 2009-06-12 at 14:08 +1000, Michael Ellerman wrote:
> Currently prom_init.c always instantiates RTAS, even if the kernel
> is built without RTAS support - that seems wrong.
Nak :-)
We want to always instantiate it from prom_init.c because we can't do
it any more later. There's the vague possibility that you may want to
boot a non-RTAS kernel which then kexec's into an RTAS kernel, and that
isn't possible if the initial prom_init.c didn't instanciate RTAS and
put a reference to it in the flat device-tree.
Cheers,
Ben.
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> ---
> arch/powerpc/kernel/prom_init.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
> index 2f0e64b..6c2dc59 100644
> --- a/arch/powerpc/kernel/prom_init.c
> +++ b/arch/powerpc/kernel/prom_init.c
> @@ -1052,6 +1052,7 @@ static void __init prom_init_mem(void)
> }
>
>
> +#ifdef CONFIG_PPC_RTAS
> /*
> * Allocate room for and instantiate RTAS
> */
> @@ -1109,6 +1110,9 @@ static void __init prom_instantiate_rtas(void)
>
> prom_debug("prom_instantiate_rtas: end...\n");
> }
> +#else
> +static inline void prom_instantiate_rtas(void) { }
> +#endif /* CONFIG_PPC_RTAS */
>
> #ifdef CONFIG_PPC64
> /*
^ permalink raw reply
* Re: [PATCH 10/33] powerpc/cell: Extract duplicated IOPTE_* to <asm/iommu.h>
From: Benjamin Herrenschmidt @ 2009-06-15 1:41 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linuxppc-dev, cbe-oss-dev
In-Reply-To: <1244644748-24211-11-git-send-email-Geert.Uytterhoeven@sonycom.com>
On Wed, 2009-06-10 at 16:38 +0200, Geert Uytterhoeven wrote:
> Both arch/powerpc/platforms/cell/iommu.c and arch/powerpc/platforms/ps3/mm.c
> contain the same Cell IOMMU page table entry definitions. Extract them and move
> them to <asm/iommu.h>, while adding a CBE_ prefix.
> This also allows them to be used by drivers.
Are we sure include/asm/iommu.h is the right place for that ?
I'm hesitating here...
Cheers,
Ben.
> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> ---
> v2: Add CBE_ prefix
>
> arch/powerpc/include/asm/iommu.h | 10 ++++++++
> arch/powerpc/platforms/cell/iommu.c | 37 ++++++++++++------------------
> arch/powerpc/platforms/ps3/mm.c | 7 ++++-
> arch/powerpc/platforms/ps3/platform.h | 10 --------
> arch/powerpc/platforms/ps3/system-bus.c | 15 +++++++-----
> 5 files changed, 39 insertions(+), 40 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/iommu.h b/arch/powerpc/include/asm/iommu.h
> index 7464c0d..7ead7c1 100644
> --- a/arch/powerpc/include/asm/iommu.h
> +++ b/arch/powerpc/include/asm/iommu.h
> @@ -35,6 +35,16 @@
> #define IOMMU_PAGE_MASK (~((1 << IOMMU_PAGE_SHIFT) - 1))
> #define IOMMU_PAGE_ALIGN(addr) _ALIGN_UP(addr, IOMMU_PAGE_SIZE)
>
> +/* Cell page table entries */
> +#define CBE_IOPTE_PP_W 0x8000000000000000ul /* protection: write */
> +#define CBE_IOPTE_PP_R 0x4000000000000000ul /* protection: read */
> +#define CBE_IOPTE_M 0x2000000000000000ul /* coherency required */
> +#define CBE_IOPTE_SO_R 0x1000000000000000ul /* ordering: writes */
> +#define CBE_IOPTE_SO_RW 0x1800000000000000ul /* ordering: r & w */
> +#define CBE_IOPTE_RPN_Mask 0x07fffffffffff000ul /* RPN */
> +#define CBE_IOPTE_H 0x0000000000000800ul /* cache hint */
> +#define CBE_IOPTE_IOID_Mask 0x00000000000007fful /* ioid */
> +
> /* Boot time flags */
> extern int iommu_is_off;
> extern int iommu_force_on;
> diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
> index bed4690..5b34fc2 100644
> --- a/arch/powerpc/platforms/cell/iommu.c
> +++ b/arch/powerpc/platforms/cell/iommu.c
> @@ -100,16 +100,6 @@
> #define IOSTE_PS_1M 0x0000000000000005ul /* - 1MB */
> #define IOSTE_PS_16M 0x0000000000000007ul /* - 16MB */
>
> -/* Page table entries */
> -#define IOPTE_PP_W 0x8000000000000000ul /* protection: write */
> -#define IOPTE_PP_R 0x4000000000000000ul /* protection: read */
> -#define IOPTE_M 0x2000000000000000ul /* coherency required */
> -#define IOPTE_SO_R 0x1000000000000000ul /* ordering: writes */
> -#define IOPTE_SO_RW 0x1800000000000000ul /* ordering: r & w */
> -#define IOPTE_RPN_Mask 0x07fffffffffff000ul /* RPN */
> -#define IOPTE_H 0x0000000000000800ul /* cache hint */
> -#define IOPTE_IOID_Mask 0x00000000000007fful /* ioid */
> -
>
> /* IOMMU sizing */
> #define IO_SEGMENT_SHIFT 28
> @@ -193,19 +183,21 @@ static int tce_build_cell(struct iommu_table *tbl, long index, long npages,
> */
> const unsigned long prot = 0xc48;
> base_pte =
> - ((prot << (52 + 4 * direction)) & (IOPTE_PP_W | IOPTE_PP_R))
> - | IOPTE_M | IOPTE_SO_RW | (window->ioid & IOPTE_IOID_Mask);
> + ((prot << (52 + 4 * direction)) &
> + (CBE_IOPTE_PP_W | CBE_IOPTE_PP_R)) |
> + CBE_IOPTE_M | CBE_IOPTE_SO_RW |
> + (window->ioid & CBE_IOPTE_IOID_Mask);
> #else
> - base_pte = IOPTE_PP_W | IOPTE_PP_R | IOPTE_M | IOPTE_SO_RW |
> - (window->ioid & IOPTE_IOID_Mask);
> + base_pte = CBE_IOPTE_PP_W | CBE_IOPTE_PP_R | CBE_IOPTE_M |
> + CBE_IOPTE_SO_RW | (window->ioid & CBE_IOPTE_IOID_Mask);
> #endif
> if (unlikely(dma_get_attr(DMA_ATTR_WEAK_ORDERING, attrs)))
> - base_pte &= ~IOPTE_SO_RW;
> + base_pte &= ~CBE_IOPTE_SO_RW;
>
> io_pte = (unsigned long *)tbl->it_base + (index - tbl->it_offset);
>
> for (i = 0; i < npages; i++, uaddr += IOMMU_PAGE_SIZE)
> - io_pte[i] = base_pte | (__pa(uaddr) & IOPTE_RPN_Mask);
> + io_pte[i] = base_pte | (__pa(uaddr) & CBE_IOPTE_RPN_Mask);
>
> mb();
>
> @@ -231,8 +223,9 @@ static void tce_free_cell(struct iommu_table *tbl, long index, long npages)
> #else
> /* spider bridge does PCI reads after freeing - insert a mapping
> * to a scratch page instead of an invalid entry */
> - pte = IOPTE_PP_R | IOPTE_M | IOPTE_SO_RW | __pa(window->iommu->pad_page)
> - | (window->ioid & IOPTE_IOID_Mask);
> + pte = CBE_IOPTE_PP_R | CBE_IOPTE_M | CBE_IOPTE_SO_RW |
> + __pa(window->iommu->pad_page) |
> + (window->ioid & CBE_IOPTE_IOID_Mask);
> #endif
>
> io_pte = (unsigned long *)tbl->it_base + (index - tbl->it_offset);
> @@ -1001,7 +994,7 @@ static void insert_16M_pte(unsigned long addr, unsigned long *ptab,
> pr_debug("iommu: addr %lx ptab %p segment %lx offset %lx\n",
> addr, ptab, segment, offset);
>
> - ptab[offset] = base_pte | (__pa(addr) & IOPTE_RPN_Mask);
> + ptab[offset] = base_pte | (__pa(addr) & CBE_IOPTE_RPN_Mask);
> }
>
> static void cell_iommu_setup_fixed_ptab(struct cbe_iommu *iommu,
> @@ -1016,14 +1009,14 @@ static void cell_iommu_setup_fixed_ptab(struct cbe_iommu *iommu,
>
> pr_debug("iommu: mapping 0x%lx pages from 0x%lx\n", fsize, fbase);
>
> - base_pte = IOPTE_PP_W | IOPTE_PP_R | IOPTE_M
> - | (cell_iommu_get_ioid(np) & IOPTE_IOID_Mask);
> + base_pte = CBE_IOPTE_PP_W | CBE_IOPTE_PP_R | CBE_IOPTE_M |
> + (cell_iommu_get_ioid(np) & CBE_IOPTE_IOID_Mask);
>
> if (iommu_fixed_is_weak)
> pr_info("IOMMU: Using weak ordering for fixed mapping\n");
> else {
> pr_info("IOMMU: Using strong ordering for fixed mapping\n");
> - base_pte |= IOPTE_SO_RW;
> + base_pte |= CBE_IOPTE_SO_RW;
> }
>
> for (uaddr = 0; uaddr < fsize; uaddr += (1 << 24)) {
> diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c
> index 9a2b6d9..017b614 100644
> --- a/arch/powerpc/platforms/ps3/mm.c
> +++ b/arch/powerpc/platforms/ps3/mm.c
> @@ -24,6 +24,7 @@
> #include <linux/lmb.h>
>
> #include <asm/firmware.h>
> +#include <asm/iommu.h>
> #include <asm/prom.h>
> #include <asm/udbg.h>
> #include <asm/lv1call.h>
> @@ -1001,7 +1002,8 @@ static int dma_sb_region_create_linear(struct ps3_dma_region *r)
> if (len > r->len)
> len = r->len;
> result = dma_sb_map_area(r, virt_addr, len, &tmp,
> - IOPTE_PP_W | IOPTE_PP_R | IOPTE_SO_RW | IOPTE_M);
> + CBE_IOPTE_PP_W | CBE_IOPTE_PP_R | CBE_IOPTE_SO_RW |
> + CBE_IOPTE_M);
> BUG_ON(result);
> }
>
> @@ -1014,7 +1016,8 @@ static int dma_sb_region_create_linear(struct ps3_dma_region *r)
> else
> len -= map.rm.size - r->offset;
> result = dma_sb_map_area(r, virt_addr, len, &tmp,
> - IOPTE_PP_W | IOPTE_PP_R | IOPTE_SO_RW | IOPTE_M);
> + CBE_IOPTE_PP_W | CBE_IOPTE_PP_R | CBE_IOPTE_SO_RW |
> + CBE_IOPTE_M);
> BUG_ON(result);
> }
>
> diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h
> index 136aa06..9a196a8 100644
> --- a/arch/powerpc/platforms/ps3/platform.h
> +++ b/arch/powerpc/platforms/ps3/platform.h
> @@ -232,14 +232,4 @@ int ps3_repository_read_spu_resource_id(unsigned int res_index,
> int ps3_repository_read_vuart_av_port(unsigned int *port);
> int ps3_repository_read_vuart_sysmgr_port(unsigned int *port);
>
> -/* Page table entries */
> -#define IOPTE_PP_W 0x8000000000000000ul /* protection: write */
> -#define IOPTE_PP_R 0x4000000000000000ul /* protection: read */
> -#define IOPTE_M 0x2000000000000000ul /* coherency required */
> -#define IOPTE_SO_R 0x1000000000000000ul /* ordering: writes */
> -#define IOPTE_SO_RW 0x1800000000000000ul /* ordering: r & w */
> -#define IOPTE_RPN_Mask 0x07fffffffffff000ul /* RPN */
> -#define IOPTE_H 0x0000000000000800ul /* cache hint */
> -#define IOPTE_IOID_Mask 0x00000000000007fful /* ioid */
> -
> #endif
> diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
> index 9a73d02..9fead0f 100644
> --- a/arch/powerpc/platforms/ps3/system-bus.c
> +++ b/arch/powerpc/platforms/ps3/system-bus.c
> @@ -27,6 +27,7 @@
> #include <asm/udbg.h>
> #include <asm/lv1call.h>
> #include <asm/firmware.h>
> +#include <asm/iommu.h>
>
> #include "platform.h"
>
> @@ -531,7 +532,8 @@ static void * ps3_alloc_coherent(struct device *_dev, size_t size,
> }
>
> result = ps3_dma_map(dev->d_region, virt_addr, size, dma_handle,
> - IOPTE_PP_W | IOPTE_PP_R | IOPTE_SO_RW | IOPTE_M);
> + CBE_IOPTE_PP_W | CBE_IOPTE_PP_R |
> + CBE_IOPTE_SO_RW | CBE_IOPTE_M);
>
> if (result) {
> pr_debug("%s:%d: ps3_dma_map failed (%d)\n",
> @@ -575,7 +577,8 @@ static dma_addr_t ps3_sb_map_page(struct device *_dev, struct page *page,
>
> result = ps3_dma_map(dev->d_region, (unsigned long)ptr, size,
> &bus_addr,
> - IOPTE_PP_R | IOPTE_PP_W | IOPTE_SO_RW | IOPTE_M);
> + CBE_IOPTE_PP_R | CBE_IOPTE_PP_W |
> + CBE_IOPTE_SO_RW | CBE_IOPTE_M);
>
> if (result) {
> pr_debug("%s:%d: ps3_dma_map failed (%d)\n",
> @@ -596,16 +599,16 @@ static dma_addr_t ps3_ioc0_map_page(struct device *_dev, struct page *page,
> u64 iopte_flag;
> void *ptr = page_address(page) + offset;
>
> - iopte_flag = IOPTE_M;
> + iopte_flag = CBE_IOPTE_M;
> switch (direction) {
> case DMA_BIDIRECTIONAL:
> - iopte_flag |= IOPTE_PP_R | IOPTE_PP_W | IOPTE_SO_RW;
> + iopte_flag |= CBE_IOPTE_PP_R | CBE_IOPTE_PP_W | CBE_IOPTE_SO_RW;
> break;
> case DMA_TO_DEVICE:
> - iopte_flag |= IOPTE_PP_R | IOPTE_SO_R;
> + iopte_flag |= CBE_IOPTE_PP_R | CBE_IOPTE_SO_R;
> break;
> case DMA_FROM_DEVICE:
> - iopte_flag |= IOPTE_PP_W | IOPTE_SO_RW;
> + iopte_flag |= CBE_IOPTE_PP_W | CBE_IOPTE_SO_RW;
> break;
> default:
> /* not happned */
^ permalink raw reply
* Re: [PATCH 05/33] block: Add bio_list_peek()
From: Benjamin Herrenschmidt @ 2009-06-15 1:39 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Jens Axboe, linuxppc-dev, cbe-oss-dev
In-Reply-To: <1244644748-24211-6-git-send-email-Geert.Uytterhoeven@sonycom.com>
On Wed, 2009-06-10 at 16:38 +0200, Geert Uytterhoeven wrote:
> Introduce bio_list_peek(), to obtain a pointer to the first bio on the bio_list
> without actually removing it from the list. This is needed when you want to
> serialize based on the list being empty or not.
Leaving that one (and the next one) out for now until Jens Ack them.
Cheers,
Ben.
> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> Cc: Jens Axboe <axboe@kernel.dk>
> ---
> include/linux/bio.h | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/bio.h b/include/linux/bio.h
> index 7b214fd..618bb7d 100644
> --- a/include/linux/bio.h
> +++ b/include/linux/bio.h
> @@ -590,6 +590,11 @@ static inline void bio_list_merge_head(struct bio_list *bl,
> bl->head = bl2->head;
> }
>
> +static inline struct bio *bio_list_peek(struct bio_list *bl)
> +{
> + return bl->head;
> +}
> +
> static inline struct bio *bio_list_pop(struct bio_list *bl)
> {
> struct bio *bio = bl->head;
^ permalink raw reply
* Re: [OOPS] hugetlbfs tests with 2.6.30-rc8-git1
From: Stephen Rothwell @ 2009-06-15 1:38 UTC (permalink / raw)
To: michael; +Cc: Mel Gorman, linuxppc-dev
In-Reply-To: <1245027396.7705.23.camel@concordia>
[-- Attachment #1: Type: text/plain, Size: 416 bytes --]
Hi Michael,
On Mon, 15 Jun 2009 10:56:36 +1000 Michael Ellerman <michael@ellerman.id.au> wrote:
>
> Rather than "-git7" can you tell us the actual SHA, I don't know what
> git7 is.
$ cat tools/get_gitid
#!/bin/sh
wget -q -O - http://www.kernel.org/pub/linux/kernel/v2.6/snapshots/patch-$1.id
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply
* Re: [OOPS] hugetlbfs tests with 2.6.30-rc8-git1
From: Michael Ellerman @ 2009-06-15 0:56 UTC (permalink / raw)
To: Sachin Sant; +Cc: Mel Gorman, linuxppc-dev
In-Reply-To: <4A34E12B.4010000@in.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 965 bytes --]
On Sun, 2009-06-14 at 17:08 +0530, Sachin Sant wrote:
> Benjamin Herrenschmidt wrote:
> > On Fri, 2009-06-05 at 16:59 +0530, Sachin Sant wrote:
> >
> >> While executing Hugetlbfs tests against 2.6.30-rc8-git1 on a
> >> Power 6 box observed the following OOPS message.
> I was able to recreate this with 2.6.30-git7.
Hi Sachin,
Rather than "-git7" can you tell us the actual SHA, I don't know what
git7 is.
> Here is the supporting data.
>
> cpu 0x1: Vector: 300 (Data Access) at [c0000000fe9b3220]
> pc: c00000000003d620: .hpte_need_flush+0x1bc/0x2d8
> lr: c00000000003d4d0: .hpte_need_flush+0x6c/0x2d8
> sp: c0000000fe9b34a0
> msr: 8000000000009032
> dar: c0000000283b0d78
This address looks pretty innocuous, but I notice you have
DEBUG_PAGEALLOC=y, so presumably that's why it's triggering.
I can't see from the snippet of disassembly you posted where in the C
code we are, can you work it out?
cheers
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply
* [PATCH] powerpc: Fix invalid construct in our CPU selection Kconfig
From: Benjamin Herrenschmidt @ 2009-06-15 0:45 UTC (permalink / raw)
To: linuxppc-dev
commit 5b7c3c918c9c26c50d220b2b50359208cb5a1dbe introduced an invalid
construct in our CPU selection. This caused warnings, though it still
appeared to do the right thing.
This fixes it properly by having separate formal definitions of
PPC_BOOK3S_32 and PPC_BOOK3S_64 and one statement defining
PPC_BOOK3S based on the two above.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
arch/powerpc/platforms/Kconfig.cputype | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--- linux-work.orig/arch/powerpc/platforms/Kconfig.cputype 2009-06-15 10:39:54.000000000 +1000
+++ linux-work/arch/powerpc/platforms/Kconfig.cputype 2009-06-15 10:41:48.000000000 +1000
@@ -21,7 +21,7 @@ choice
If unsure, select 52xx/6xx/7xx/74xx/82xx/83xx/86xx.
-config PPC_BOOK3S
+config PPC_BOOK3S_32
bool "512x/52xx/6xx/7xx/74xx/82xx/83xx/86xx"
select PPC_FPU
@@ -57,11 +57,14 @@ config E200
endchoice
-config PPC_BOOK3S
- default y
+config PPC_BOOK3S_64
+ def_bool y
depends on PPC64
select PPC_FPU
+config PPC_BOOK3S
+ def_bool y
+ depends on PPC_BOOK3S_32 || PPC_BOOK3S_64
config POWER4_ONLY
bool "Optimize for POWER4"
^ permalink raw reply
* Re: [PATCH 2/2] uio: add an of_genirq driver
From: Hans J. Koch @ 2009-06-14 23:50 UTC (permalink / raw)
To: Wolfram Sang
Cc: devicetree-discuss, Hans J. Koch, linux-kernel, linuxppc-dev,
Greg KH
In-Reply-To: <20090614234643.GA17791@pengutronix.de>
On Mon, Jun 15, 2009 at 01:46:43AM +0200, Wolfram Sang wrote:
>
> > driver. A user _has_ to setup irq, if there is none, he still has to set
> > irq=UIO_IRQ_NONE. For that matter, 'not specified' and 'not found' is both
> > the same bad thing.
>
> Hmm, what should I do?
>
> A typical interrupts-property in a device-tree is specified as:
>
> interrupts = <&irq_controller_node irq_number irq_sense>;
>
> Something like UIO_IRQ_NONE does not fit into this scheme, even more as it is
> Linux-specific and device trees need to be OS independant.
>
> I'm pretty sure the correct way to state that you don't need an interrupt in
> the device-tree is to simply not specify the above interrupt property.
>
> Well, yes, that means you can't distinguish between 'forgotten' and
> 'intentionally left out'. I wonder if it is really that bad? If something does
> not work (= one is missing interrupts), the first place to look at is the
> device tree. If one does not see an interrupt-property, voila, problem solved.
>
> (Note that with my latest suggestion, a _wrong_ interrupt is handled the same
> way as with platform_data. request_irq() should equally fail if the
> return-value from irq_of_parse_and_map() is simply forwarded.)
I agree. And assuming Alan is right, forget what I said about IRQ 0 being a
valid interrupt number.
Thanks,
Hans
>
> --
> Pengutronix e.K. | Wolfram Sang |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply
* Re: [PATCH 2/2] uio: add an of_genirq driver
From: Wolfram Sang @ 2009-06-14 23:46 UTC (permalink / raw)
To: Hans J. Koch; +Cc: devicetree-discuss, Greg KH, linux-kernel, linuxppc-dev
In-Reply-To: <20090614230135.GI3639@local>
[-- Attachment #1: Type: text/plain, Size: 1306 bytes --]
> driver. A user _has_ to setup irq, if there is none, he still has to set
> irq=UIO_IRQ_NONE. For that matter, 'not specified' and 'not found' is both
> the same bad thing.
Hmm, what should I do?
A typical interrupts-property in a device-tree is specified as:
interrupts = <&irq_controller_node irq_number irq_sense>;
Something like UIO_IRQ_NONE does not fit into this scheme, even more as it is
Linux-specific and device trees need to be OS independant.
I'm pretty sure the correct way to state that you don't need an interrupt in
the device-tree is to simply not specify the above interrupt property.
Well, yes, that means you can't distinguish between 'forgotten' and
'intentionally left out'. I wonder if it is really that bad? If something does
not work (= one is missing interrupts), the first place to look at is the
device tree. If one does not see an interrupt-property, voila, problem solved.
(Note that with my latest suggestion, a _wrong_ interrupt is handled the same
way as with platform_data. request_irq() should equally fail if the
return-value from irq_of_parse_and_map() is simply forwarded.)
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply
* Re: [PATCH 2/2] uio: add an of_genirq driver
From: Hans J. Koch @ 2009-06-14 23:45 UTC (permalink / raw)
To: Alan Cox
Cc: devicetree-discuss, Hans J. Koch, linux-kernel, linuxppc-dev,
Greg KH
In-Reply-To: <20090615001207.1829e7b5@lxorguk.ukuu.org.uk>
On Mon, Jun 15, 2009 at 12:12:07AM +0100, Alan Cox wrote:
> > > + if (!uioinfo->irq)
> > > + uioinfo->irq = UIO_IRQ_NONE;
> >
> > Please don't do this. It's inconsistent if all other UIO drivers require
> > people to use UIO_IRQ_NONE and you also allow zero. UIO_IRQ_NONE was
> > introduced because 0 may be a legal interrupt number on some platforms.
>
> Zero is not a valid IRQ number in the kernel (except in arch specific
> depths). IRQ numbers are also *unsigned* so -1 isn't a safe definition.
The above uioinfo->irq is a signed long.
>
> Zero means no IRQ. If any old UIO code is assuming otherwise it wants
> fixing.
It doesn't. It won't complain about IRQ 0 and will pass it on to
request_irq, which will probably fail if it is as you say.
I did it that way because I saw IRQ 0 in /proc/interrupts on every PC...
>
> It is the job of the platform to map a physical IRQ 0 to some other
> representation if it exists outside of arch specific code.
Funny.
> This was
> decided some years ago and a large part of the kernel simply doesn't
> support any notion of a real IRQ 0.
Can you tell me the reason for that decision or point me to some ml archive?
Thanks,
Hans
>
> Alan
^ permalink raw reply
* Re: [PATCH 2/2] uio: add an of_genirq driver
From: Alan Cox @ 2009-06-14 23:12 UTC (permalink / raw)
To: Hans J. Koch
Cc: devicetree-discuss, Hans J. Koch, linux-kernel, linuxppc-dev,
Greg KH
In-Reply-To: <20090614122136.GD3639@local>
> > + if (!uioinfo->irq)
> > + uioinfo->irq = UIO_IRQ_NONE;
>
> Please don't do this. It's inconsistent if all other UIO drivers require
> people to use UIO_IRQ_NONE and you also allow zero. UIO_IRQ_NONE was
> introduced because 0 may be a legal interrupt number on some platforms.
Zero is not a valid IRQ number in the kernel (except in arch specific
depths). IRQ numbers are also *unsigned* so -1 isn't a safe definition.
Zero means no IRQ. If any old UIO code is assuming otherwise it wants
fixing.
It is the job of the platform to map a physical IRQ 0 to some other
representation if it exists outside of arch specific code. This was
decided some years ago and a large part of the kernel simply doesn't
support any notion of a real IRQ 0.
Alan
^ permalink raw reply
* Re: [PATCH 2/2] uio: add an of_genirq driver
From: Hans J. Koch @ 2009-06-14 23:01 UTC (permalink / raw)
To: Wolfram Sang
Cc: devicetree-discuss, Hans J. Koch, linux-kernel, linuxppc-dev,
Greg KH
In-Reply-To: <20090614220022.GB24323@pengutronix.de>
On Mon, Jun 15, 2009 at 12:00:22AM +0200, Wolfram Sang wrote:
> > > For x86 it's not defined at all. But as this code is for the PowerPC,
> >
> > No, it isn't. What makes you say that? The Kconfig entry doesn't depend
> > on PowerPC. I compiled it on x86...
>
> It depends on OF. You could compile on x86? Have to check that...
Ooops, forget it. It cannot be selected on x86. I was a bit distracted when
I wrote that, sorry.
>
> > > where using NO_IRQ seems still to be OK.
> >
> > No. uio_pdrv_genirq can be used on all platforms, and not all platforms have
> > NO_IRQ. NO_IRQ can be used in platform specific code only.
>
> Well, the wrapper uses irq_of_parse_and_map(). So far, it returns NO_IRQ if an
> IRQ was not specified (or not found). I could check if there was an
> interrupt-property at all, so I can distinguish between 'not specified' and
> 'not found'. Then, UIO_IRQ_NONE would only be used, if there was none
> specified. Otherwise it will always be the result from irq_of_parse_and_map(),
> whatever that is (even NO_IRQ). Is this what you have in mind?
I would find it better if probe() failed if no irq is specified, printing a
message that tells the user to setup his data correctly before loading the
driver. A user _has_ to setup irq, if there is none, he still has to set
irq=UIO_IRQ_NONE. For that matter, 'not specified' and 'not found' is both
the same bad thing.
Thanks,
Hans
>
> Regards,
>
> Wolfram
>
> --
> Pengutronix e.K. | Wolfram Sang |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply
* Re: [PATCH 2/2] uio: add an of_genirq driver
From: Wolfram Sang @ 2009-06-14 22:00 UTC (permalink / raw)
To: Hans J. Koch; +Cc: devicetree-discuss, Greg KH, linux-kernel, linuxppc-dev
In-Reply-To: <20090614203444.GH3639@local>
[-- Attachment #1: Type: text/plain, Size: 1084 bytes --]
> > For x86 it's not defined at all. But as this code is for the PowerPC,
>
> No, it isn't. What makes you say that? The Kconfig entry doesn't depend
> on PowerPC. I compiled it on x86...
It depends on OF. You could compile on x86? Have to check that...
> > where using NO_IRQ seems still to be OK.
>
> No. uio_pdrv_genirq can be used on all platforms, and not all platforms have
> NO_IRQ. NO_IRQ can be used in platform specific code only.
Well, the wrapper uses irq_of_parse_and_map(). So far, it returns NO_IRQ if an
IRQ was not specified (or not found). I could check if there was an
interrupt-property at all, so I can distinguish between 'not specified' and
'not found'. Then, UIO_IRQ_NONE would only be used, if there was none
specified. Otherwise it will always be the result from irq_of_parse_and_map(),
whatever that is (even NO_IRQ). Is this what you have in mind?
Regards,
Wolfram
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply
* Re: [PATCH 2/2] uio: add an of_genirq driver
From: Wolfram Sang @ 2009-06-14 21:46 UTC (permalink / raw)
To: Greg KH; +Cc: linuxppc-dev, Hans J. Koch, linux-kernel, devicetree-discuss
In-Reply-To: <20090614192707.GA11003@suse.de>
[-- Attachment #1: Type: text/plain, Size: 1107 bytes --]
On Sun, Jun 14, 2009 at 12:27:07PM -0700, Greg KH wrote:
> On Sun, Jun 14, 2009 at 09:05:33PM +0200, Wolfram Sang wrote:
> > Well, I assume that issues regarding checkpatch do not have the highest
> > priority (especially while the merge-window is open), which is understandable.
>
> Hm, the "merge-window" for new stuff like these patches is pretty much
> already closed, as you didn't send them _before_ the merge window opened
> up. You need to get them to us sooner, so we can test stuff out in the
> -next tree for a while before we can merge them.
Seems you got me wrong here :)
As I stated in the introduction ("PATCH [0/2]"), this patch series is _not_
meant for the current merge-window. I just happened to be done with it now.
With the above sentence I just wanted to give a hint, why there was not a reply
to my checkpatch-mail (as Hans seemed to be concerned about that there was
none).
Regards,
Wolfram
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply
* Re: [PATCH 2/2] uio: add an of_genirq driver
From: Hans J. Koch @ 2009-06-14 20:34 UTC (permalink / raw)
To: Wolfgang Grandegger
Cc: devicetree-discuss, Hans J. Koch, linux-kernel, linuxppc-dev,
Greg KH
In-Reply-To: <4A355155.4020500@grandegger.com>
On Sun, Jun 14, 2009 at 09:36:53PM +0200, Wolfgang Grandegger wrote:
> >>>> if (uioinfo->irq == NO_IRQ)
> >>>> uioinfo->irq = UIO_IRQ_NONE;
> >>> Sorry for my ignorance, but what is NO_IRQ? If I do
>
> It's 0 on PowerPC but ARM seems still to use -1.
Using 0 is simply wrong, especially if people do something like
if (!irq)
return -ERROR;
IRQ number 0 _is_ a valid irq. Maybe not on all platforms, but in generic
code (like UIO) you have to assume it is.
>
> http://lxr.linux.no/linux+v2.6.30/arch/powerpc/include/asm/irq.h#L29
>
> For x86 it's not defined at all. But as this code is for the PowerPC,
No, it isn't. What makes you say that? The Kconfig entry doesn't depend
on PowerPC. I compiled it on x86...
> where using NO_IRQ seems still to be OK.
No. uio_pdrv_genirq can be used on all platforms, and not all platforms have
NO_IRQ. NO_IRQ can be used in platform specific code only.
Anyway, if someone fills in an invalid irq in his platform data, he deserves
to crash. No need for that test. UIO docs state that irq is a _required_
element. If you forget to set it, it will probably be 0. On most platforms,
register_irq will fail with that, and you'll notice. If you silently
replace it with UIO_IRQ_NONE, you simply cover up wrong code.
Thanks,
Hans
>
> Wolfgang.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox