linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: David Woodhouse <dwmw2@infradead.org>
Cc: "Étienne Bersac" <bersace03@gmail.com>,
	linuxppc-dev <linuxppc-dev@ozlabs.org>
Subject: Re: [PATCH] windfarm: add PowerMac 12,1 support
Date: Sun, 23 Mar 2008 10:25:41 +1100	[thread overview]
Message-ID: <1206228341.7197.15.camel@pasglop> (raw)
In-Reply-To: <1206227641.9540.108.camel@pmac.infradead.org>


On Sat, 2008-03-22 at 23:14 +0000, David Woodhouse wrote:
> On Sat, 2008-03-22 at 23:02 +0000, David Woodhouse wrote:
> > 
> > Yeah, there's weird shit going on with the sensor/control
> > registration.
> > I think GCC is be miscompiling it -- the sequence of
> >         all = all && pm121_register_control(foo...);
> >         all = all && pm121_register_control(bar...);
> > is bailing out as soon as 'all' gets set to zero. Despite the fact
> > that pm121_register_control() quite blatantly has side-effects.

And it's just supposed to do that no ?

Ben.

> That's after I fix the names in pm121_new_control() and fix
> pm121_register_control() to set controls[id] instead of always setting
> controls[FAN_OD], btw. Without that I don't think it could ever have
> worked. 
> 
> But it's still broken. I'll try to cut it down and file a GCC bug...
> 
> .pm121_new_control:
> .LFB929:
>         .loc 1 883 0
> .LVL44:
>         mflr 0
> .LCFI38:
>         std 0,16(1)
> .LCFI39:
>         std 30,-16(1)
> .LCFI40:
>         std 31,-8(1)
> .LCFI41:
>         stdu 1,-128(1)
> .LCFI42:
>         ld 30,.LCTOC0@toc(2)
>         mr 31,3
>         .loc 1 886 0
>         ld 9,.LC47-.LCTOC1(30)
>         lwz 0,48(9)
>         cmpwi 7,0,0
>         bne 7,.L31
> .LVL45:
>         .loc 1 889 0
>         ld 4,.LC49-.LCTOC1(30)
>         li 5,2
>         bl .pm121_register_control
>         cmpdi 7,3,0
>         beq 7,.L31
>         .loc 1 890 0
>         mr 3,31
>         ld 4,.LC51-.LCTOC1(30)
>         li 5,1
>         bl .pm121_register_control
>         cmpdi 7,3,0
>         beq 7,.L31
>         .loc 1 891 0
>         mr 3,31
>         ld 4,.LC53-.LCTOC1(30)
>         li 5,0
>         bl .pm121_register_control
>         cmpdi 7,3,0
>         beq 7,.L31
>         .loc 1 892 0
>         mr 3,31
>         ld 4,.LC55-.LCTOC1(30)
>         li 5,3
>         bl .pm121_register_control
>         cmpdi 7,3,0
>         beq 7,.L31
>         .loc 1 895 0
>         ld 3,.LC57-.LCTOC1(30)
>         bl .printk
>         nop
>         .loc 1 896 0
>         ld 9,.LC47-.LCTOC1(30)
>         li 0,1
>         stw 0,48(9)
> .LVL46:
> .L31:
>         .loc 1 898 0
>         addi 1,1,128
>         ld 0,16(1)
>         mtlr 0
>         ld 30,-16(1)
>         ld 31,-8(1)
> .LVL47:
>         blr
> 
> 
> 

  reply	other threads:[~2008-03-22 23:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-26 11:55 [PATCH] windfarm: add PowerMac 12,1 support Étienne Bersac
2008-03-22 19:35 ` David Woodhouse
2008-03-22 22:13   ` Benjamin Herrenschmidt
2008-03-22 23:02     ` David Woodhouse
2008-03-22 23:14       ` David Woodhouse
2008-03-22 23:25         ` Benjamin Herrenschmidt [this message]
2008-03-22 23:25       ` Stephen Rothwell
2008-03-22 23:31         ` David Woodhouse
2008-03-23  1:01           ` Andreas Schwab
2008-03-23  5:38           ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2008-04-29  5:39 Benjamin Herrenschmidt
2007-12-06  1:20 Étienne Bersac
2007-12-06 15:30 ` Étienne Bersac
2007-12-10 15:11   ` Étienne Bersac
2007-12-10 15:39     ` Arnd Bergmann
2007-12-10 17:17       ` Étienne Bersac
2007-12-10 17:22         ` Étienne Bersac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1206228341.7197.15.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=bersace03@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).