Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1264235
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Guenter Roeck <linux@roeck-us.net> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH -next] net: hisilicon: Never build on SPARC |
| Date | Fri, 06 Nov 2015 20:20:02 +0100 |
| Message-ID | <qrUIi-9d-1@gated-at.bofh.it> (permalink) |
| References | <qm2yT-5Ck-23@gated-at.bofh.it> <qm3XX-7C9-7@gated-at.bofh.it> <qm53H-ZN-5@gated-at.bofh.it> <qm75v-3ST-9@gated-at.bofh.it> <qm9An-7mh-33@gated-at.bofh.it> |
| X-Original-To | Arnd Bergmann <arnd@arndb.de> |
| Dkim-Signature | v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=gJAcPq198xVryxmiszC0BeBgwxV2RXZXp1R4q3a2QqM=; b=qPjEiBr7TfLODUrTt92ydN4E1F1wr4bB9GDK/1GZW6fvi7a5LvzIAMXqrVoetfWx1Wvy/KE2I+qIhTUcOcCLBC2q+tscaRuC3be/fvj4F4k6VvR1EpFr/4r1i3FrLNaA80+Zi3vg1lOXKB5LxENKMq78vt8VJ32qNDNqLliw3nc=; |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.23 (2014-03-12) |
| X-Authenticated_Sender | guenter@roeck-us.net |
| X-Outgoing-Spam-Status | No, score=-1.0 |
| X-Antiabuse | This header was added to track abuse, please include it with any abuse report |
| X-Antiabuse | Primary Hostname - bh-25.webhostbox.net |
| X-Antiabuse | Original Domain - vger.kernel.org |
| X-Antiabuse | Originator/Caller UID/GID - [47 12] / [47 12] |
| X-Antiabuse | Sender Address Domain - roeck-us.net |
| X-Get-Message-Sender-Via | bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 52 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | David Miller <davem@davemloft.net>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org |
| X-Original-Date | Fri, 6 Nov 2015 11:16:52 -0800 |
| X-Original-Message-ID | <20151106191652.GA4046@roeck-us.net> |
| X-Original-References | <1445437773-23261-1-git-send-email-linux@roeck-us.net> <4129407.LpDXnpSZOL@wuerfel> <5627C549.9080600@roeck-us.net> <5243548.YbVhhU6W8t@wuerfel> <20151021215320.GB23371@roeck-us.net> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1264235 |
Show key headers only | View raw
Arnd,
On Wed, Oct 21, 2015 at 02:53:20PM -0700, Guenter Roeck wrote:
> On Wed, Oct 21, 2015 at 09:11:53PM +0200, Arnd Bergmann wrote:
> > On Wednesday 21 October 2015 10:03:05 Guenter Roeck wrote:
> > > >
> > > > Something like this?
> > > >
> > > > static inline u64 of_translate_address(struct device_node *np, const __be32 *addr)
> > > > {
> > > > #if defined(CONFIG_SPARC) || defined(CONFIG_M68K)
> > > > int pna = of_n_addr_cells(np);
> > > > u64 ret = be32_to_cpu(addr[pna - 1]);
> > > >
> > > > if (pna > 1)
> > > > ret += (u64)be32_to_cpu(addr[pna - 2]) << 32;
> > > >
> > > > return ret;
> > >
> > > That suggests that sparc would need a translation after all, which
> > > seems to contradict what David said earlier.
> >
> > No, not a translation: the value is used without any offset that
> > factors in the location of the bus, the above is just the shortest
> > possible way to read the 64-bit number from a big-endian property
> > of variable length.
> >
> Out of my realm .. David would have to comment on that.
>
> > > Anyway, if it gets that complicated, I think we should stick with
> > > just returning OF_BAD_ADDR. The above really suggests the need for
> > > an architecture specific solution.
> >
> > Probably no harm in this really: the far more common
> > of_address_to_resource() and of_iomap() helpers are equally
> > broken on SPARC and we just return a runtime error for those
> > as well without CONFIG_OF_ADDRESS rather than breaking the build.
> >
> Agreed. Given this, returning OF_BAD_ADDR sounds like a better choice.
>
Arnd,
do you know if a fix for this problem is pending in some branch ?
Mainline sparc builds are now affected.
Thanks,
Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH -next] net: hisilicon: Never build on SPARC Guenter Roeck <linux@roeck-us.net> - 2015-11-06 20:20 +0100
Re: [PATCH -next] net: hisilicon: Never build on SPARC Arnd Bergmann <arnd@arndb.de> - 2015-11-06 21:40 +0100
Re: [PATCH -next] net: hisilicon: Never build on SPARC Guenter Roeck <linux@roeck-us.net> - 2015-11-07 02:30 +0100
csiph-web