linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] RISC-V: Fixes for clean allmodconfig build
@ 2017-11-30  1:55 Olof Johansson
  2017-11-30  1:55 ` [PATCH 01/10] RISC-V: use generic serial.h Olof Johansson
                   ` (10 more replies)
  0 siblings, 11 replies; 18+ messages in thread
From: Olof Johansson @ 2017-11-30  1:55 UTC (permalink / raw)
  To: Palmer Dabbelt; +Cc: Albert Ou, patches, linux-kernel

Hi,

Here's a short series of patches that produces a working
allmodconfig. Would be nice to see them go in so we can add build
coverage.

One is for input subsystem, the list of if defined() there isn't ideal
but it's already pretty bad. Dmitry, do you want to pick that one up?


-Olof

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 01/10] RISC-V: use generic serial.h
  2017-11-30  1:55 [PATCH 00/10] RISC-V: Fixes for clean allmodconfig build Olof Johansson
@ 2017-11-30  1:55 ` Olof Johansson
  2017-11-30  1:55 ` [PATCH 02/10] RISC-V: use RISCV_{INT,SHORT} instead of {INT,SHORT} for asm macros Olof Johansson
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 18+ messages in thread
From: Olof Johansson @ 2017-11-30  1:55 UTC (permalink / raw)
  To: Palmer Dabbelt; +Cc: Albert Ou, patches, linux-kernel, Olof Johansson

Fixes this from allmodconfig:

drivers/tty/serial/earlycon.c:27:10: fatal error: asm/serial.h: No such file or directory

Signed-off-by: Olof Johansson <olof@lixom.net>
---
 arch/riscv/include/asm/Kbuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/riscv/include/asm/Kbuild b/arch/riscv/include/asm/Kbuild
index 18158be..970460a 100644
--- a/arch/riscv/include/asm/Kbuild
+++ b/arch/riscv/include/asm/Kbuild
@@ -40,6 +40,7 @@ generic-y += resource.h
 generic-y += scatterlist.h
 generic-y += sections.h
 generic-y += sembuf.h
+generic-y += serial.h
 generic-y += setup.h
 generic-y += shmbuf.h
 generic-y += shmparam.h
-- 
2.8.6

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 02/10] RISC-V: use RISCV_{INT,SHORT} instead of {INT,SHORT} for asm macros
  2017-11-30  1:55 [PATCH 00/10] RISC-V: Fixes for clean allmodconfig build Olof Johansson
  2017-11-30  1:55 ` [PATCH 01/10] RISC-V: use generic serial.h Olof Johansson
@ 2017-11-30  1:55 ` Olof Johansson
  2017-11-30  1:55 ` [PATCH 03/10] RISC-V: io.h: type fixes for warnings Olof Johansson
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 18+ messages in thread
From: Olof Johansson @ 2017-11-30  1:55 UTC (permalink / raw)
  To: Palmer Dabbelt; +Cc: Albert Ou, patches, linux-kernel, Olof Johansson

INT and SHORT are used by some drivers that pull in the include files,
so prefixing helps avoid namespace conflicts. Other constructs in the
same file already uses this.

Fixes, among others, these warnings with allmodconfig:

../sound/core/pcm_misc.c:43:0: warning: "INT" redefined
 #define INT __force int

Signed-off-by: Olof Johansson <olof@lixom.net>
---
 arch/riscv/include/asm/asm.h | 12 ++++++------
 arch/riscv/include/asm/bug.h |  6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/riscv/include/asm/asm.h b/arch/riscv/include/asm/asm.h
index 6cbbb6a..5ad4cb6 100644
--- a/arch/riscv/include/asm/asm.h
+++ b/arch/riscv/include/asm/asm.h
@@ -58,17 +58,17 @@
 #endif
 
 #if (__SIZEOF_INT__ == 4)
-#define INT		__ASM_STR(.word)
-#define SZINT		__ASM_STR(4)
-#define LGINT		__ASM_STR(2)
+#define RISCV_INT		__ASM_STR(.word)
+#define RISCV_SZINT		__ASM_STR(4)
+#define RISCV_LGINT		__ASM_STR(2)
 #else
 #error "Unexpected __SIZEOF_INT__"
 #endif
 
 #if (__SIZEOF_SHORT__ == 2)
-#define SHORT		__ASM_STR(.half)
-#define SZSHORT		__ASM_STR(2)
-#define LGSHORT		__ASM_STR(1)
+#define RISCV_SHORT		__ASM_STR(.half)
+#define RISCV_SZSHORT		__ASM_STR(2)
+#define RISCV_LGSHORT		__ASM_STR(1)
 #else
 #error "Unexpected __SIZEOF_SHORT__"
 #endif
diff --git a/arch/riscv/include/asm/bug.h b/arch/riscv/include/asm/bug.h
index c3e1376..bfc7f09 100644
--- a/arch/riscv/include/asm/bug.h
+++ b/arch/riscv/include/asm/bug.h
@@ -27,8 +27,8 @@
 typedef u32 bug_insn_t;
 
 #ifdef CONFIG_GENERIC_BUG_RELATIVE_POINTERS
-#define __BUG_ENTRY_ADDR	INT " 1b - 2b"
-#define __BUG_ENTRY_FILE	INT " %0 - 2b"
+#define __BUG_ENTRY_ADDR	RISCV_INT " 1b - 2b"
+#define __BUG_ENTRY_FILE	RISCV_INT " %0 - 2b"
 #else
 #define __BUG_ENTRY_ADDR	RISCV_PTR " 1b"
 #define __BUG_ENTRY_FILE	RISCV_PTR " %0"
@@ -38,7 +38,7 @@ typedef u32 bug_insn_t;
 #define __BUG_ENTRY			\
 	__BUG_ENTRY_ADDR "\n\t"		\
 	__BUG_ENTRY_FILE "\n\t"		\
-	SHORT " %1"
+	RISCV_SHORT " %1"
 #else
 #define __BUG_ENTRY			\
 	__BUG_ENTRY_ADDR
-- 
2.8.6

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 03/10] RISC-V: io.h: type fixes for warnings
  2017-11-30  1:55 [PATCH 00/10] RISC-V: Fixes for clean allmodconfig build Olof Johansson
  2017-11-30  1:55 ` [PATCH 01/10] RISC-V: use generic serial.h Olof Johansson
  2017-11-30  1:55 ` [PATCH 02/10] RISC-V: use RISCV_{INT,SHORT} instead of {INT,SHORT} for asm macros Olof Johansson
@ 2017-11-30  1:55 ` Olof Johansson
  2017-11-30  1:55 ` [PATCH 04/10] RISC-V: move empty_zero_page definition to C and export it Olof Johansson
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 18+ messages in thread
From: Olof Johansson @ 2017-11-30  1:55 UTC (permalink / raw)
  To: Palmer Dabbelt; +Cc: Albert Ou, patches, linux-kernel, Olof Johansson

include <linux/types.h> for __iomem definition. Also, add volatile to
iounmap() like other architectures have it to avoid "discarding
volatile" warnings from some drivers.

Finally, explicitly promote the base address for INB/OUTB functions to
avoid some old legacy drivers complaining about int-to-ptr promotions.
The drivers are unlikely to work but they're included in allmodconfig
so the warnings are noisy.

Fixes, among other warnings, these with allmodconfig:

../arch/riscv/include/asm/io.h:24:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
 extern void __iomem *ioremap(phys_addr_t offset, unsigned long size);

sound/pci/echoaudio/echoaudio.c: In function 'snd_echo_free':
sound/pci/echoaudio/echoaudio.c:1879:10: warning: passing argument 1 of 'iounmap' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]

Signed-off-by: Olof Johansson <olof@lixom.net>
---
 arch/riscv/include/asm/io.h | 16 +++++++++-------
 arch/riscv/mm/ioremap.c     |  2 +-
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/arch/riscv/include/asm/io.h b/arch/riscv/include/asm/io.h
index c1f32cf..2a5c7c3 100644
--- a/arch/riscv/include/asm/io.h
+++ b/arch/riscv/include/asm/io.h
@@ -19,6 +19,8 @@
 #ifndef _ASM_RISCV_IO_H
 #define _ASM_RISCV_IO_H
 
+#include <linux/types.h>
+
 #ifdef CONFIG_MMU
 
 extern void __iomem *ioremap(phys_addr_t offset, unsigned long size);
@@ -32,7 +34,7 @@ extern void __iomem *ioremap(phys_addr_t offset, unsigned long size);
 #define ioremap_wc(addr, size) ioremap((addr), (size))
 #define ioremap_wt(addr, size) ioremap((addr), (size))
 
-extern void iounmap(void __iomem *addr);
+extern void iounmap(volatile void __iomem *addr);
 
 #endif /* CONFIG_MMU */
 
@@ -266,9 +268,9 @@ __io_reads_ins(reads, u32, l, __io_br(), __io_ar())
 __io_reads_ins(ins,  u8, b, __io_pbr(), __io_par())
 __io_reads_ins(ins, u16, w, __io_pbr(), __io_par())
 __io_reads_ins(ins, u32, l, __io_pbr(), __io_par())
-#define insb(addr, buffer, count) __insb((void __iomem *)addr, buffer, count)
-#define insw(addr, buffer, count) __insw((void __iomem *)addr, buffer, count)
-#define insl(addr, buffer, count) __insl((void __iomem *)addr, buffer, count)
+#define insb(addr, buffer, count) __insb((void __iomem *)(long)addr, buffer, count)
+#define insw(addr, buffer, count) __insw((void __iomem *)(long)addr, buffer, count)
+#define insl(addr, buffer, count) __insl((void __iomem *)(long)addr, buffer, count)
 
 __io_writes_outs(writes,  u8, b, __io_bw(), __io_aw())
 __io_writes_outs(writes, u16, w, __io_bw(), __io_aw())
@@ -280,9 +282,9 @@ __io_writes_outs(writes, u32, l, __io_bw(), __io_aw())
 __io_writes_outs(outs,  u8, b, __io_pbw(), __io_paw())
 __io_writes_outs(outs, u16, w, __io_pbw(), __io_paw())
 __io_writes_outs(outs, u32, l, __io_pbw(), __io_paw())
-#define outsb(addr, buffer, count) __outsb((void __iomem *)addr, buffer, count)
-#define outsw(addr, buffer, count) __outsw((void __iomem *)addr, buffer, count)
-#define outsl(addr, buffer, count) __outsl((void __iomem *)addr, buffer, count)
+#define outsb(addr, buffer, count) __outsb((void __iomem *)(long)addr, buffer, count)
+#define outsw(addr, buffer, count) __outsw((void __iomem *)(long)addr, buffer, count)
+#define outsl(addr, buffer, count) __outsl((void __iomem *)(long)addr, buffer, count)
 
 #ifdef CONFIG_64BIT
 __io_reads_ins(reads, u64, q, __io_br(), __io_ar())
diff --git a/arch/riscv/mm/ioremap.c b/arch/riscv/mm/ioremap.c
index e99194a4..70ef272 100644
--- a/arch/riscv/mm/ioremap.c
+++ b/arch/riscv/mm/ioremap.c
@@ -85,7 +85,7 @@ EXPORT_SYMBOL(ioremap);
  *
  * Caller must ensure there is only one unmapping for the same pointer.
  */
-void iounmap(void __iomem *addr)
+void iounmap(volatile void __iomem *addr)
 {
 	vunmap((void *)((unsigned long)addr & PAGE_MASK));
 }
-- 
2.8.6

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 04/10] RISC-V: move empty_zero_page definition to C and export it
  2017-11-30  1:55 [PATCH 00/10] RISC-V: Fixes for clean allmodconfig build Olof Johansson
                   ` (2 preceding siblings ...)
  2017-11-30  1:55 ` [PATCH 03/10] RISC-V: io.h: type fixes for warnings Olof Johansson
@ 2017-11-30  1:55 ` Olof Johansson
  2017-11-30  1:55 ` [PATCH 05/10] RISC-V: Export some expected symbols for modules Olof Johansson
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 18+ messages in thread
From: Olof Johansson @ 2017-11-30  1:55 UTC (permalink / raw)
  To: Palmer Dabbelt; +Cc: Albert Ou, patches, linux-kernel, Olof Johansson

Needed by some modules (exported by other architectures).

Signed-off-by: Olof Johansson <olof@lixom.net>
---
 arch/riscv/kernel/head.S  | 3 ---
 arch/riscv/kernel/setup.c | 3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S
index 76af908..78f670d 100644
--- a/arch/riscv/kernel/head.S
+++ b/arch/riscv/kernel/head.S
@@ -152,6 +152,3 @@ END(_start)
 __PAGE_ALIGNED_BSS
 	/* Empty zero page */
 	.balign PAGE_SIZE
-ENTRY(empty_zero_page)
-	.fill (empty_zero_page + PAGE_SIZE) - ., 1, 0x00
-END(empty_zero_page)
diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
index de7db11..4375375 100644
--- a/arch/riscv/kernel/setup.c
+++ b/arch/riscv/kernel/setup.c
@@ -60,6 +60,9 @@ static char __initdata builtin_cmdline[COMMAND_LINE_SIZE] = CONFIG_CMDLINE;
 unsigned long va_pa_offset;
 unsigned long pfn_base;
 
+unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)] __page_aligned_bss;
+EXPORT_SYMBOL(empty_zero_page);
+
 /* The lucky hart to first increment this variable will boot the other cores */
 atomic_t hart_lottery;
 
-- 
2.8.6

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 05/10] RISC-V: Export some expected symbols for modules
  2017-11-30  1:55 [PATCH 00/10] RISC-V: Fixes for clean allmodconfig build Olof Johansson
                   ` (3 preceding siblings ...)
  2017-11-30  1:55 ` [PATCH 04/10] RISC-V: move empty_zero_page definition to C and export it Olof Johansson
@ 2017-11-30  1:55 ` Olof Johansson
  2017-11-30  1:55 ` [PATCH 06/10] RISC-V: Provide stub of setup_profiling_timer() Olof Johansson
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 18+ messages in thread
From: Olof Johansson @ 2017-11-30  1:55 UTC (permalink / raw)
  To: Palmer Dabbelt; +Cc: Albert Ou, patches, linux-kernel, Olof Johansson

These are the ones needed by current allmodconfig, so add them instead
of everything other architectures are exporting -- the rest can be
added on demand later if needed.

Signed-off-by: Olof Johansson <olof@lixom.net>
---
 arch/riscv/kernel/riscv_ksyms.c | 3 +++
 arch/riscv/kernel/setup.c       | 2 ++
 arch/riscv/lib/delay.c          | 1 +
 3 files changed, 6 insertions(+)

diff --git a/arch/riscv/kernel/riscv_ksyms.c b/arch/riscv/kernel/riscv_ksyms.c
index 23cc81e..5517342 100644
--- a/arch/riscv/kernel/riscv_ksyms.c
+++ b/arch/riscv/kernel/riscv_ksyms.c
@@ -12,4 +12,7 @@
 /*
  * Assembly functions that may be used (directly or indirectly) by modules
  */
+EXPORT_SYMBOL(__clear_user);
 EXPORT_SYMBOL(__copy_user);
+EXPORT_SYMBOL(memset);
+EXPORT_SYMBOL(memcpy);
diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
index 4375375..8fbb674 100644
--- a/arch/riscv/kernel/setup.c
+++ b/arch/riscv/kernel/setup.c
@@ -58,7 +58,9 @@ static char __initdata builtin_cmdline[COMMAND_LINE_SIZE] = CONFIG_CMDLINE;
 #endif /* CONFIG_CMDLINE_BOOL */
 
 unsigned long va_pa_offset;
+EXPORT_SYMBOL(va_pa_offset);
 unsigned long pfn_base;
+EXPORT_SYMBOL(pfn_base);
 
 unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)] __page_aligned_bss;
 EXPORT_SYMBOL(empty_zero_page);
diff --git a/arch/riscv/lib/delay.c b/arch/riscv/lib/delay.c
index 1cc4ac3..dce8ae2 100644
--- a/arch/riscv/lib/delay.c
+++ b/arch/riscv/lib/delay.c
@@ -84,6 +84,7 @@ void __delay(unsigned long cycles)
 	while ((unsigned long)(get_cycles() - t0) < cycles)
 		cpu_relax();
 }
+EXPORT_SYMBOL(__delay);
 
 void udelay(unsigned long usecs)
 {
-- 
2.8.6

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 06/10] RISC-V: Provide stub of setup_profiling_timer()
  2017-11-30  1:55 [PATCH 00/10] RISC-V: Fixes for clean allmodconfig build Olof Johansson
                   ` (4 preceding siblings ...)
  2017-11-30  1:55 ` [PATCH 05/10] RISC-V: Export some expected symbols for modules Olof Johansson
@ 2017-11-30  1:55 ` Olof Johansson
  2017-11-30 18:26   ` [patches] " Palmer Dabbelt
  2017-11-30  1:55 ` [PATCH 07/10] RISC-V: Use define for get_cycles like other architectures Olof Johansson
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 18+ messages in thread
From: Olof Johansson @ 2017-11-30  1:55 UTC (permalink / raw)
  To: Palmer Dabbelt; +Cc: Albert Ou, patches, linux-kernel, Olof Johansson

Fixes the following on allmodconfig build:

profile.c:(.text+0x3e4): undefined reference to `setup_profiling_timer'

Signed-off-by: Olof Johansson <olof@lixom.net>
---
 arch/riscv/kernel/smp.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/riscv/kernel/smp.c b/arch/riscv/kernel/smp.c
index b4a71ec..4498f0c 100644
--- a/arch/riscv/kernel/smp.c
+++ b/arch/riscv/kernel/smp.c
@@ -38,6 +38,13 @@ enum ipi_message_type {
 	IPI_MAX
 };
 
+
+/* Unsupported */
+int setup_profiling_timer(unsigned int multiplier)
+{
+	return -EINVAL;
+}
+
 irqreturn_t handle_ipi(void)
 {
 	unsigned long *pending_ipis = &ipi_data[smp_processor_id()].bits;
@@ -108,3 +115,4 @@ void smp_send_reschedule(int cpu)
 {
 	send_ipi_message(cpumask_of(cpu), IPI_RESCHEDULE);
 }
+
-- 
2.8.6

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 07/10] RISC-V: Use define for get_cycles like other architectures
  2017-11-30  1:55 [PATCH 00/10] RISC-V: Fixes for clean allmodconfig build Olof Johansson
                   ` (5 preceding siblings ...)
  2017-11-30  1:55 ` [PATCH 06/10] RISC-V: Provide stub of setup_profiling_timer() Olof Johansson
@ 2017-11-30  1:55 ` Olof Johansson
  2017-11-30  1:55 ` [PATCH 08/10] RISC-V: Set __ARCH_WANT_RENAMEAT to pick up generic version Olof Johansson
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 18+ messages in thread
From: Olof Johansson @ 2017-11-30  1:55 UTC (permalink / raw)
  To: Palmer Dabbelt; +Cc: Albert Ou, patches, linux-kernel, Olof Johansson

Signed-off-by: Olof Johansson <olof@lixom.net>
---
 arch/riscv/include/asm/timex.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/riscv/include/asm/timex.h b/arch/riscv/include/asm/timex.h
index 3df4932..2f26989 100644
--- a/arch/riscv/include/asm/timex.h
+++ b/arch/riscv/include/asm/timex.h
@@ -18,7 +18,7 @@
 
 typedef unsigned long cycles_t;
 
-static inline cycles_t get_cycles(void)
+static inline cycles_t get_cycles_inline(void)
 {
 	cycles_t n;
 
@@ -27,6 +27,7 @@ static inline cycles_t get_cycles(void)
 		: "=r" (n));
 	return n;
 }
+#define get_cycles get_cycles_inline
 
 #ifdef CONFIG_64BIT
 static inline uint64_t get_cycles64(void)
-- 
2.8.6

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 08/10] RISC-V: Set __ARCH_WANT_RENAMEAT to pick up generic version
  2017-11-30  1:55 [PATCH 00/10] RISC-V: Fixes for clean allmodconfig build Olof Johansson
                   ` (6 preceding siblings ...)
  2017-11-30  1:55 ` [PATCH 07/10] RISC-V: Use define for get_cycles like other architectures Olof Johansson
@ 2017-11-30  1:55 ` Olof Johansson
  2017-11-30 18:30   ` Christoph Hellwig
  2017-11-30  1:55 ` [PATCH 09/10] RISC-V: Add missing include Olof Johansson
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 18+ messages in thread
From: Olof Johansson @ 2017-11-30  1:55 UTC (permalink / raw)
  To: Palmer Dabbelt; +Cc: Albert Ou, patches, linux-kernel, Olof Johansson

In file included from ../lib/audit.c:8:0:
../include/asm-generic/audit_dir_write.h:30:1: error: '__NR_renameat' undeclared here (not in a function); did you mean '__NR_renameat2'?

Signed-off-by: Olof Johansson <olof@lixom.net>
---
 arch/riscv/include/asm/unistd.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/riscv/include/asm/unistd.h b/arch/riscv/include/asm/unistd.h
index 9f250ed..b9a22795 100644
--- a/arch/riscv/include/asm/unistd.h
+++ b/arch/riscv/include/asm/unistd.h
@@ -13,4 +13,5 @@
 
 #define __ARCH_HAVE_MMU
 #define __ARCH_WANT_SYS_CLONE
+#define __ARCH_WANT_RENAMEAT
 #include <uapi/asm/unistd.h>
-- 
2.8.6

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 09/10] RISC-V: Add missing include
  2017-11-30  1:55 [PATCH 00/10] RISC-V: Fixes for clean allmodconfig build Olof Johansson
                   ` (7 preceding siblings ...)
  2017-11-30  1:55 ` [PATCH 08/10] RISC-V: Set __ARCH_WANT_RENAMEAT to pick up generic version Olof Johansson
@ 2017-11-30  1:55 ` Olof Johansson
  2017-11-30  1:55 ` [PATCH 10/10] input: joystick: riscv has get_cycles Olof Johansson
  2017-11-30 18:26 ` [patches] [PATCH 00/10] RISC-V: Fixes for clean allmodconfig build Palmer Dabbelt
  10 siblings, 0 replies; 18+ messages in thread
From: Olof Johansson @ 2017-11-30  1:55 UTC (permalink / raw)
  To: Palmer Dabbelt; +Cc: Albert Ou, patches, linux-kernel, Olof Johansson

Fixes:

include/asm-generic/mm_hooks.h:20:11: warning: 'struct vm_area_struct' declared inside parameter list will not be visible outside of this definition or declaration
include/asm-generic/mm_hooks.h:19:38: warning: 'struct mm_struct' declared inside parameter list will not be visible outside of this definition or declaration

Signed-off-by: Olof Johansson <olof@lixom.net>
---
 arch/riscv/include/asm/mmu_context.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/riscv/include/asm/mmu_context.h b/arch/riscv/include/asm/mmu_context.h
index de1fc16..1cd5172 100644
--- a/arch/riscv/include/asm/mmu_context.h
+++ b/arch/riscv/include/asm/mmu_context.h
@@ -14,6 +14,7 @@
 #ifndef _ASM_RISCV_MMU_CONTEXT_H
 #define _ASM_RISCV_MMU_CONTEXT_H
 
+#include <linux/mm_types.h>
 #include <asm-generic/mm_hooks.h>
 
 #include <linux/mm.h>
-- 
2.8.6

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 10/10] input: joystick: riscv has get_cycles
  2017-11-30  1:55 [PATCH 00/10] RISC-V: Fixes for clean allmodconfig build Olof Johansson
                   ` (8 preceding siblings ...)
  2017-11-30  1:55 ` [PATCH 09/10] RISC-V: Add missing include Olof Johansson
@ 2017-11-30  1:55 ` Olof Johansson
  2017-11-30  6:48   ` Dmitry Torokhov
  2017-11-30 18:26 ` [patches] [PATCH 00/10] RISC-V: Fixes for clean allmodconfig build Palmer Dabbelt
  10 siblings, 1 reply; 18+ messages in thread
From: Olof Johansson @ 2017-11-30  1:55 UTC (permalink / raw)
  To: Palmer Dabbelt
  Cc: Albert Ou, patches, linux-kernel, Olof Johansson, Dmitry Torokhov

Fixes:

drivers/input/joystick/analog.c:176:2: warning: #warning Precise timer not defined for this architecture. [-Wcpp]

Signed-off-by: Olof Johansson <olof@lixom.net>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/joystick/analog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c
index 3d8ff09..c868a87 100644
--- a/drivers/input/joystick/analog.c
+++ b/drivers/input/joystick/analog.c
@@ -163,7 +163,7 @@ static unsigned int get_time_pit(void)
 #define GET_TIME(x)	do { x = (unsigned int)rdtsc(); } while (0)
 #define DELTA(x,y)	((y)-(x))
 #define TIME_NAME	"TSC"
-#elif defined(__alpha__) || defined(CONFIG_MN10300) || defined(CONFIG_ARM) || defined(CONFIG_ARM64) || defined(CONFIG_TILE)
+#elif defined(__alpha__) || defined(CONFIG_MN10300) || defined(CONFIG_ARM) || defined(CONFIG_ARM64) || defined(CONFIG_RISCV) || defined(CONFIG_TILE)
 #define GET_TIME(x)	do { x = get_cycles(); } while (0)
 #define DELTA(x,y)	((y)-(x))
 #define TIME_NAME	"get_cycles"
-- 
2.8.6

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 10/10] input: joystick: riscv has get_cycles
  2017-11-30  1:55 ` [PATCH 10/10] input: joystick: riscv has get_cycles Olof Johansson
@ 2017-11-30  6:48   ` Dmitry Torokhov
  0 siblings, 0 replies; 18+ messages in thread
From: Dmitry Torokhov @ 2017-11-30  6:48 UTC (permalink / raw)
  To: Olof Johansson; +Cc: Palmer Dabbelt, Albert Ou, patches, linux-kernel

On Wed, Nov 29, 2017 at 05:55:21PM -0800, Olof Johansson wrote:
> Fixes:
> 
> drivers/input/joystick/analog.c:176:2: warning: #warning Precise timer not defined for this architecture. [-Wcpp]
> 
> Signed-off-by: Olof Johansson <olof@lixom.net>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Applied, thank you.

> ---
>  drivers/input/joystick/analog.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c
> index 3d8ff09..c868a87 100644
> --- a/drivers/input/joystick/analog.c
> +++ b/drivers/input/joystick/analog.c
> @@ -163,7 +163,7 @@ static unsigned int get_time_pit(void)
>  #define GET_TIME(x)	do { x = (unsigned int)rdtsc(); } while (0)
>  #define DELTA(x,y)	((y)-(x))
>  #define TIME_NAME	"TSC"
> -#elif defined(__alpha__) || defined(CONFIG_MN10300) || defined(CONFIG_ARM) || defined(CONFIG_ARM64) || defined(CONFIG_TILE)
> +#elif defined(__alpha__) || defined(CONFIG_MN10300) || defined(CONFIG_ARM) || defined(CONFIG_ARM64) || defined(CONFIG_RISCV) || defined(CONFIG_TILE)
>  #define GET_TIME(x)	do { x = get_cycles(); } while (0)
>  #define DELTA(x,y)	((y)-(x))
>  #define TIME_NAME	"get_cycles"
> -- 
> 2.8.6
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [patches] [PATCH 06/10] RISC-V: Provide stub of setup_profiling_timer()
  2017-11-30  1:55 ` [PATCH 06/10] RISC-V: Provide stub of setup_profiling_timer() Olof Johansson
@ 2017-11-30 18:26   ` Palmer Dabbelt
  0 siblings, 0 replies; 18+ messages in thread
From: Palmer Dabbelt @ 2017-11-30 18:26 UTC (permalink / raw)
  To: Olof Johansson; +Cc: albert, patches, linux-kernel, Olof Johansson

On Wed, 29 Nov 2017 17:55:17 PST (-0800), Olof Johansson wrote:
> Fixes the following on allmodconfig build:
>
> profile.c:(.text+0x3e4): undefined reference to `setup_profiling_timer'
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
> ---
>  arch/riscv/kernel/smp.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/arch/riscv/kernel/smp.c b/arch/riscv/kernel/smp.c
> index b4a71ec..4498f0c 100644
> --- a/arch/riscv/kernel/smp.c
> +++ b/arch/riscv/kernel/smp.c
> @@ -38,6 +38,13 @@ enum ipi_message_type {
>  	IPI_MAX
>  };
>
> +
> +/* Unsupported */
> +int setup_profiling_timer(unsigned int multiplier)
> +{
> +	return -EINVAL;
> +}
> +
>  irqreturn_t handle_ipi(void)
>  {
>  	unsigned long *pending_ipis = &ipi_data[smp_processor_id()].bits;
> @@ -108,3 +115,4 @@ void smp_send_reschedule(int cpu)
>  {
>  	send_ipi_message(cpumask_of(cpu), IPI_RESCHEDULE);
>  }
> +

This adds a trailing newline, I'm going to drop it in my tree

commit 5c0a7217f172899ddacc32bac16549a274a5ae05
Author: Olof Johansson <olof@lixom.net>
Date:   Wed Nov 29 17:55:20 2017 -0800

    RISC-V: Add missing include

    Fixes:

    include/asm-generic/mm_hooks.h:20:11: warning: 'struct vm_area_struct' declared inside parameter list will not be visible outside of this definition or declaration
    include/asm-generic/mm_hooks.h:19:38: warning: 'struct mm_struct' declared inside parameter list will not be visible outside of this definition or declaration

    Signed-off-by: Olof Johansson <olof@lixom.net>
    Signed-off-by: Palmer Dabbelt <palmer@sifive.com>

diff --git a/arch/riscv/include/asm/mmu_context.h b/arch/riscv/include/asm/mmu_context.h
index de1fc1631fc4..1cd5172882c2 100644
--- a/arch/riscv/include/asm/mmu_context.h
+++ b/arch/riscv/include/asm/mmu_context.h
@@ -14,6 +14,7 @@
 #ifndef _ASM_RISCV_MMU_CONTEXT_H
 #define _ASM_RISCV_MMU_CONTEXT_H

+#include <linux/mm_types.h>
 #include <asm-generic/mm_hooks.h>

 #include <linux/mm.h>

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [patches] [PATCH 00/10] RISC-V: Fixes for clean allmodconfig build
  2017-11-30  1:55 [PATCH 00/10] RISC-V: Fixes for clean allmodconfig build Olof Johansson
                   ` (9 preceding siblings ...)
  2017-11-30  1:55 ` [PATCH 10/10] input: joystick: riscv has get_cycles Olof Johansson
@ 2017-11-30 18:26 ` Palmer Dabbelt
  10 siblings, 0 replies; 18+ messages in thread
From: Palmer Dabbelt @ 2017-11-30 18:26 UTC (permalink / raw)
  To: Olof Johansson; +Cc: albert, patches, linux-kernel

On Wed, 29 Nov 2017 17:55:11 PST (-0800), Olof Johansson wrote:
> Here's a short series of patches that produces a working
> allmodconfig. Would be nice to see them go in so we can add build
> coverage.

I was just about to send a pull request when these came in last night, so it's 
good timing :).  There's one trailing newline, but assuming that's just a 
mistake this all looks good to me.  I'll submit it for rc2.

> One is for input subsystem, the list of if defined() there isn't ideal
> but it's already pretty bad. Dmitry, do you want to pick that one up?

It looks like that's already landed, so I'm just taking the rest.

Thanks!

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 08/10] RISC-V: Set __ARCH_WANT_RENAMEAT to pick up generic version
  2017-11-30  1:55 ` [PATCH 08/10] RISC-V: Set __ARCH_WANT_RENAMEAT to pick up generic version Olof Johansson
@ 2017-11-30 18:30   ` Christoph Hellwig
  2017-11-30 18:38     ` [patches] " Palmer Dabbelt
  0 siblings, 1 reply; 18+ messages in thread
From: Christoph Hellwig @ 2017-11-30 18:30 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Palmer Dabbelt, Albert Ou, patches, linux-kernel, Arnd Bergmann

On Wed, Nov 29, 2017 at 05:55:19PM -0800, Olof Johansson wrote:
> In file included from ../lib/audit.c:8:0:
> ../include/asm-generic/audit_dir_write.h:30:1: error: '__NR_renameat' undeclared here (not in a function); did you mean '__NR_renameat2'?


I think the audit code should be fixed instead to not expect
__NR_renameat, gіven that it's not in the asm-generic default set.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [patches] Re: [PATCH 08/10] RISC-V: Set __ARCH_WANT_RENAMEAT to pick up generic version
  2017-11-30 18:30   ` Christoph Hellwig
@ 2017-11-30 18:38     ` Palmer Dabbelt
  2017-11-30 20:21       ` Olof Johansson
  2017-12-01 18:27       ` Christoph Hellwig
  0 siblings, 2 replies; 18+ messages in thread
From: Palmer Dabbelt @ 2017-11-30 18:38 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Olof Johansson, albert, patches, linux-kernel, Arnd Bergmann

On Thu, 30 Nov 2017 10:30:32 PST (-0800), Christoph Hellwig wrote:
> On Wed, Nov 29, 2017 at 05:55:19PM -0800, Olof Johansson wrote:
>> In file included from ../lib/audit.c:8:0:
>> ../include/asm-generic/audit_dir_write.h:30:1: error: '__NR_renameat' undeclared here (not in a function); did you mean '__NR_renameat2'?
>
>
> I think the audit code should be fixed instead to not expect
> __NR_renameat, gіven that it's not in the asm-generic default set.

For some reason I thought we'd decided to keep renameat in our port despite it 
no longer being in the default list so we could maintain some backwards 
compatibility, but after looking through my email it looks like I was wrong 
about that.

I'm just going to drop this patch for now.  I haven't tried it, but I think 
this might just do the trick?

diff --git a/include/asm-generic/audit_dir_write.h b/include/asm-generic/audit_dir_write.h
index da09fb986459..dd5a9dd7a102 100644
--- a/include/asm-generic/audit_dir_write.h
+++ b/include/asm-generic/audit_dir_write.h
@@ -27,7 +27,9 @@ __NR_mknod,
 __NR_mkdirat,
 __NR_mknodat,
 __NR_unlinkat,
+#ifdef __NR_renameat
 __NR_renameat,
+#endif
 __NR_linkat,
 __NR_symlinkat,
 #endif

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [patches] Re: [PATCH 08/10] RISC-V: Set __ARCH_WANT_RENAMEAT to pick up generic version
  2017-11-30 18:38     ` [patches] " Palmer Dabbelt
@ 2017-11-30 20:21       ` Olof Johansson
  2017-12-01 18:27       ` Christoph Hellwig
  1 sibling, 0 replies; 18+ messages in thread
From: Olof Johansson @ 2017-11-30 20:21 UTC (permalink / raw)
  To: Palmer Dabbelt
  Cc: Christoph Hellwig, Albert Ou, patches, linux-kernel, Arnd Bergmann

On Thu, Nov 30, 2017 at 10:38 AM, Palmer Dabbelt <palmer@sifive.com> wrote:
> On Thu, 30 Nov 2017 10:30:32 PST (-0800), Christoph Hellwig wrote:
>>
>> On Wed, Nov 29, 2017 at 05:55:19PM -0800, Olof Johansson wrote:
>>>
>>> In file included from ../lib/audit.c:8:0:
>>> ../include/asm-generic/audit_dir_write.h:30:1: error: '__NR_renameat'
>>> undeclared here (not in a function); did you mean '__NR_renameat2'?
>>
>>
>>
>> I think the audit code should be fixed instead to not expect
>> __NR_renameat, gіven that it's not in the asm-generic default set.

Fair enough.

> For some reason I thought we'd decided to keep renameat in our port despite
> it no longer being in the default list so we could maintain some backwards
> compatibility, but after looking through my email it looks like I was wrong
> about that.
>
> I'm just going to drop this patch for now.  I haven't tried it, but I think
> this might just do the trick?

Seems reasonable to me.


>
> diff --git a/include/asm-generic/audit_dir_write.h
> b/include/asm-generic/audit_dir_write.h
> index da09fb986459..dd5a9dd7a102 100644
> --- a/include/asm-generic/audit_dir_write.h
> +++ b/include/asm-generic/audit_dir_write.h
> @@ -27,7 +27,9 @@ __NR_mknod,
> __NR_mkdirat,
> __NR_mknodat,
> __NR_unlinkat,
> +#ifdef __NR_renameat
> __NR_renameat,
> +#endif
> __NR_linkat,
> __NR_symlinkat,
> #endif

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [patches] Re: [PATCH 08/10] RISC-V: Set __ARCH_WANT_RENAMEAT to pick up generic version
  2017-11-30 18:38     ` [patches] " Palmer Dabbelt
  2017-11-30 20:21       ` Olof Johansson
@ 2017-12-01 18:27       ` Christoph Hellwig
  1 sibling, 0 replies; 18+ messages in thread
From: Christoph Hellwig @ 2017-12-01 18:27 UTC (permalink / raw)
  To: Palmer Dabbelt
  Cc: Christoph Hellwig, Olof Johansson, albert, patches, linux-kernel,
	Arnd Bergmann

On Thu, Nov 30, 2017 at 10:38:32AM -0800, Palmer Dabbelt wrote:
> index da09fb986459..dd5a9dd7a102 100644
> --- a/include/asm-generic/audit_dir_write.h
> +++ b/include/asm-generic/audit_dir_write.h
> @@ -27,7 +27,9 @@ __NR_mknod,
> __NR_mkdirat,
> __NR_mknodat,
> __NR_unlinkat,
> +#ifdef __NR_renameat
> __NR_renameat,
> +#endif
> __NR_linkat,
> __NR_symlinkat,
> #endif

Given that __NR_renameat2 is already covered this looks good to me:

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2017-12-01 18:28 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-30  1:55 [PATCH 00/10] RISC-V: Fixes for clean allmodconfig build Olof Johansson
2017-11-30  1:55 ` [PATCH 01/10] RISC-V: use generic serial.h Olof Johansson
2017-11-30  1:55 ` [PATCH 02/10] RISC-V: use RISCV_{INT,SHORT} instead of {INT,SHORT} for asm macros Olof Johansson
2017-11-30  1:55 ` [PATCH 03/10] RISC-V: io.h: type fixes for warnings Olof Johansson
2017-11-30  1:55 ` [PATCH 04/10] RISC-V: move empty_zero_page definition to C and export it Olof Johansson
2017-11-30  1:55 ` [PATCH 05/10] RISC-V: Export some expected symbols for modules Olof Johansson
2017-11-30  1:55 ` [PATCH 06/10] RISC-V: Provide stub of setup_profiling_timer() Olof Johansson
2017-11-30 18:26   ` [patches] " Palmer Dabbelt
2017-11-30  1:55 ` [PATCH 07/10] RISC-V: Use define for get_cycles like other architectures Olof Johansson
2017-11-30  1:55 ` [PATCH 08/10] RISC-V: Set __ARCH_WANT_RENAMEAT to pick up generic version Olof Johansson
2017-11-30 18:30   ` Christoph Hellwig
2017-11-30 18:38     ` [patches] " Palmer Dabbelt
2017-11-30 20:21       ` Olof Johansson
2017-12-01 18:27       ` Christoph Hellwig
2017-11-30  1:55 ` [PATCH 09/10] RISC-V: Add missing include Olof Johansson
2017-11-30  1:55 ` [PATCH 10/10] input: joystick: riscv has get_cycles Olof Johansson
2017-11-30  6:48   ` Dmitry Torokhov
2017-11-30 18:26 ` [patches] [PATCH 00/10] RISC-V: Fixes for clean allmodconfig build Palmer Dabbelt

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).