linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] h8300 fixes
@ 2012-06-02 20:35 Geert Uytterhoeven
  2012-06-02 20:35 ` [PATCH 1/5] h8300/pgtable: Add missing #include <asm-generic/pgtable.h> Geert Uytterhoeven
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2012-06-02 20:35 UTC (permalink / raw)
  To: Yoshinori Sato, Andrew Morton; +Cc: Tony Breeds, linux-kernel

	Hi Sato-san, Andrew,

The following patch set makes h8300 defconfig build again.
Due to lack of hardware, there's no guarantee this makes it actually boot.

I used the h8300-elf-gcc from
http://kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/.

I had two issues with this compiler, though:

1. I got 2 ICEs:

fs/read_write.c: In function 'sys_pread64':
fs/read_write.c:514:1: internal compiler error: in based_loc_descr, at dwarf2out.c:13636
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[4]: *** [fs/read_write.o] Error 1
  CC      fs/dcache.o
fs/dcache.c: In function '__d_path':
fs/dcache.c:2662:1: internal compiler error: in based_loc_descr, at dwarf2out.c:13636
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

2. I also got several warnings of the form:

warning: format '%zx' expects argument of type 'size_t', but argument 4 has type 'unsigned int'

while the actual parameter type is size_t, not unsigned int. 
Could this be because the compiler is h8300-elf-gcc and not h8300-linux-gcc?

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

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

* [PATCH 1/5] h8300/pgtable: Add missing #include <asm-generic/pgtable.h>
  2012-06-02 20:35 [PATCH 0/5] h8300 fixes Geert Uytterhoeven
@ 2012-06-02 20:35 ` Geert Uytterhoeven
  2012-06-02 20:35 ` [PATCH 2/5] h8300/signal: Fix typo "statis" Geert Uytterhoeven
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2012-06-02 20:35 UTC (permalink / raw)
  To: Yoshinori Sato, Andrew Morton
  Cc: Tony Breeds, linux-kernel, Geert Uytterhoeven

kernel/sched/core.c: In function 'context_switch':
kernel/sched/core.c:2061:2: error: implicit declaration of function 'arch_start_context_switch' [-Werror=implicit-function-declaration]

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 arch/h8300/include/asm/pgtable.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/h8300/include/asm/pgtable.h b/arch/h8300/include/asm/pgtable.h
index a09230a..62ef176 100644
--- a/arch/h8300/include/asm/pgtable.h
+++ b/arch/h8300/include/asm/pgtable.h
@@ -70,4 +70,7 @@ extern int is_in_rom(unsigned long);
 #define	VMALLOC_END	0xffffffff
 
 #define arch_enter_lazy_cpu_mode()    do {} while (0)
+
+#include <asm-generic/pgtable.h>
+
 #endif /* _H8300_PGTABLE_H */
-- 
1.7.0.4


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

* [PATCH 2/5] h8300/signal: Fix typo "statis"
  2012-06-02 20:35 [PATCH 0/5] h8300 fixes Geert Uytterhoeven
  2012-06-02 20:35 ` [PATCH 1/5] h8300/pgtable: Add missing #include <asm-generic/pgtable.h> Geert Uytterhoeven
@ 2012-06-02 20:35 ` Geert Uytterhoeven
  2012-06-02 21:37   ` Al Viro
  2012-06-02 20:35 ` [PATCH 3/5] h8300/time: Add missing #include <asm/irq_regs.h> Geert Uytterhoeven
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2012-06-02 20:35 UTC (permalink / raw)
  To: Yoshinori Sato, Andrew Morton
  Cc: Tony Breeds, linux-kernel, Geert Uytterhoeven, Al Viro

The keyword is "static", not "statis":

arch/h8300/kernel/signal.c:455:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
arch/h8300/kernel/signal.c: In function 'do_notify_resume':
arch/h8300/kernel/signal.c:511:3: error: implicit declaration of function 'do_signal' [-Werror=implicit-function-declaration]
arch/h8300/kernel/signal.c: At top level:
arch/h8300/kernel/signal.c:414:1: warning: 'handle_signal' defined but not used [-Wunused-function]

Introduced in commit 7ae4e32a65148353db3458e3eb87117f25620ac5 ("h8300: switch
to saved_sigmask-based sigsuspend/rt_sigsuspend")

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
---
 arch/h8300/kernel/signal.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/h8300/kernel/signal.c b/arch/h8300/kernel/signal.c
index d4b0555..95e4de0 100644
--- a/arch/h8300/kernel/signal.c
+++ b/arch/h8300/kernel/signal.c
@@ -452,7 +452,7 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
  * want to handle. Thus you cannot kill init even with a SIGKILL even by
  * mistake.
  */
-statis void do_signal(struct pt_regs *regs)
+static void do_signal(struct pt_regs *regs)
 {
 	siginfo_t info;
 	int signr;
-- 
1.7.0.4


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

* [PATCH 3/5] h8300/time: Add missing #include <asm/irq_regs.h>
  2012-06-02 20:35 [PATCH 0/5] h8300 fixes Geert Uytterhoeven
  2012-06-02 20:35 ` [PATCH 1/5] h8300/pgtable: Add missing #include <asm-generic/pgtable.h> Geert Uytterhoeven
  2012-06-02 20:35 ` [PATCH 2/5] h8300/signal: Fix typo "statis" Geert Uytterhoeven
@ 2012-06-02 20:35 ` Geert Uytterhoeven
  2012-06-02 20:35 ` [PATCH 4/5] h8300/uaccess: Remove assignment to __gu_val in unhandled case of get_user() Geert Uytterhoeven
  2012-06-02 20:35 ` [PATCH 5/5] h8300/uaccess: Add mising __clear_user() Geert Uytterhoeven
  4 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2012-06-02 20:35 UTC (permalink / raw)
  To: Yoshinori Sato, Andrew Morton
  Cc: Tony Breeds, linux-kernel, Geert Uytterhoeven

arch/h8300/kernel/time.c: In function 'h8300_timer_tick':
arch/h8300/kernel/time.c:39:2: error: implicit declaration of function 'get_irq_regs' [-Werror=implicit-function-declaration]
arch/h8300/kernel/time.c:39:42: error: invalid type argument of '->' (have 'int')

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 arch/h8300/kernel/time.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/h8300/kernel/time.c b/arch/h8300/kernel/time.c
index 32263a1..e0f7419 100644
--- a/arch/h8300/kernel/time.c
+++ b/arch/h8300/kernel/time.c
@@ -27,6 +27,7 @@
 #include <linux/profile.h>
 
 #include <asm/io.h>
+#include <asm/irq_regs.h>
 #include <asm/timer.h>
 
 #define	TICK_SIZE (tick_nsec / 1000)
-- 
1.7.0.4


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

* [PATCH 4/5] h8300/uaccess: Remove assignment to __gu_val in unhandled case of get_user()
  2012-06-02 20:35 [PATCH 0/5] h8300 fixes Geert Uytterhoeven
                   ` (2 preceding siblings ...)
  2012-06-02 20:35 ` [PATCH 3/5] h8300/time: Add missing #include <asm/irq_regs.h> Geert Uytterhoeven
@ 2012-06-02 20:35 ` Geert Uytterhoeven
  2012-06-02 20:35 ` [PATCH 5/5] h8300/uaccess: Add mising __clear_user() Geert Uytterhoeven
  4 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2012-06-02 20:35 UTC (permalink / raw)
  To: Yoshinori Sato, Andrew Morton
  Cc: Tony Breeds, linux-kernel, Geert Uytterhoeven

__gu_val is const if the passed ptr is const, giving:

include/linux/pagemap.h: In function 'fault_in_pages_readable':
include/linux/pagemap.h:442:2: error: assignment of read-only variable '__gu_val'
include/linux/pagemap.h:448:4: error: assignment of read-only variable '__gu_val'
include/linux/pagemap.h: In function 'fault_in_multipages_readable':
include/linux/pagemap.h:499:3: error: assignment of read-only variable '__gu_val'
include/linux/pagemap.h:508:3: error: assignment of read-only variable '__gu_val'
make[4]: *** [init/main.o] Error 1

As we don't care about the actual value of __gu_val in the unhandled
case (it will cause a link error anyway), just remove the assignment.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 arch/h8300/include/asm/uaccess.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/h8300/include/asm/uaccess.h b/arch/h8300/include/asm/uaccess.h
index 356068c..534394f 100644
--- a/arch/h8300/include/asm/uaccess.h
+++ b/arch/h8300/include/asm/uaccess.h
@@ -100,7 +100,6 @@ extern int __put_user_bad(void);
 	break;							\
     default:							\
 	__gu_err = __get_user_bad();				\
-	__gu_val = 0;						\
 	break;							\
     }								\
     (x) = __gu_val;						\
-- 
1.7.0.4


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

* [PATCH 5/5] h8300/uaccess: Add mising __clear_user()
  2012-06-02 20:35 [PATCH 0/5] h8300 fixes Geert Uytterhoeven
                   ` (3 preceding siblings ...)
  2012-06-02 20:35 ` [PATCH 4/5] h8300/uaccess: Remove assignment to __gu_val in unhandled case of get_user() Geert Uytterhoeven
@ 2012-06-02 20:35 ` Geert Uytterhoeven
  4 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2012-06-02 20:35 UTC (permalink / raw)
  To: Yoshinori Sato, Andrew Morton
  Cc: Tony Breeds, linux-kernel, Geert Uytterhoeven

include/linux/regset.h: In function 'user_regset_copyout_zero':
include/linux/regset.h:289:3: error: implicit declaration of function '__clear_user' [-Werror=implicit-function-declaration]

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 arch/h8300/include/asm/uaccess.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/h8300/include/asm/uaccess.h b/arch/h8300/include/asm/uaccess.h
index 534394f..8725d1a 100644
--- a/arch/h8300/include/asm/uaccess.h
+++ b/arch/h8300/include/asm/uaccess.h
@@ -158,4 +158,6 @@ clear_user(void *to, unsigned long n)
 	return 0;
 }
 
+#define __clear_user	clear_user
+
 #endif /* _H8300_UACCESS_H */
-- 
1.7.0.4


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

* Re: [PATCH 2/5] h8300/signal: Fix typo "statis"
  2012-06-02 20:35 ` [PATCH 2/5] h8300/signal: Fix typo "statis" Geert Uytterhoeven
@ 2012-06-02 21:37   ` Al Viro
  2012-06-04  0:13     ` Tony Breeds
  0 siblings, 1 reply; 8+ messages in thread
From: Al Viro @ 2012-06-02 21:37 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Yoshinori Sato, Andrew Morton, Tony Breeds, linux-kernel

On Sat, Jun 02, 2012 at 10:35:36PM +0200, Geert Uytterhoeven wrote:
> The keyword is "static", not "statis":
> 
> arch/h8300/kernel/signal.c:455:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
> arch/h8300/kernel/signal.c: In function 'do_notify_resume':
> arch/h8300/kernel/signal.c:511:3: error: implicit declaration of function 'do_signal' [-Werror=implicit-function-declaration]
> arch/h8300/kernel/signal.c: At top level:
> arch/h8300/kernel/signal.c:414:1: warning: 'handle_signal' defined but not used [-Wunused-function]
> 
> Introduced in commit 7ae4e32a65148353db3458e3eb87117f25620ac5 ("h8300: switch
> to saved_sigmask-based sigsuspend/rt_sigsuspend")

Sigh...  This one I don't even have a cross-toolchain for (ICEs galore),
nevermind the setup to test on ;-/

FWIW, there's a potential unpleasant bug in h8300 signal handling -
the check for return to user mode is in the wrong place; doing that
in do_signal() is pointless, since if you ever get there with both
TIF_SIGPENDING set and regs such that we are about to return to kernel,
you'll just keep looping.

That check belongs in the loop in entry.S, if anywhere (i.e. if that loop
can be reached when returning to kernel mode; AFAICS, the only plausible
way for that to happen is failing kernel_execve() leaving us on the exit
from system_call, about to return to kernel).  It might or might not be
worth doing more or less what arm does in its kernel_execve(); then that
check could be simply removed.  In any case, do_signal() is definitely the
wrong place for that check - if anything, it needs to be done before hitting
do_notify_resume, breaking the loop if we are returning to kernel.

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

* Re: [PATCH 2/5] h8300/signal: Fix typo "statis"
  2012-06-02 21:37   ` Al Viro
@ 2012-06-04  0:13     ` Tony Breeds
  0 siblings, 0 replies; 8+ messages in thread
From: Tony Breeds @ 2012-06-04  0:13 UTC (permalink / raw)
  To: Al Viro; +Cc: Geert Uytterhoeven, Yoshinori Sato, Andrew Morton, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]

On Sat, Jun 02, 2012 at 10:37:28PM +0100, Al Viro wrote:
> On Sat, Jun 02, 2012 at 10:35:36PM +0200, Geert Uytterhoeven wrote:
> > The keyword is "static", not "statis":
> > 
> > arch/h8300/kernel/signal.c:455:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
> > arch/h8300/kernel/signal.c: In function 'do_notify_resume':
> > arch/h8300/kernel/signal.c:511:3: error: implicit declaration of function 'do_signal' [-Werror=implicit-function-declaration]
> > arch/h8300/kernel/signal.c: At top level:
> > arch/h8300/kernel/signal.c:414:1: warning: 'handle_signal' defined but not used [-Wunused-function]
> > 
> > Introduced in commit 7ae4e32a65148353db3458e3eb87117f25620ac5 ("h8300: switch
> > to saved_sigmask-based sigsuspend/rt_sigsuspend")
> 
> Sigh...  This one I don't even have a cross-toolchain for (ICEs galore),
> nevermind the setup to test on ;-/

/me pimps his crosscompilers *again*

http://kernel.org/pub/tools/crosstool/

I know it wont help with boot tests but it will catch simple build
thinko/typos

Yours Tony

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2012-06-04  0:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-02 20:35 [PATCH 0/5] h8300 fixes Geert Uytterhoeven
2012-06-02 20:35 ` [PATCH 1/5] h8300/pgtable: Add missing #include <asm-generic/pgtable.h> Geert Uytterhoeven
2012-06-02 20:35 ` [PATCH 2/5] h8300/signal: Fix typo "statis" Geert Uytterhoeven
2012-06-02 21:37   ` Al Viro
2012-06-04  0:13     ` Tony Breeds
2012-06-02 20:35 ` [PATCH 3/5] h8300/time: Add missing #include <asm/irq_regs.h> Geert Uytterhoeven
2012-06-02 20:35 ` [PATCH 4/5] h8300/uaccess: Remove assignment to __gu_val in unhandled case of get_user() Geert Uytterhoeven
2012-06-02 20:35 ` [PATCH 5/5] h8300/uaccess: Add mising __clear_user() Geert Uytterhoeven

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