Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a31d4ae authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'fixes-for-linus' of git://git.monstr.eu/linux-2.6-microblaze

* 'fixes-for-linus' of git://git.monstr.eu/linux-2.6-microblaze:
  microblaze: Makefile cleanup
  microblaze: Typo fix for cpu param inconsistency
  microblaze: Add support for R_MICROBLAZE_64_NONE
  microblaze: Get module loading working
  microblaze: remove sys_ipc
  microblaze: Support unaligned address for put/get_user macros
  microblaze: Detect new Microblaze 7.20 versions
  microblaze: Fix do_page_fault for no context
  microblaze: Add _PAGE_FILE macros to pgtable.h
  microblaze: Fix put_user macro for 64bits arguments
  microblaze: Clear print messages for DTB passing via r7
  microblaze: Not to clear r7 after copying DTB to kernel
  microblaze: Add messages about FDT blob
  microblaze: Final support for statically linked DTB
  microblaze: remove duplicated #include
  microblaze: Define tlb_flush macro
parents ca597a02 950b260e
Loading
Loading
Loading
Loading
+18 −17
Original line number Diff line number Diff line
@@ -6,14 +6,16 @@ endif

# What CPU vesion are we building for, and crack it open
# as major.minor.rev
CPU_VER=$(subst ",,$(CONFIG_XILINX_MICROBLAZE0_HW_VER) )
CPU_MAJOR=$(shell echo $(CPU_VER) | cut -d '.' -f 1)
CPU_MINOR=$(shell echo $(CPU_VER) | cut -d '.' -f 2)
CPU_REV=$(shell echo $(CPU_VER) | cut -d '.' -f 3)
CPU_VER   := $(shell echo $(CONFIG_XILINX_MICROBLAZE0_HW_VER))
CPU_MAJOR := $(shell echo $(CPU_VER) | cut -d '.' -f 1)
CPU_MINOR := $(shell echo $(CPU_VER) | cut -d '.' -f 2)
CPU_REV   := $(shell echo $(CPU_VER) | cut -d '.' -f 3)

export CPU_VER CPU_MAJOR CPU_MINOR CPU_REV

# Use cpu-related CONFIG_ vars to set compile options.
# The various CONFIG_XILINX cpu features options are integers 0/1/2...
# rather than bools y/n

# Work out HW multipler support.  This is icky.
# 1. Spartan2 has no HW multiplers.
@@ -34,30 +36,29 @@ CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR) += -mxl-pattern-compare

CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER))

# The various CONFIG_XILINX cpu features options are integers 0/1/2...
# rather than bools y/n

# r31 holds current when in kernel mode
CFLAGS_KERNEL += -ffixed-r31 $(CPUFLAGS-1) $(CPUFLAGS-2)
KBUILD_KERNEL += -ffixed-r31 $(CPUFLAGS-1) $(CPUFLAGS-2)

LDFLAGS		:=
LDFLAGS_vmlinux	:=
LDFLAGS_BLOB := --format binary --oformat elf32-microblaze

LIBGCC := $(shell $(CC) $(CFLAGS_KERNEL) -print-libgcc-file-name)
LIBGCC := $(shell $(CC) $(KBUILD_KERNEL) -print-libgcc-file-name)

head-y := arch/microblaze/kernel/head.o
libs-y		+= arch/microblaze/lib/ $(LIBGCC)
core-y		+= arch/microblaze/kernel/ arch/microblaze/mm/ \
		   arch/microblaze/platform/
libs-y += arch/microblaze/lib/
libs-y += $(LIBGCC)
core-y += arch/microblaze/kernel/
core-y += arch/microblaze/mm/
core-y += arch/microblaze/platform/

boot := arch/$(ARCH)/boot
boot := arch/microblaze/boot

# defines filename extension depending memory management type
ifeq ($(CONFIG_MMU),)
MMUEXT		:= -nommu
MMU := -nommu
endif
export	MMUEXT

export MMU

all: linux.bin

+0 −1
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@
#include <asm/byteorder.h>
#include <asm/page.h>
#include <linux/types.h>
#include <asm/byteorder.h>
#include <linux/mm.h>          /* Get struct page {...} */


+3 −3
Original line number Diff line number Diff line
@@ -185,6 +185,7 @@ static inline pte_t pte_mkspecial(pte_t pte) { return pte; }

/* Definitions for MicroBlaze. */
#define	_PAGE_GUARDED	0x001	/* G: page is guarded from prefetch */
#define _PAGE_FILE	0x001	/* when !present: nonlinear file mapping */
#define _PAGE_PRESENT	0x002	/* software: PTE contains a translation */
#define	_PAGE_NO_CACHE	0x004	/* I: caching is inhibited */
#define	_PAGE_WRITETHRU	0x008	/* W: caching is write-through */
@@ -320,8 +321,7 @@ static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; }
static inline int pte_exec(pte_t pte)  { return pte_val(pte) & _PAGE_EXEC; }
static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
/* FIXME */
static inline int pte_file(pte_t pte)		{ return 0; }
static inline int pte_file(pte_t pte)  { return pte_val(pte) & _PAGE_FILE; }

static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; }
static inline void pte_cache(pte_t pte)   { pte_val(pte) &= ~_PAGE_NO_CACHE; }
@@ -488,7 +488,7 @@ static inline pmd_t *pmd_offset(pgd_t *dir, unsigned long address)
/* Encode and decode a nonlinear file mapping entry */
#define PTE_FILE_MAX_BITS	29
#define pte_to_pgoff(pte)	(pte_val(pte) >> 3)
#define pgoff_to_pte(off)	((pte_t) { ((off) << 3) })
#define pgoff_to_pte(off)	((pte_t) { ((off) << 3) | _PAGE_FILE })

extern pgd_t swapper_pg_dir[PTRS_PER_PGD];

+13 −10
Original line number Diff line number Diff line
@@ -16,6 +16,18 @@
#define _ASM_MICROBLAZE_PROM_H
#ifdef __KERNEL__

/* Definitions used by the flattened device tree */
#define OF_DT_HEADER		0xd00dfeed /* marker */
#define OF_DT_BEGIN_NODE	0x1 /* Start of node, full name */
#define OF_DT_END_NODE		0x2 /* End node */
#define OF_DT_PROP		0x3 /* Property: name off, size, content */
#define OF_DT_NOP		0x4 /* nop */
#define OF_DT_END		0x9

#define OF_DT_VERSION		0x10

#ifndef __ASSEMBLY__

#include <linux/types.h>
#include <linux/proc_fs.h>
#include <linux/platform_device.h>
@@ -29,16 +41,6 @@
#define of_prop_cmp(s1, s2)		strcmp((s1), (s2))
#define of_node_cmp(s1, s2)		strcasecmp((s1), (s2))

/* Definitions used by the flattened device tree */
#define OF_DT_HEADER		0xd00dfeed /* marker */
#define OF_DT_BEGIN_NODE	0x1 /* Start of node, full name */
#define OF_DT_END_NODE		0x2 /* End node */
#define OF_DT_PROP		0x3 /* Property: name off, size, content */
#define OF_DT_NOP		0x4 /* nop */
#define OF_DT_END		0x9

#define OF_DT_VERSION		0x10

/*
 * This is what gets passed to the kernel by prom_init or kexec
 *
@@ -309,5 +311,6 @@ extern void __iomem *of_iomap(struct device_node *device, int index);
 */
#include <linux/of.h>

#endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */
#endif /* _ASM_MICROBLAZE_PROM_H */
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@
#ifndef _ASM_MICROBLAZE_TLB_H
#define _ASM_MICROBLAZE_TLB_H

#define tlb_flush(tlb)	do {} while (0)
#define tlb_flush(tlb)	flush_tlb_mm((tlb)->mm)

#include <asm-generic/tlb.h>

Loading