Skip to contentSkip to conversation

fix build failure of mn10300

PATCH Superseded Sudip Mukherjee 1 participant 4 messages Jun 16, 2015 – Jun 18, 2015

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover fix build failure of mn10300

Hi,
This is an attempt to fix the build failures when building mn10300 with allmodconfig. It is still not completely fixed, but now atleast two errors less than all the errors.

regards
sudip

Sudip Mukherjee (2):
mn10300: fix build failure
mn10300: Provide dummy dma_alloc_attrs() and dma_free_attrs()

 arch/mn10300/include/asm/dma-mapping.h | 13 +++++++++++++
 arch/mn10300/include/asm/kprobes.h     | 12 ++++++++++++
 2 files changed, 25 insertions(+)
Signature · 1 line
1.8.1.2
#1 lore raw

PATCH 1/2 mn10300: fix build failure

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.

---
 arch/mn10300/include/asm/kprobes.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/mn10300/include/asm/kprobes.h +12 -0
index c800b59..c90d2b1 100644
@@ -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 */
Signature · 1 line
1.8.1.2
#2 lore raw

PATCH 2/2 mn10300: Provide dummy dma_alloc_attrs() and dma_free_attrs()

In reply to Sudip Mukherjee

allmodconfig fails to build with following errors.

drivers/media/platform/sti/bdisp/bdisp-hw.c:
In function 'bdisp_hw_free_nodes':
drivers/media/platform/sti/bdisp/bdisp-hw.c:132:3: error:
implicit declaration of function 'dma_free_attrs'

drivers/media/platform/sti/bdisp/bdisp-hw.c:
In function 'bdisp_hw_alloc_nodes':
drivers/media/platform/sti/bdisp/bdisp-hw.c:157:2: error:
implicit declaration of function 'dma_alloc_attrs'

mn10300 does not provide those functions at this time. Provide dummy implementations to avoid build errors.

---

copied from https://lkml.org/lkml/2015/4/22/346

 arch/mn10300/include/asm/dma-mapping.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/mn10300/include/asm/dma-mapping.h +13 -0
index a18abfc..d589c5e 100644
@@ -183,4 +183,17 @@ static inline int dma_get_sgtable(struct device *dev, struct sg_table *sgt,
 	return -EINVAL;
 }
 
+static inline void *dma_alloc_attrs(struct device *dev, size_t size,
+				    dma_addr_t *dma_handle, gfp_t flag,
+				    struct dma_attrs *attrs)
+{
+	return NULL;
+}
+
+static inline void dma_free_attrs(struct device *dev, size_t size,
+				  void *vaddr, dma_addr_t dma_handle,
+				  struct dma_attrs *attrs)
+{
+}
+
 #endif
Signature · 1 line
1.8.1.2
#3 lore raw
In reply to Sudip Mukherjee
Quoted 4 lines · Sudip Mukherjee

Hi,
This is an attempt to fix the build failures when building mn10300 with allmodconfig. It is still not completely fixed, but now atleast two errors less than all the errors.

please drop this series. I am sending v2 which completely fixes the build failure.

regards
sudip