Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1600525 > unrolled thread

[PATCH 0/3] Openrisc fixes for 4.11

Started byStafford Horne <shorne@gmail.com>
First post2017-03-14 16:00 +0100
Last post2017-03-14 16:10 +0100
Articles 6 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/3] Openrisc fixes for 4.11 Stafford Horne <shorne@gmail.com> - 2017-03-14 16:00 +0100
    [PATCH 2/3] openrisc: fix issue handling 8 byte get_user calls Stafford Horne <shorne@gmail.com> - 2017-03-14 16:00 +0100
    [PATCH 3/3] openrisc: Export symbols needed by modules Stafford Horne <shorne@gmail.com> - 2017-03-14 16:00 +0100
      Re: [OpenRISC] [PATCH 3/3] openrisc: Export symbols needed by modules Geert Uytterhoeven <geert@linux-m68k.org> - 2017-03-14 16:30 +0100
        Re: [OpenRISC] [PATCH 3/3] openrisc: Export symbols needed by modules Stafford Horne <shorne@gmail.com> - 2017-03-14 23:20 +0100
    [PATCH 1/3] openrisc: xchg: fix `computed is not used` warning Stafford Horne <shorne@gmail.com> - 2017-03-14 16:10 +0100

#1600525 — [PATCH 0/3] Openrisc fixes for 4.11

FromStafford Horne <shorne@gmail.com>
Date2017-03-14 16:00 +0100
Subject[PATCH 0/3] Openrisc fixes for 4.11
Message-ID<tkW5A-1Ad-23@gated-at.bofh.it>
Hello,

These are a few compile error and warning fixes which were pointed out
after the 4.11 code was merged.

Most of these could be found at this kbuild failure here:

  https://lkml.org/lkml/2017/3/9/976

The rest I found with some local testing.

Stafford Horne (3):
  openrisc: xchg: fix `computed is not used` warning
  openrisc: fix issue handling 8 byte get_user calls
  openrisc: Export symbols needed by modules

 arch/openrisc/include/asm/cmpxchg.h | 8 ++++++--
 arch/openrisc/include/asm/uaccess.h | 2 +-
 arch/openrisc/kernel/or32_ksyms.c   | 5 +++++
 arch/openrisc/kernel/process.c      | 1 +
 4 files changed, 13 insertions(+), 3 deletions(-)

-- 
2.9.3

[toc] | [next] | [standalone]


#1600533 — [PATCH 2/3] openrisc: fix issue handling 8 byte get_user calls

FromStafford Horne <shorne@gmail.com>
Date2017-03-14 16:00 +0100
Subject[PATCH 2/3] openrisc: fix issue handling 8 byte get_user calls
Message-ID<tkW5A-1Ad-33@gated-at.bofh.it>
In reply to#1600525
Was getting the following error with allmodconfig:

  ERROR: "__get_user_bad" [lib/test_user_copy.ko] undefined!

This was simply a missing break statement, causing an unwanted fall
through.

Signed-off-by: Stafford Horne <shorne@gmail.com>
---
 arch/openrisc/include/asm/uaccess.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/openrisc/include/asm/uaccess.h b/arch/openrisc/include/asm/uaccess.h
index 140faa1..1311e6b 100644
--- a/arch/openrisc/include/asm/uaccess.h
+++ b/arch/openrisc/include/asm/uaccess.h
@@ -211,7 +211,7 @@ do {									\
 	case 1: __get_user_asm(x, ptr, retval, "l.lbz"); break;		\
 	case 2: __get_user_asm(x, ptr, retval, "l.lhz"); break;		\
 	case 4: __get_user_asm(x, ptr, retval, "l.lwz"); break;		\
-	case 8: __get_user_asm2(x, ptr, retval);			\
+	case 8: __get_user_asm2(x, ptr, retval); break;			\
 	default: (x) = __get_user_bad();				\
 	}								\
 } while (0)
-- 
2.9.3

[toc] | [prev] | [next] | [standalone]


#1600534 — [PATCH 3/3] openrisc: Export symbols needed by modules

FromStafford Horne <shorne@gmail.com>
Date2017-03-14 16:00 +0100
Subject[PATCH 3/3] openrisc: Export symbols needed by modules
Message-ID<tkW5A-1Ad-35@gated-at.bofh.it>
In reply to#1600525
This was detected by allmodconfig, errors reported:

 ERROR: "empty_zero_page" [net/ceph/libceph.ko] undefined!
 ERROR: "__ucmpdi2" [lib/842/842_decompress.ko] undefined!
 ERROR: "empty_zero_page" [fs/nfs/objlayout/objlayoutdriver.ko] undefined!
 ERROR: "empty_zero_page" [fs/exofs/exofs.ko] undefined!
 ERROR: "empty_zero_page" [fs/crypto/fscrypto.ko] undefined!
 ERROR: "__ucmpdi2" [fs/btrfs/btrfs.ko] undefined!
 ERROR: "pm_power_off" [drivers/regulator/act8865-regulator.ko] undefined!

Signed-off-by: Stafford Horne <shorne@gmail.com>
---
 arch/openrisc/kernel/or32_ksyms.c | 5 +++++
 arch/openrisc/kernel/process.c    | 1 +
 2 files changed, 6 insertions(+)

diff --git a/arch/openrisc/kernel/or32_ksyms.c b/arch/openrisc/kernel/or32_ksyms.c
index 5c4695d..2842979 100644
--- a/arch/openrisc/kernel/or32_ksyms.c
+++ b/arch/openrisc/kernel/or32_ksyms.c
@@ -42,6 +42,11 @@ DECLARE_EXPORT(__muldi3);
 DECLARE_EXPORT(__ashrdi3);
 DECLARE_EXPORT(__ashldi3);
 DECLARE_EXPORT(__lshrdi3);
+DECLARE_EXPORT(__ucmpdi2);
+
+extern unsigned long empty_zero_page[2048];
+EXPORT_SYMBOL(empty_zero_page);
 
 EXPORT_SYMBOL(__copy_tofrom_user);
+EXPORT_SYMBOL(__clear_user);
 EXPORT_SYMBOL(memset);
diff --git a/arch/openrisc/kernel/process.c b/arch/openrisc/kernel/process.c
index 828a291..f8da545 100644
--- a/arch/openrisc/kernel/process.c
+++ b/arch/openrisc/kernel/process.c
@@ -90,6 +90,7 @@ void arch_cpu_idle(void)
 }
 
 void (*pm_power_off) (void) = machine_power_off;
+EXPORT_SYMBOL(pm_power_off);
 
 /*
  * When a process does an "exec", machine state like FPU and debug
-- 
2.9.3

[toc] | [prev] | [next] | [standalone]


#1600610 — Re: [OpenRISC] [PATCH 3/3] openrisc: Export symbols needed by modules

FromGeert Uytterhoeven <geert@linux-m68k.org>
Date2017-03-14 16:30 +0100
SubjectRe: [OpenRISC] [PATCH 3/3] openrisc: Export symbols needed by modules
Message-ID<tkWyD-20n-53@gated-at.bofh.it>
In reply to#1600534
Hi Stafford,

On Tue, Mar 14, 2017 at 3:56 PM, Stafford Horne <shorne@gmail.com> wrote:
> This was detected by allmodconfig, errors reported:
>
>  ERROR: "empty_zero_page" [net/ceph/libceph.ko] undefined!
>  ERROR: "__ucmpdi2" [lib/842/842_decompress.ko] undefined!
>  ERROR: "empty_zero_page" [fs/nfs/objlayout/objlayoutdriver.ko] undefined!
>  ERROR: "empty_zero_page" [fs/exofs/exofs.ko] undefined!
>  ERROR: "empty_zero_page" [fs/crypto/fscrypto.ko] undefined!
>  ERROR: "__ucmpdi2" [fs/btrfs/btrfs.ko] undefined!
>  ERROR: "pm_power_off" [drivers/regulator/act8865-regulator.ko] undefined!
>
> Signed-off-by: Stafford Horne <shorne@gmail.com>

> --- a/arch/openrisc/kernel/or32_ksyms.c
> +++ b/arch/openrisc/kernel/or32_ksyms.c
> @@ -42,6 +42,11 @@ DECLARE_EXPORT(__muldi3);
>  DECLARE_EXPORT(__ashrdi3);
>  DECLARE_EXPORT(__ashldi3);
>  DECLARE_EXPORT(__lshrdi3);
> +DECLARE_EXPORT(__ucmpdi2);
> +
> +extern unsigned long empty_zero_page[2048];

Can't you #include <asm/pgtable.h> instead of adding a forward
declaration?

> +EXPORT_SYMBOL(empty_zero_page);

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

[toc] | [prev] | [next] | [standalone]


#1600936 — Re: [OpenRISC] [PATCH 3/3] openrisc: Export symbols needed by modules

FromStafford Horne <shorne@gmail.com>
Date2017-03-14 23:20 +0100
SubjectRe: [OpenRISC] [PATCH 3/3] openrisc: Export symbols needed by modules
Message-ID<tl2Xn-6Jw-3@gated-at.bofh.it>
In reply to#1600610
On Tue, Mar 14, 2017 at 04:25:30PM +0100, Geert Uytterhoeven wrote:
> Hi Stafford,
> 
> On Tue, Mar 14, 2017 at 3:56 PM, Stafford Horne <shorne@gmail.com> wrote:
> > This was detected by allmodconfig, errors reported:
> >
> >  ERROR: "empty_zero_page" [net/ceph/libceph.ko] undefined!
> >  ERROR: "__ucmpdi2" [lib/842/842_decompress.ko] undefined!
> >  ERROR: "empty_zero_page" [fs/nfs/objlayout/objlayoutdriver.ko] undefined!
> >  ERROR: "empty_zero_page" [fs/exofs/exofs.ko] undefined!
> >  ERROR: "empty_zero_page" [fs/crypto/fscrypto.ko] undefined!
> >  ERROR: "__ucmpdi2" [fs/btrfs/btrfs.ko] undefined!
> >  ERROR: "pm_power_off" [drivers/regulator/act8865-regulator.ko] undefined!
> >
> > Signed-off-by: Stafford Horne <shorne@gmail.com>
> 
> > --- a/arch/openrisc/kernel/or32_ksyms.c
> > +++ b/arch/openrisc/kernel/or32_ksyms.c
> > @@ -42,6 +42,11 @@ DECLARE_EXPORT(__muldi3);
> >  DECLARE_EXPORT(__ashrdi3);
> >  DECLARE_EXPORT(__ashldi3);
> >  DECLARE_EXPORT(__lshrdi3);
> > +DECLARE_EXPORT(__ucmpdi2);
> > +
> > +extern unsigned long empty_zero_page[2048];
> 
> Can't you #include <asm/pgtable.h> instead of adding a forward
> declaration?

Right, I can do this.

In the end I was hoping to convert empty_zero_page to be more like
parisc. which would put something like this mm/init.c

  unsigned long *empty_zero_page __read_mostly;
  EXPORT_SYMBOL(empty_zero_page);

  in init {
    empty_zero_page = get_memblock(PAGE_SIZE);
  }

But I was going to wait until 4.12 for that change.

-Stafford

> > +EXPORT_SYMBOL(empty_zero_page);
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> 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

[toc] | [prev] | [next] | [standalone]


#1600571 — [PATCH 1/3] openrisc: xchg: fix `computed is not used` warning

FromStafford Horne <shorne@gmail.com>
Date2017-03-14 16:10 +0100
Subject[PATCH 1/3] openrisc: xchg: fix `computed is not used` warning
Message-ID<tkWfi-1T2-71@gated-at.bofh.it>
In reply to#1600525
When building allmodconfig this warning shows.

  fs/ocfs2/file.c: In function 'ocfs2_file_write_iter':
  ./arch/openrisc/include/asm/cmpxchg.h:81:3: warning: value computed is
  not used [-Wunused-value]
    ((typeof(*(ptr)))__xchg((unsigned long)(with), (ptr), sizeof(*(ptr))))
     ^

Applying the same patch logic that was done to the cmpxchg macro.

Signed-off-by: Stafford Horne <shorne@gmail.com>
---
 arch/openrisc/include/asm/cmpxchg.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/openrisc/include/asm/cmpxchg.h b/arch/openrisc/include/asm/cmpxchg.h
index 5fcb9ac..f0a5d8b 100644
--- a/arch/openrisc/include/asm/cmpxchg.h
+++ b/arch/openrisc/include/asm/cmpxchg.h
@@ -77,7 +77,11 @@ static inline unsigned long __xchg(unsigned long val, volatile void *ptr,
 	return val;
 }
 
-#define xchg(ptr, with) \
-	((typeof(*(ptr)))__xchg((unsigned long)(with), (ptr), sizeof(*(ptr))))
+#define xchg(ptr, with) 						\
+	({								\
+		(__typeof__(*(ptr))) __xchg((unsigned long)(with),	\
+					    (ptr),			\
+					    sizeof(*(ptr)));		\
+	})
 
 #endif /* __ASM_OPENRISC_CMPXCHG_H */
-- 
2.9.3

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web