2015-05-04 22:31:00

by Guenter Roeck

[permalink] [raw]
Subject: [PATCH resend 0/5] Fix various build errors

The following series of patches fix various mainline build errors. All have been
submitted some time ago. Please see this series as reminder to either consider
sending pull requests to Linus, or to find a better solution.


2015-05-04 22:31:33

by Guenter Roeck

[permalink] [raw]
Subject: [PATCH resend 1/5] spi: bcm2835: Add GPIOLIB dependency

Fix:

drivers/spi/spi-bcm2835.c: In function 'chip_match_name':
drivers/spi/spi-bcm2835.c:356:21: error:
dereferencing pointer to incomplete type
drivers/spi/spi-bcm2835.c: In function 'bcm2835_spi_setup':
drivers/spi/spi-bcm2835.c:382:2: error:
` implicit declaration of function 'gpiochip_find'
drivers/spi/spi-bcm2835.c:387:21: error:
dereferencing pointer to incomplete type

by adding the now mandatory GPIOLIB dependency.

Fixes: a30a555d7435 ("spi: bcm2835: transform native-cs to gpio-cs
on first spi_setup")
Cc: Martin Sperl <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
---
Yes, I know, this patch is in -next. Please see this e-mail as gentle reminder
to consider pushing it (or one of the other patches fixing the same problem)
into mainline.

drivers/spi/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 198f96b7fb45..a132180a9251 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -78,6 +78,7 @@ config SPI_ATMEL
config SPI_BCM2835
tristate "BCM2835 SPI controller"
depends on ARCH_BCM2835 || COMPILE_TEST
+ depends on GPIOLIB
help
This selects a driver for the Broadcom BCM2835 SPI master.

--
2.1.0

2015-05-04 22:31:16

by Guenter Roeck

[permalink] [raw]
Subject: [PATCH resend 2/5] mips: Fix SMP builds

Mips SMP builds fail with error messages similar to the following.

arch/mips/kernel/smp.c:211:2: error:
passing argument 2 of 'cpumask_set_cpu' discards 'volatile'
qualifier from pointer target type
arch/mips/kernel/process.c:52:2: error:
passing argument 2 of 'cpumask_test_cpu' discards 'volatile'
qualifier from pointer target type
arch/mips/cavium-octeon/smp.c:242:2: error:
passing argument 2 of 'cpumask_clear_cpu' discards 'volatile'
qualifier from pointer target type

cpu_callin_map is declared as volatile variable, but passed to various
functions with non-volatile arguments. Make it non-volatile and add a
memory barrier at the one location where volatile might be needed.

Fixes: 8dd928915a73 ("mips: fix up obsolete cpu function usage")
Cc: Rusty Russell <[email protected]>
Tested-by: Florian Fainelli <[email protected]>
Tested-by: Aaro Koskinen <[email protected]>
Tested-by: Paul Martin <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
---
Please consider pushing this patch into mainline, or provide feedback
on how to improve it to be acceptable.

arch/mips/include/asm/smp.h | 2 +-
arch/mips/kernel/smp.c | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/mips/include/asm/smp.h b/arch/mips/include/asm/smp.h
index bb02fac9b4fa..2b25d1ba1ea0 100644
--- a/arch/mips/include/asm/smp.h
+++ b/arch/mips/include/asm/smp.h
@@ -45,7 +45,7 @@ extern int __cpu_logical_map[NR_CPUS];
#define SMP_DUMP 0x8
#define SMP_ASK_C0COUNT 0x10

-extern volatile cpumask_t cpu_callin_map;
+extern cpumask_t cpu_callin_map;

/* Mask of CPUs which are currently definitely operating coherently */
extern cpumask_t cpu_coherent_mask;
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index 193ace7955fb..158191394770 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -43,7 +43,7 @@
#include <asm/time.h>
#include <asm/setup.h>

-volatile cpumask_t cpu_callin_map; /* Bitmask of started secondaries */
+cpumask_t cpu_callin_map; /* Bitmask of started secondaries */

int __cpu_number_map[NR_CPUS]; /* Map physical to logical */
EXPORT_SYMBOL(__cpu_number_map);
@@ -218,8 +218,10 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
/*
* Trust is futile. We should really have timeouts ...
*/
- while (!cpumask_test_cpu(cpu, &cpu_callin_map))
+ while (!cpumask_test_cpu(cpu, &cpu_callin_map)) {
udelay(100);
+ mb();
+ }

synchronise_count_master(cpu);
return 0;
--
2.1.0

2015-05-04 22:31:25

by Guenter Roeck

[permalink] [raw]
Subject: [PATCH resend 3/5] xtensa: Provide dummy dma_alloc_attrs() and dma_free_attrs()

xtensa:allmodconfig fails to build with the following errors.

drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:
In function ‘gk20a_instobj_dtor_dma’:
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:154:2: error:
implicit declaration of function ‘dma_free_attrs’
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:
In function ‘gk20a_instobj_ctor_dma’:
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:218:2: error:
implicit declaration of function ‘dma_alloc_attrs’

Xtensa does not provide those functions at this time.
Provide dummy implementations to avoid build errors.

Acked-by: Max Filippov <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
---
Please consider pushing this patch into mainline, or provide feedback
on how to improve it to be acceptable.

arch/xtensa/include/asm/dma-mapping.h | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/arch/xtensa/include/asm/dma-mapping.h b/arch/xtensa/include/asm/dma-mapping.h
index 172a02a6ad14..ba78ccf651e7 100644
--- a/arch/xtensa/include/asm/dma-mapping.h
+++ b/arch/xtensa/include/asm/dma-mapping.h
@@ -185,4 +185,17 @@ static inline int dma_get_sgtable(struct device *dev, struct sg_table *sgt,
return -EINVAL;
}

+static inline void *dma_alloc_attrs(struct device *dev, size_t size,
+ dma_addr_t *dma_handle, gfp_t flag,
+ struct dma_attrs *attrs)
+{
+ return NULL;
+}
+
+static inline void dma_free_attrs(struct device *dev, size_t size,
+ void *vaddr, dma_addr_t dma_handle,
+ struct dma_attrs *attrs)
+{
+}
+
#endif /* _XTENSA_DMA_MAPPING_H */
--
2.1.0

2015-05-04 22:31:46

by Guenter Roeck

[permalink] [raw]
Subject: [PATCH resend 4/5] score: Fix exception handler label

The latest version of modinfo fails to compile score architecture
targets with the following error.

FATAL: The relocation at __ex_table+0x634 references
section "__ex_table" which is not executable, IOW
the kernel will fault if it ever tries to
jump to it. Something is seriously wrong
and should be fixed.

The probem is caused by a bad label in an __ex_table entry.

Cc: Quentin Casasnovas <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
---
Please consider pushing this patch into mainline, or provide feedback
on how to improve it to be acceptable.

arch/score/lib/string.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/score/lib/string.S b/arch/score/lib/string.S
index 00b7d3a2fc60..16efa3ad037f 100644
--- a/arch/score/lib/string.S
+++ b/arch/score/lib/string.S
@@ -175,10 +175,10 @@ ENTRY(__clear_user)
br r3

.section .fixup, "ax"
+99:
br r3
.previous
.section __ex_table, "a"
.align 2
-99:
.word 0b, 99b
.previous
--
2.1.0

2015-05-04 22:32:00

by Guenter Roeck

[permalink] [raw]
Subject: [PATCH resend 5/5] blackfin: Fix build error

Fix

include/asm-generic/io.h: In function 'readb':
include/asm-generic/io.h:113:2: error:
implicit declaration of function 'bfin_read8'
include/asm-generic/io.h: In function 'readw':
include/asm-generic/io.h:121:2: error:
implicit declaration of function 'bfin_read16'
include/asm-generic/io.h: In function 'readl':
include/asm-generic/io.h:129:2: error:
implicit declaration of function 'bfin_read32'
include/asm-generic/io.h: In function 'writeb':
include/asm-generic/io.h:147:2: error:
implicit declaration of function 'bfin_write8'
include/asm-generic/io.h: In function 'writew':
include/asm-generic/io.h:155:2: error:
implicit declaration of function 'bfin_write16'
include/asm-generic/io.h: In function 'writel':
include/asm-generic/io.h:163:2: error:
implicit declaration of function 'bfin_write32'

Reported-by: Geert Uytterhoeven <[email protected]>
Fixes: 1a3372bc522ef ("blackfin: io: define __raw_readx/writex with
bfin_readx/writex")
Cc: Steven Miao <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
---
Please consider pushing this patch into mainline, or provide feedback
on how to improve it to be acceptable.

arch/blackfin/include/asm/io.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/blackfin/include/asm/io.h b/arch/blackfin/include/asm/io.h
index 4e8ad0523118..6abebe82d4e9 100644
--- a/arch/blackfin/include/asm/io.h
+++ b/arch/blackfin/include/asm/io.h
@@ -10,6 +10,7 @@
#include <linux/compiler.h>
#include <linux/types.h>
#include <asm/byteorder.h>
+#include <asm/def_LPBlackfin.h>

#define __raw_readb bfin_read8
#define __raw_readw bfin_read16
--
2.1.0

2015-05-04 22:35:49

by Chris Zankel

[permalink] [raw]
Subject: Re: [PATCH resend 3/5] xtensa: Provide dummy dma_alloc_attrs() and dma_free_attrs()

Hi Guenter,

Sorry for the delay. Will work on it later today or tomorrow.

Thanks,
-Chris


On Mon, May 4, 2015 at 3:30 PM, Guenter Roeck <[email protected]> wrote:
> xtensa:allmodconfig fails to build with the following errors.
>
> drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:
> In function ‘gk20a_instobj_dtor_dma’:
> drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:154:2: error:
> implicit declaration of function ‘dma_free_attrs’
> drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:
> In function ‘gk20a_instobj_ctor_dma’:
> drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:218:2: error:
> implicit declaration of function ‘dma_alloc_attrs’
>
> Xtensa does not provide those functions at this time.
> Provide dummy implementations to avoid build errors.
>
> Acked-by: Max Filippov <[email protected]>
> Signed-off-by: Guenter Roeck <[email protected]>
> ---
> Please consider pushing this patch into mainline, or provide feedback
> on how to improve it to be acceptable.
>
> arch/xtensa/include/asm/dma-mapping.h | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/arch/xtensa/include/asm/dma-mapping.h b/arch/xtensa/include/asm/dma-mapping.h
> index 172a02a6ad14..ba78ccf651e7 100644
> --- a/arch/xtensa/include/asm/dma-mapping.h
> +++ b/arch/xtensa/include/asm/dma-mapping.h
> @@ -185,4 +185,17 @@ static inline int dma_get_sgtable(struct device *dev, struct sg_table *sgt,
> return -EINVAL;
> }
>
> +static inline void *dma_alloc_attrs(struct device *dev, size_t size,
> + dma_addr_t *dma_handle, gfp_t flag,
> + struct dma_attrs *attrs)
> +{
> + return NULL;
> +}
> +
> +static inline void dma_free_attrs(struct device *dev, size_t size,
> + void *vaddr, dma_addr_t dma_handle,
> + struct dma_attrs *attrs)
> +{
> +}
> +
> #endif /* _XTENSA_DMA_MAPPING_H */
> --
> 2.1.0
>

2015-05-04 23:34:43

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH resend 1/5] spi: bcm2835: Add GPIOLIB dependency

On Mon, May 04, 2015 at 03:30:45PM -0700, Guenter Roeck wrote:
> Fix:
>
> drivers/spi/spi-bcm2835.c: In function 'chip_match_name':
> drivers/spi/spi-bcm2835.c:356:21: error:

This duplicates a patch someone else sent.


Attachments:
(No filename) (220.00 B)
signature.asc (473.00 B)
Digital signature
Download all attachments

2015-05-05 00:02:58

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH resend 1/5] spi: bcm2835: Add GPIOLIB dependency

On 05/04/2015 04:34 PM, Mark Brown wrote:
> On Mon, May 04, 2015 at 03:30:45PM -0700, Guenter Roeck wrote:
>> Fix:
>>
>> drivers/spi/spi-bcm2835.c: In function 'chip_match_name':
>> drivers/spi/spi-bcm2835.c:356:21: error:
>
> This duplicates a patch someone else sent.
>

Hi Mark,

not that it matters, but this is the patch in linux-next.

I am aware that several other patches have been submitted to fix the
problem (I think I have seen at least two); after all, I submitted the
patch some three weeks ago, and many others are affected by it. I don't
really care which one of the submitted patches is applied to mainline,
as long as the problem is getting fixed.

Repeating my comment from the patch,

"Yes, I know, this patch is in -next. Please see this e-mail as gentle reminder
to consider pushing it (or one of the other patches fixing the same problem)
into mainline."

Thanks,
Guenter

2015-05-05 02:01:40

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH resend 1/5] spi: bcm2835: Add GPIOLIB dependency

On 05/04/2015 05:02 PM, Guenter Roeck wrote:
> On 05/04/2015 04:34 PM, Mark Brown wrote:
>> On Mon, May 04, 2015 at 03:30:45PM -0700, Guenter Roeck wrote:
>>> Fix:
>>>
>>> drivers/spi/spi-bcm2835.c: In function 'chip_match_name':
>>> drivers/spi/spi-bcm2835.c:356:21: error:
>>
>> This duplicates a patch someone else sent.
>>
>
> Hi Mark,
>
> not that it matters, but this is the patch in linux-next.
>
> I am aware that several other patches have been submitted to fix the
> problem (I think I have seen at least two); after all, I submitted the
> patch some three weeks ago, and many others are affected by it. I don't
> really care which one of the submitted patches is applied to mainline,
> as long as the problem is getting fixed.
>
> Repeating my comment from the patch,
>
> "Yes, I know, this patch is in -next. Please see this e-mail as gentle reminder
> to consider pushing it (or one of the other patches fixing the same problem)
> into mainline."
>

Follow-up: Since you accepted one of the other patches, please make sure
to remove my patch from your -next branch; otherwise we might end up
with dual "depends on GPIOLIB".

Thanks,
Guenter

2015-05-05 10:28:45

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH resend 1/5] spi: bcm2835: Add GPIOLIB dependency

On Mon, May 04, 2015 at 05:02:28PM -0700, Guenter Roeck wrote:

> I am aware that several other patches have been submitted to fix the
> problem (I think I have seen at least two); after all, I submitted the
> patch some three weeks ago, and many others are affected by it. I don't
> really care which one of the submitted patches is applied to mainline,
> as long as the problem is getting fixed.

So, the way to do this is to follow up on one of the existing patches.

> Repeating my comment from the patch,

> "Yes, I know, this patch is in -next. Please see this e-mail as gentle reminder
> to consider pushing it (or one of the other patches fixing the same problem)
> into mainline."

Why would I even read that far into the patch? It's patch 1 of a
series, it looks like someone's just blindly sending old stuff.


Attachments:
(No filename) (821.00 B)
signature.asc (473.00 B)
Digital signature
Download all attachments

2015-05-05 11:17:05

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH resend 1/5] spi: bcm2835: Add GPIOLIB dependency

On Mon, May 04, 2015 at 07:00:55PM -0700, Guenter Roeck wrote:
> On 05/04/2015 05:02 PM, Guenter Roeck wrote:

> >not that it matters, but this is the patch in linux-next.

> >I am aware that several other patches have been submitted to fix the
> >problem (I think I have seen at least two); after all, I submitted the

> Follow-up: Since you accepted one of the other patches, please make sure
> to remove my patch from your -next branch; otherwise we might end up
> with dual "depends on GPIOLIB".

*sigh* So, what you're asking me to do here is remove the one that's
actually been applied as a bugfix for Linus. Are you *sure* that's what
you think that's a good idea?


Attachments:
(No filename) (674.00 B)
signature.asc (473.00 B)
Digital signature
Download all attachments

2015-05-05 11:32:21

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH resend 1/5] spi: bcm2835: Add GPIOLIB dependency

Hi Mark,

On Tue, May 5, 2015 at 1:16 PM, Mark Brown <[email protected]> wrote:
> On Mon, May 04, 2015 at 07:00:55PM -0700, Guenter Roeck wrote:
>> On 05/04/2015 05:02 PM, Guenter Roeck wrote:
>
>> >not that it matters, but this is the patch in linux-next.
>
>> >I am aware that several other patches have been submitted to fix the
>> >problem (I think I have seen at least two); after all, I submitted the
>
>> Follow-up: Since you accepted one of the other patches, please make sure
>> to remove my patch from your -next branch; otherwise we might end up
>> with dual "depends on GPIOLIB".
>
> *sigh* So, what you're asking me to do here is remove the one that's
> actually been applied as a bugfix for Linus. Are you *sure* that's what
> you think that's a good idea?

spi.git/for-next now has two fixes for the same issue, from him (April 13),
and from Sato-san (May 4):
- 8844d0f1cb921f70c ("spi: bcm2835: Add GPIOLIB dependency")
- e0d58cdcaedd90e4 ("spi: bcm2835: depends GPIOLIB")

Git merged them "nicely" when you merged 'spi/topic/bcm2835' into
'spi-next', leading to this chunk in drivers/spi/Kconfig:

config SPI_BCM2835
tristate "BCM2835 SPI controller"
depends on GPIOLIB
depends on ARCH_BCM2835 || COMPILE_TEST
depends on GPIOLIB

I think Günter wants you to keep only the commit you will send to Linus
for v4.1-rc3, and remove the other commit.

Thanks!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2015-05-05 11:40:29

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH resend 1/5] spi: bcm2835: Add GPIOLIB dependency

On Tue, May 05, 2015 at 01:32:12PM +0200, Geert Uytterhoeven wrote:

> I think G?nter wants you to keep only the commit you will send to Linus
> for v4.1-rc3, and remove the other commit.

Yes, I know that's the *sensible* thing to do (hence why I was asking if
he really meant what he asked for).


Attachments:
(No filename) (298.00 B)
signature.asc (473.00 B)
Digital signature
Download all attachments

2015-05-06 02:00:46

by Lennox Wu

[permalink] [raw]
Subject: Re: [PATCH resend 4/5] score: Fix exception handler label

Hi Roeck,
You are right! I will push the patch.
Thank you.

Acked-by: Lennox Wu <[email protected]>

2015-05-05 6:30 GMT+08:00 Guenter Roeck <[email protected]>:
> The latest version of modinfo fails to compile score architecture
> targets with the following error.
>
> FATAL: The relocation at __ex_table+0x634 references
> section "__ex_table" which is not executable, IOW
> the kernel will fault if it ever tries to
> jump to it. Something is seriously wrong
> and should be fixed.
>
> The probem is caused by a bad label in an __ex_table entry.
>
> Cc: Quentin Casasnovas <[email protected]>
> Signed-off-by: Guenter Roeck <[email protected]>
> ---
> Please consider pushing this patch into mainline, or provide feedback
> on how to improve it to be acceptable.
>
> arch/score/lib/string.S | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/score/lib/string.S b/arch/score/lib/string.S
> index 00b7d3a2fc60..16efa3ad037f 100644
> --- a/arch/score/lib/string.S
> +++ b/arch/score/lib/string.S
> @@ -175,10 +175,10 @@ ENTRY(__clear_user)
> br r3
>
> .section .fixup, "ax"
> +99:
> br r3
> .previous
> .section __ex_table, "a"
> .align 2
> -99:
> .word 0b, 99b
> .previous
> --
> 2.1.0
>

2015-05-06 09:15:54

by Steven Miao

[permalink] [raw]
Subject: Re: [PATCH resend 5/5] blackfin: Fix build error

Applied. Thanks!

On Tue, May 5, 2015 at 6:30 AM, Guenter Roeck <[email protected]> wrote:
> Fix
>
> include/asm-generic/io.h: In function 'readb':
> include/asm-generic/io.h:113:2: error:
> implicit declaration of function 'bfin_read8'
> include/asm-generic/io.h: In function 'readw':
> include/asm-generic/io.h:121:2: error:
> implicit declaration of function 'bfin_read16'
> include/asm-generic/io.h: In function 'readl':
> include/asm-generic/io.h:129:2: error:
> implicit declaration of function 'bfin_read32'
> include/asm-generic/io.h: In function 'writeb':
> include/asm-generic/io.h:147:2: error:
> implicit declaration of function 'bfin_write8'
> include/asm-generic/io.h: In function 'writew':
> include/asm-generic/io.h:155:2: error:
> implicit declaration of function 'bfin_write16'
> include/asm-generic/io.h: In function 'writel':
> include/asm-generic/io.h:163:2: error:
> implicit declaration of function 'bfin_write32'
>
> Reported-by: Geert Uytterhoeven <[email protected]>
> Fixes: 1a3372bc522ef ("blackfin: io: define __raw_readx/writex with
> bfin_readx/writex")
> Cc: Steven Miao <[email protected]>
> Signed-off-by: Guenter Roeck <[email protected]>
> ---
> Please consider pushing this patch into mainline, or provide feedback
> on how to improve it to be acceptable.
>
> arch/blackfin/include/asm/io.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/blackfin/include/asm/io.h b/arch/blackfin/include/asm/io.h
> index 4e8ad0523118..6abebe82d4e9 100644
> --- a/arch/blackfin/include/asm/io.h
> +++ b/arch/blackfin/include/asm/io.h
> @@ -10,6 +10,7 @@
> #include <linux/compiler.h>
> #include <linux/types.h>
> #include <asm/byteorder.h>
> +#include <asm/def_LPBlackfin.h>
>
> #define __raw_readb bfin_read8
> #define __raw_readw bfin_read16
> --
> 2.1.0
>

2015-05-23 04:24:22

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH resend 3/5] xtensa: Provide dummy dma_alloc_attrs() and dma_free_attrs()

On 05/04/2015 03:35 PM, Chris Zankel wrote:
> Hi Guenter,
>
> Sorry for the delay. Will work on it later today or tomorrow.
>
Hi Chris,

I see this patch in -next, but still not in mainline.
Are you planning to send it to Linus anytime soon ?

Thanks,
Guenter

> Thanks,
> -Chris
>
>
> On Mon, May 4, 2015 at 3:30 PM, Guenter Roeck <[email protected]> wrote:
>> xtensa:allmodconfig fails to build with the following errors.
>>
>> drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:
>> In function ‘gk20a_instobj_dtor_dma’:
>> drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:154:2: error:
>> implicit declaration of function ‘dma_free_attrs’
>> drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:
>> In function ‘gk20a_instobj_ctor_dma’:
>> drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:218:2: error:
>> implicit declaration of function ‘dma_alloc_attrs’
>>
>> Xtensa does not provide those functions at this time.
>> Provide dummy implementations to avoid build errors.
>>
>> Acked-by: Max Filippov <[email protected]>
>> Signed-off-by: Guenter Roeck <[email protected]>
>> ---
>> Please consider pushing this patch into mainline, or provide feedback
>> on how to improve it to be acceptable.
>>
>> arch/xtensa/include/asm/dma-mapping.h | 13 +++++++++++++
>> 1 file changed, 13 insertions(+)
>>
>> diff --git a/arch/xtensa/include/asm/dma-mapping.h b/arch/xtensa/include/asm/dma-mapping.h
>> index 172a02a6ad14..ba78ccf651e7 100644
>> --- a/arch/xtensa/include/asm/dma-mapping.h
>> +++ b/arch/xtensa/include/asm/dma-mapping.h
>> @@ -185,4 +185,17 @@ static inline int dma_get_sgtable(struct device *dev, struct sg_table *sgt,
>> return -EINVAL;
>> }
>>
>> +static inline void *dma_alloc_attrs(struct device *dev, size_t size,
>> + dma_addr_t *dma_handle, gfp_t flag,
>> + struct dma_attrs *attrs)
>> +{
>> + return NULL;
>> +}
>> +
>> +static inline void dma_free_attrs(struct device *dev, size_t size,
>> + void *vaddr, dma_addr_t dma_handle,
>> + struct dma_attrs *attrs)
>> +{
>> +}
>> +
>> #endif /* _XTENSA_DMA_MAPPING_H */
>> --
>> 2.1.0
>>
>

2015-05-23 04:24:44

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH resend 4/5] score: Fix exception handler label

On 05/04/2015 03:30 PM, Guenter Roeck wrote:
> The latest version of modinfo fails to compile score architecture
> targets with the following error.
>
> FATAL: The relocation at __ex_table+0x634 references
> section "__ex_table" which is not executable, IOW
> the kernel will fault if it ever tries to
> jump to it. Something is seriously wrong
> and should be fixed.
>
> The probem is caused by a bad label in an __ex_table entry.
>
> Cc: Quentin Casasnovas <[email protected]>
> Signed-off-by: Guenter Roeck <[email protected]>
> ---
> Please consider pushing this patch into mainline, or provide feedback
> on how to improve it to be acceptable.
>
ping ... still not in mainline.

Thanks,
Guenter

> arch/score/lib/string.S | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/score/lib/string.S b/arch/score/lib/string.S
> index 00b7d3a2fc60..16efa3ad037f 100644
> --- a/arch/score/lib/string.S
> +++ b/arch/score/lib/string.S
> @@ -175,10 +175,10 @@ ENTRY(__clear_user)
> br r3
>
> .section .fixup, "ax"
> +99:
> br r3
> .previous
> .section __ex_table, "a"
> .align 2
> -99:
> .word 0b, 99b
> .previous
>

2015-05-23 04:25:36

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH resend 5/5] blackfin: Fix build error

ping ....

On 05/04/2015 03:30 PM, Guenter Roeck wrote:
> Fix
>
> include/asm-generic/io.h: In function 'readb':
> include/asm-generic/io.h:113:2: error:
> implicit declaration of function 'bfin_read8'
> include/asm-generic/io.h: In function 'readw':
> include/asm-generic/io.h:121:2: error:
> implicit declaration of function 'bfin_read16'
> include/asm-generic/io.h: In function 'readl':
> include/asm-generic/io.h:129:2: error:
> implicit declaration of function 'bfin_read32'
> include/asm-generic/io.h: In function 'writeb':
> include/asm-generic/io.h:147:2: error:
> implicit declaration of function 'bfin_write8'
> include/asm-generic/io.h: In function 'writew':
> include/asm-generic/io.h:155:2: error:
> implicit declaration of function 'bfin_write16'
> include/asm-generic/io.h: In function 'writel':
> include/asm-generic/io.h:163:2: error:
> implicit declaration of function 'bfin_write32'
>
> Reported-by: Geert Uytterhoeven <[email protected]>
> Fixes: 1a3372bc522ef ("blackfin: io: define __raw_readx/writex with
> bfin_readx/writex")
> Cc: Steven Miao <[email protected]>
> Signed-off-by: Guenter Roeck <[email protected]>
> ---
> Please consider pushing this patch into mainline, or provide feedback
> on how to improve it to be acceptable.
>
> arch/blackfin/include/asm/io.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/blackfin/include/asm/io.h b/arch/blackfin/include/asm/io.h
> index 4e8ad0523118..6abebe82d4e9 100644
> --- a/arch/blackfin/include/asm/io.h
> +++ b/arch/blackfin/include/asm/io.h
> @@ -10,6 +10,7 @@
> #include <linux/compiler.h>
> #include <linux/types.h>
> #include <asm/byteorder.h>
> +#include <asm/def_LPBlackfin.h>
>
> #define __raw_readb bfin_read8
> #define __raw_readw bfin_read16
>

2015-05-25 14:56:54

by Lennox Wu

[permalink] [raw]
Subject: Re: [PATCH resend 4/5] score: Fix exception handler label

I will issue a pull request in this week.

Best,
Lennox

2015-05-23 12:24 GMT+08:00 Guenter Roeck <[email protected]>:
> On 05/04/2015 03:30 PM, Guenter Roeck wrote:
>>
>> The latest version of modinfo fails to compile score architecture
>> targets with the following error.
>>
>> FATAL: The relocation at __ex_table+0x634 references
>> section "__ex_table" which is not executable, IOW
>> the kernel will fault if it ever tries to
>> jump to it. Something is seriously wrong
>> and should be fixed.
>>
>> The probem is caused by a bad label in an __ex_table entry.
>>
>> Cc: Quentin Casasnovas <[email protected]>
>> Signed-off-by: Guenter Roeck <[email protected]>
>> ---
>> Please consider pushing this patch into mainline, or provide feedback
>> on how to improve it to be acceptable.
>>
> ping ... still not in mainline.
>
> Thanks,
> Guenter
>
>
>> arch/score/lib/string.S | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/score/lib/string.S b/arch/score/lib/string.S
>> index 00b7d3a2fc60..16efa3ad037f 100644
>> --- a/arch/score/lib/string.S
>> +++ b/arch/score/lib/string.S
>> @@ -175,10 +175,10 @@ ENTRY(__clear_user)
>> br r3
>>
>> .section .fixup, "ax"
>> +99:
>> br r3
>> .previous
>> .section __ex_table, "a"
>> .align 2
>> -99:
>> .word 0b, 99b
>> .previous
>>
>