Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1264235 > unrolled thread
| Started by | Guenter Roeck <linux@roeck-us.net> |
|---|---|
| First post | 2015-11-06 20:20 +0100 |
| Last post | 2015-11-07 02:30 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
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
| From | Guenter Roeck <linux@roeck-us.net> |
|---|---|
| Date | 2015-11-06 20:20 +0100 |
| Subject | Re: [PATCH -next] net: hisilicon: Never build on SPARC |
| Message-ID | <qrUIi-9d-1@gated-at.bofh.it> |
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/
[toc] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2015-11-06 21:40 +0100 |
| Message-ID | <qrVXI-V4-19@gated-at.bofh.it> |
| In reply to | #1264235 |
On Friday 06 November 2015 11:16:52 Guenter Roeck wrote: > 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: > > > > 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. > I don't think anyone wrote the patch to do this. Can you send one? Arnd -- 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/
[toc] | [prev] | [next] | [standalone]
| From | Guenter Roeck <linux@roeck-us.net> |
|---|---|
| Date | 2015-11-07 02:30 +0100 |
| Message-ID | <qs0um-3UV-21@gated-at.bofh.it> |
| In reply to | #1264466 |
On 11/06/2015 12:30 PM, Arnd Bergmann wrote: > On Friday 06 November 2015 11:16:52 Guenter Roeck wrote: >> 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: >>>>> 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. >> > > I don't think anyone wrote the patch to do this. Can you send one? > I'll see what I can do. 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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web