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


Groups > linux.kernel > #1186288 > unrolled thread

Re: [PATCH v2 1/7] mn10300: fix build failure

Started byAndrew Morton <akpm@linux-foundation.org>
First post2015-07-17 00:00 +0200
Last post2015-07-17 07:10 +0200
Articles 2 — 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.


Contents

  Re: [PATCH v2 1/7] mn10300: fix build failure Andrew Morton <akpm@linux-foundation.org> - 2015-07-17 00:00 +0200
    Re: [PATCH v2 1/7] mn10300: fix build failure Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-07-17 07:10 +0200

#1186288 — Re: [PATCH v2 1/7] mn10300: fix build failure

FromAndrew Morton <akpm@linux-foundation.org>
Date2015-07-17 00:00 +0200
SubjectRe: [PATCH v2 1/7] mn10300: fix build failure
Message-ID<pMZma-2pO-5@gated-at.bofh.it>
On Thu, 18 Jun 2015 17:47:47 +0530 Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:

> allmodconfig build fails with the error:
> invalid use of undefined type 'struct kprobe_ctlblk'
> 
> just declared the two basic structures after checking the struct in other
> architectures.
> 
> --- a/arch/mn10300/include/asm/kprobes.h
> +++ b/arch/mn10300/include/asm/kprobes.h
> @@ -47,4 +47,16 @@ extern int kprobe_exceptions_notify(struct notifier_block *self,
>  
>  extern void arch_remove_kprobe(struct kprobe *p);
>  
> +struct prev_kprobe {
> +	struct kprobe *kp;
> +	unsigned long status;
> +};
> +
> +struct kprobe_ctlblk {
> +	unsigned int kprobe_status;
> +	struct pt_regs jprobe_saved_regs;
> +	char jprobes_stack[MAX_STACK_SIZE];
> +	struct prev_kprobe prev_kprobe;
> +};
> +
>  #endif /* _ASM_KPROBES_H */

Look:

akpm3:/usr/src/linux-4.2-rc2> grep -rl kprobe_ctlblk .
./arch/ia64/include/asm/kprobes.h
./arch/ia64/kernel/kprobes.c
./arch/tile/include/asm/kprobes.h
./arch/tile/kernel/kprobes.c
./arch/mips/include/asm/kprobes.h
./arch/mips/kernel/kprobes.c
./arch/arc/include/asm/kprobes.h
./arch/arc/kernel/kprobes.c
./arch/sparc/include/asm/kprobes.h
./arch/sparc/kernel/kprobes.c
./arch/powerpc/include/asm/kprobes.h
./arch/powerpc/kernel/kprobes.c
./arch/avr32/include/asm/kprobes.h
./arch/sh/include/asm/kprobes.h
./arch/sh/kernel/kprobes.c
./arch/arm/probes/kprobes/core.c
./arch/arm/probes/kprobes/opt-arm.c
./arch/arm/include/asm/kprobes.h
./arch/s390/include/asm/kprobes.h
./arch/s390/kernel/kprobes.c
./arch/x86/include/asm/kprobes.h
./arch/x86/kernel/kprobes/core.c
./arch/x86/kernel/kprobes/ftrace.c
./arch/x86/kernel/kprobes/common.h
./arch/x86/kernel/kprobes/opt.c
./include/linux/kprobes.h

mn10300 doesn't use kprobe_ctlblk (or prev_kprobe).  Nor does the core
kernel kprobes code.  So these are arch-specific things and shouldn't
be referenced from include/linux/kprobes.h at all.  I think - I didn't
look super-closely at it.

So an appropriate fix for this would be to move the references to
prev_kprobe/kprobe_ctlblk out of include/linux/kprobes.h and into
asm/kprobes.h.  Presumably via include/asm-generic/kprobes.h in some
fashion.

Have you tested this patch on mn10300?  Does kprobes actually work on
mn10300?  Perhaps not, and the solution here is to disable kprobes on
that arch until someone fixes it all up.


Please resend any mn10300 fixes which you still have pending.  Please
be a bit more sparing in the cc's when doing so ;)
--
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]


#1186449

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-07-17 07:10 +0200
Message-ID<pN64h-41z-5@gated-at.bofh.it>
In reply to#1186288
On Thu, Jul 16, 2015 at 02:54:26PM -0700, Andrew Morton wrote:
> On Thu, 18 Jun 2015 17:47:47 +0530 Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:
> 
> 
> So an appropriate fix for this would be to move the references to
> prev_kprobe/kprobe_ctlblk out of include/linux/kprobes.h and into
> asm/kprobes.h.  Presumably via include/asm-generic/kprobes.h in some
> fashion.
> 
> Have you tested this patch on mn10300?  Does kprobes actually work on
> mn10300?  Perhaps not, and the solution here is to disable kprobes on
> that arch until someone fixes it all up.
No, this was not tested on board. :(
I tried my best to get a board but it seems board sellers in India have
not even heard the name of "mn10300". I tried contacting Koichi
Yasutake (one of the maintainer of mn10300) in hope of getting/buying
a board, but email of Koichi Yasutake is bouncing. I tried to contact
the company about one of their board and the following is their reply:
"As you say, linux runs on MN103E0700.
But MN103E0700 is now EOL, so we need not to maintenace linux."
:(
> 
> 
> Please resend any mn10300 fixes which you still have pending.
Should i resend as it is or should i fix according to your suggestion?
or since this is arch specific changes and not tested on board so if you
want it can be dropped also.

> Please be a bit more sparing in the cc's when doing so ;)
yes, cc became a long list but it was also improper to send some part of
the series to few maintainer and other to some other maintainers.

regards
sudip
--
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