From: "Gerhard Pircher" <gerhard_pircher@gmx.net>
To: Scott Wood <scottwood@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 1/5] powerpc: Add platform support for AmigaOne
Date: Wed, 07 Jan 2009 23:50:54 +0100 [thread overview]
Message-ID: <20090107225054.23010@gmx.net> (raw)
-------- Original-Nachricht --------
> Datum: Wed, 7 Jan 2009 13:07:18 -0600
> Von: Scott Wood <scottwood@freescale.com>
> An: Gerhard Pircher <gerhard_pircher@gmx.net>
> CC: linuxppc-dev@ozlabs.org
> Betreff: Re: [PATCH 1/5] powerpc: Add platform support for AmigaOne
> On Wed, Jan 07, 2009 at 02:54:57PM +0100, Gerhard Pircher wrote:
> > +void amigaone_show_cpuinfo(struct seq_file *m)
> > +{
> > + struct device_node *root;
> > + const char *model = "";
> > +
> > + root = of_find_node_by_path("/");
> > + if (root)
> > + model = of_get_property(root, "model", NULL);
> > + seq_printf(m, "machine\t\t: %s\n", model);
> > +
> > + of_node_put(root);
> > + return;
>
> This is already printed by the generic cpuinfo.
I'll remove that. Is a vendor or machine entry actually required?
IIRC the debian-installer parses the machine entry.
> > +void __init amigaone_setup_arch(void)
> > +{
> > + struct device_node *np;
> > +
> > + /* Initialization until calibrate_delay() runs. */
> > + loops_per_jiffy = 50000000/HZ;
>
> Is this really necessary?
Don't think so. It's a leftover from the CHRP setup code.
> > + /* Flush and disable I/D cache. */
> > + __asm__ __volatile__ ("mfspr 3, 1008" ::: "r3");
> > + __asm__ __volatile__ ("ori 5, 5, 0xcc00" ::: "r5");
> > + __asm__ __volatile__ ("ori 4, 3, 0xc00" ::: "r4");
> > + __asm__ __volatile__ ("andc 5, 3, 5" ::: "r5");
>
> Don't do this; instead, have one multi-line asm statement (or better yet,
> just use mfspr()/mtspr()/sync()/isync()).
>
> GCC is perfectly free to trash your registers in between statements.
Okay, I'll try to rewrite it with mfspr() and friends (I don't understand gcc's
assembler syntax yet).
Thanks!
Gerhard
--
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
next reply other threads:[~2009-01-07 22:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-07 22:50 Gerhard Pircher [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-01-07 13:54 [PATCH 1/5] powerpc: Add platform support for AmigaOne Gerhard Pircher
2009-01-07 16:07 ` Grant Likely
2009-01-07 19:07 ` Scott Wood
2009-01-07 22:50 ` [PATCH 2/5] powerpc: Generic device tree for all AmigaOne boards Gerhard Pircher
2009-01-12 5:12 ` Benjamin Herrenschmidt
2009-01-12 23:39 ` [PATCH 1/5] powerpc: Add platform support for AmigaOne Gerhard Pircher
2009-01-12 5:08 ` Benjamin Herrenschmidt
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=20090107225054.23010@gmx.net \
--to=gerhard_pircher@gmx.net \
--cc=linuxppc-dev@ozlabs.org \
--cc=scottwood@freescale.com \
/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).