All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: David Howells <dhowells@redhat.com>,
	linux-kernel@vger.kernel.org,
	Ananth N Mavinakayanahalli <ananth@in.ibm.com>,
	Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Subject: Re: [PATCH v2 1/7] mn10300: fix build failure
Date: Thu, 16 Jul 2015 14:54:26 -0700	[thread overview]
Message-ID: <20150716145426.c144a3419c20d60835888965@linux-foundation.org> (raw)
In-Reply-To: <1434629873-11668-2-git-send-email-sudipm.mukherjee@gmail.com>

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

  parent reply	other threads:[~2015-07-16 21:54 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-18 12:17 [PATCH v2 0/7] fix build failure of mn10300 Sudip Mukherjee
2015-06-18 12:17 ` Sudip Mukherjee
2015-06-18 12:17 ` [PATCH v2 1/7] mn10300: fix build failure Sudip Mukherjee
2015-06-18 12:17   ` Sudip Mukherjee
2015-07-16  7:17   ` Sudip Mukherjee
2015-07-16 21:54   ` Andrew Morton [this message]
2015-07-17  5:06     ` Sudip Mukherjee
2015-06-18 12:17 ` [PATCH v2 2/7] mn10300: Provide dummy dma_alloc_attrs() and dma_free_attrs() Sudip Mukherjee
2015-06-18 12:17   ` Sudip Mukherjee
2015-06-18 12:17   ` Sudip Mukherjee
2015-06-18 12:17 ` [PATCH v2 3/7] mmc: mediatek: build as module Sudip Mukherjee
2015-06-18 12:17   ` Sudip Mukherjee
2015-06-18 13:10   ` Ulf Hansson
2015-06-18 13:10     ` Ulf Hansson
2015-06-18 13:10     ` Ulf Hansson
2015-06-18 12:17 ` [PATCH v2 4/7] USB: mos7720: rename DCR Sudip Mukherjee
2015-06-18 12:17   ` Sudip Mukherjee
2015-06-23 10:09   ` Johan Hovold
2015-06-23 10:09     ` Johan Hovold
2015-06-23 13:29   ` [PATCH v3] USB: mos7720: rename registers Sudip Mukherjee
2015-06-26  7:46     ` Johan Hovold
2015-06-26 13:53       ` Sudip Mukherjee
2015-06-18 12:17 ` [PATCH v2 5/7] samples: kdbus: disable for mn10300 Sudip Mukherjee
2015-06-18 12:17   ` Sudip Mukherjee
2015-06-18 14:39   ` Greg Kroah-Hartman
2015-06-18 14:39     ` Greg Kroah-Hartman
2015-06-18 16:19     ` Sudip Mukherjee
2015-06-18 16:19       ` Sudip Mukherjee
2015-06-18 16:19       ` Sudip Mukherjee
2015-06-18 16:25       ` Greg Kroah-Hartman
2015-06-18 16:25         ` Greg Kroah-Hartman
2015-06-18 12:17 ` [PATCH v2 6/7] mn10300: kgdb_arch_set_pc Sudip Mukherjee
2015-06-18 12:17   ` Sudip Mukherjee
2015-06-18 12:17 ` [PATCH v2 7/7] mn10300: add early_init_dt_* Sudip Mukherjee
2015-06-18 12:17   ` Sudip Mukherjee
2015-06-18 12:17   ` Sudip Mukherjee
2015-06-18 14:51 ` [PATCH v2 0/7] fix build failure of mn10300 Russell King - ARM Linux
2015-06-18 14:51   ` Russell King - ARM Linux
     [not found]   ` <CAA0PaPGMtePS+fmpi1QBZi8uHtuU3Z7_Y+9f0+O38o+8xfo+1Q@mail.gmail.com>
2015-06-18 15:44     ` [Linux-am33-list] " Russell King - ARM Linux
2015-06-18 15:44       ` Russell King - ARM Linux
2015-06-18 15:44       ` Russell King - ARM Linux
2015-06-18 16:13   ` Sudip Mukherjee
2015-06-18 16:13     ` Sudip Mukherjee
2015-06-18 16:13     ` Sudip Mukherjee
2015-07-10 11:20 ` Sudip Mukherjee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150716145426.c144a3419c20d60835888965@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=ananth@in.ibm.com \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=sudipm.mukherjee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.