aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/microblaze/include')
-rw-r--r--arch/microblaze/include/asm/byteorder.h4
-rw-r--r--arch/microblaze/include/asm/checksum.h9
-rw-r--r--arch/microblaze/include/asm/cpuinfo.h5
-rw-r--r--arch/microblaze/include/asm/elf.h2
-rw-r--r--arch/microblaze/include/asm/gpio.h5
-rw-r--r--arch/microblaze/include/asm/io.h2
-rw-r--r--arch/microblaze/include/asm/irqflags.h193
-rw-r--r--arch/microblaze/include/asm/memblock.h3
-rw-r--r--arch/microblaze/include/asm/page.h3
-rw-r--r--arch/microblaze/include/asm/pci.h2
-rw-r--r--arch/microblaze/include/asm/pgalloc.h3
-rw-r--r--arch/microblaze/include/asm/pgtable.h7
-rw-r--r--arch/microblaze/include/asm/prom.h1
-rw-r--r--arch/microblaze/include/asm/pvr.h14
-rw-r--r--arch/microblaze/include/asm/seccomp.h16
-rw-r--r--arch/microblaze/include/asm/setup.h6
-rw-r--r--arch/microblaze/include/asm/thread_info.h20
-rw-r--r--arch/microblaze/include/asm/unaligned.h12
-rw-r--r--arch/microblaze/include/asm/unistd.h5
19 files changed, 184 insertions, 128 deletions
diff --git a/arch/microblaze/include/asm/byteorder.h b/arch/microblaze/include/asm/byteorder.h
index ce9c58732ff..31902762a42 100644
--- a/arch/microblaze/include/asm/byteorder.h
+++ b/arch/microblaze/include/asm/byteorder.h
@@ -1,6 +1,10 @@
1#ifndef _ASM_MICROBLAZE_BYTEORDER_H 1#ifndef _ASM_MICROBLAZE_BYTEORDER_H
2#define _ASM_MICROBLAZE_BYTEORDER_H 2#define _ASM_MICROBLAZE_BYTEORDER_H
3 3
4#ifdef __MICROBLAZEEL__
5#include <linux/byteorder/little_endian.h>
6#else
4#include <linux/byteorder/big_endian.h> 7#include <linux/byteorder/big_endian.h>
8#endif
5 9
6#endif /* _ASM_MICROBLAZE_BYTEORDER_H */ 10#endif /* _ASM_MICROBLAZE_BYTEORDER_H */
diff --git a/arch/microblaze/include/asm/checksum.h b/arch/microblaze/include/asm/checksum.h
index 128bf03b54b..0185cbefdda 100644
--- a/arch/microblaze/include/asm/checksum.h
+++ b/arch/microblaze/include/asm/checksum.h
@@ -24,8 +24,13 @@ csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
24 "addc %0, %0, %3\n\t" 24 "addc %0, %0, %3\n\t"
25 "addc %0, %0, r0\n\t" 25 "addc %0, %0, r0\n\t"
26 : "+&d" (sum) 26 : "+&d" (sum)
27 : "d" (saddr), "d" (daddr), "d" (len + proto)); 27 : "d" (saddr), "d" (daddr),
28 28#ifdef __MICROBLAZEEL__
29 "d" ((len + proto) << 8)
30#else
31 "d" (len + proto)
32#endif
33);
29 return sum; 34 return sum;
30} 35}
31 36
diff --git a/arch/microblaze/include/asm/cpuinfo.h b/arch/microblaze/include/asm/cpuinfo.h
index b4f5ca33aeb..cd257537ae5 100644
--- a/arch/microblaze/include/asm/cpuinfo.h
+++ b/arch/microblaze/include/asm/cpuinfo.h
@@ -38,6 +38,7 @@ struct cpuinfo {
38 u32 use_exc; 38 u32 use_exc;
39 u32 ver_code; 39 u32 ver_code;
40 u32 mmu; 40 u32 mmu;
41 u32 endian;
41 42
42 /* CPU caches */ 43 /* CPU caches */
43 u32 use_icache; 44 u32 use_icache;
@@ -76,7 +77,6 @@ struct cpuinfo {
76 u32 num_rd_brk; 77 u32 num_rd_brk;
77 u32 num_wr_brk; 78 u32 num_wr_brk;
78 u32 cpu_clock_freq; /* store real freq of cpu */ 79 u32 cpu_clock_freq; /* store real freq of cpu */
79 u32 freq_div_hz; /* store freq/HZ */
80 80
81 /* FPGA family */ 81 /* FPGA family */
82 u32 fpga_family_code; 82 u32 fpga_family_code;
@@ -97,7 +97,8 @@ void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu);
97static inline unsigned int fcpu(struct device_node *cpu, char *n) 97static inline unsigned int fcpu(struct device_node *cpu, char *n)
98{ 98{
99 int *val; 99 int *val;
100 return (val = (int *) of_get_property(cpu, n, NULL)) ? *val : 0; 100 return (val = (int *) of_get_property(cpu, n, NULL)) ?
101 be32_to_cpup(val) : 0;
101} 102}
102 103
103#endif /* _ASM_MICROBLAZE_CPUINFO_H */ 104#endif /* _ASM_MICROBLAZE_CPUINFO_H */
diff --git a/arch/microblaze/include/asm/elf.h b/arch/microblaze/include/asm/elf.h
index 732caf1be74..098dfdde4b0 100644
--- a/arch/microblaze/include/asm/elf.h
+++ b/arch/microblaze/include/asm/elf.h
@@ -71,7 +71,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
71 71
72#define ELF_ET_DYN_BASE (0x08000000) 72#define ELF_ET_DYN_BASE (0x08000000)
73 73
74#ifdef __LITTLE_ENDIAN__ 74#ifdef __MICROBLAZEEL__
75#define ELF_DATA ELFDATA2LSB 75#define ELF_DATA ELFDATA2LSB
76#else 76#else
77#define ELF_DATA ELFDATA2MSB 77#define ELF_DATA ELFDATA2MSB
diff --git a/arch/microblaze/include/asm/gpio.h b/arch/microblaze/include/asm/gpio.h
index 2345ac354d9..2b2c18be71c 100644
--- a/arch/microblaze/include/asm/gpio.h
+++ b/arch/microblaze/include/asm/gpio.h
@@ -38,12 +38,9 @@ static inline int gpio_cansleep(unsigned int gpio)
38 return __gpio_cansleep(gpio); 38 return __gpio_cansleep(gpio);
39} 39}
40 40
41/*
42 * Not implemented, yet.
43 */
44static inline int gpio_to_irq(unsigned int gpio) 41static inline int gpio_to_irq(unsigned int gpio)
45{ 42{
46 return -ENOSYS; 43 return __gpio_to_irq(gpio);
47} 44}
48 45
49static inline int irq_to_gpio(unsigned int irq) 46static inline int irq_to_gpio(unsigned int irq)
diff --git a/arch/microblaze/include/asm/io.h b/arch/microblaze/include/asm/io.h
index 00b5398d08c..eae32220f44 100644
--- a/arch/microblaze/include/asm/io.h
+++ b/arch/microblaze/include/asm/io.h
@@ -243,6 +243,8 @@ static inline void __iomem *__ioremap(phys_addr_t address, unsigned long size,
243#define out_8(a, v) __raw_writeb((v), (a)) 243#define out_8(a, v) __raw_writeb((v), (a))
244#define in_8(a) __raw_readb(a) 244#define in_8(a) __raw_readb(a)
245 245
246#define mmiowb()
247
246#define ioport_map(port, nr) ((void __iomem *)(port)) 248#define ioport_map(port, nr) ((void __iomem *)(port))
247#define ioport_unmap(addr) 249#define ioport_unmap(addr)
248 250
diff --git a/arch/microblaze/include/asm/irqflags.h b/arch/microblaze/include/asm/irqflags.h
index 2c38c6d8017..5fd31905775 100644
--- a/arch/microblaze/include/asm/irqflags.h
+++ b/arch/microblaze/include/asm/irqflags.h
@@ -9,103 +9,114 @@
9#ifndef _ASM_MICROBLAZE_IRQFLAGS_H 9#ifndef _ASM_MICROBLAZE_IRQFLAGS_H
10#define _ASM_MICROBLAZE_IRQFLAGS_H 10#define _ASM_MICROBLAZE_IRQFLAGS_H
11 11
12#include <linux/irqflags.h> 12#include <linux/types.h>
13#include <asm/registers.h> 13#include <asm/registers.h>
14 14
15# if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR 15#ifdef CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
16 16
17# define raw_local_irq_save(flags) \ 17static inline unsigned long arch_local_irq_save(void)
18 do { \ 18{
19 asm volatile (" msrclr %0, %1; \ 19 unsigned long flags;
20 nop;" \ 20 asm volatile(" msrclr %0, %1 \n"
21 : "=r"(flags) \ 21 " nop \n"
22 : "i"(MSR_IE) \ 22 : "=r"(flags)
23 : "memory"); \ 23 : "i"(MSR_IE)
24 } while (0) 24 : "memory");
25 25 return flags;
26# define raw_local_irq_disable() \ 26}
27 do { \ 27
28 asm volatile (" msrclr r0, %0; \ 28static inline void arch_local_irq_disable(void)
29 nop;" \ 29{
30 : \ 30 /* this uses r0 without declaring it - is that correct? */
31 : "i"(MSR_IE) \ 31 asm volatile(" msrclr r0, %0 \n"
32 : "memory"); \ 32 " nop \n"
33 } while (0) 33 :
34 34 : "i"(MSR_IE)
35# define raw_local_irq_enable() \ 35 : "memory");
36 do { \ 36}
37 asm volatile (" msrset r0, %0; \ 37
38 nop;" \ 38static inline void arch_local_irq_enable(void)
39 : \ 39{
40 : "i"(MSR_IE) \ 40 /* this uses r0 without declaring it - is that correct? */
41 : "memory"); \ 41 asm volatile(" msrset r0, %0 \n"
42 } while (0) 42 " nop \n"
43 43 :
44# else /* CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR == 0 */ 44 : "i"(MSR_IE)
45 45 : "memory");
46# define raw_local_irq_save(flags) \ 46}
47 do { \ 47
48 register unsigned tmp; \ 48#else /* !CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR */
49 asm volatile (" mfs %0, rmsr; \ 49
50 nop; \ 50static inline unsigned long arch_local_irq_save(void)
51 andi %1, %0, %2; \ 51{
52 mts rmsr, %1; \ 52 unsigned long flags, tmp;
53 nop;" \ 53 asm volatile (" mfs %0, rmsr \n"
54 : "=r"(flags), "=r" (tmp) \ 54 " nop \n"
55 : "i"(~MSR_IE) \ 55 " andi %1, %0, %2 \n"
56 : "memory"); \ 56 " mts rmsr, %1 \n"
57 } while (0) 57 " nop \n"
58 58 : "=r"(flags), "=r"(tmp)
59# define raw_local_irq_disable() \ 59 : "i"(~MSR_IE)
60 do { \ 60 : "memory");
61 register unsigned tmp; \ 61 return flags;
62 asm volatile (" mfs %0, rmsr; \ 62}
63 nop; \ 63
64 andi %0, %0, %1; \ 64static inline void arch_local_irq_disable(void)
65 mts rmsr, %0; \ 65{
66 nop;" \ 66 unsigned long tmp;
67 : "=r"(tmp) \ 67 asm volatile(" mfs %0, rmsr \n"
68 : "i"(~MSR_IE) \ 68 " nop \n"
69 : "memory"); \ 69 " andi %0, %0, %1 \n"
70 } while (0) 70 " mts rmsr, %0 \n"
71 71 " nop \n"
72# define raw_local_irq_enable() \ 72 : "=r"(tmp)
73 do { \ 73 : "i"(~MSR_IE)
74 register unsigned tmp; \ 74 : "memory");
75 asm volatile (" mfs %0, rmsr; \ 75}
76 nop; \ 76
77 ori %0, %0, %1; \ 77static inline void arch_local_irq_enable(void)
78 mts rmsr, %0; \ 78{
79 nop;" \ 79 unsigned long tmp;
80 : "=r"(tmp) \ 80 asm volatile(" mfs %0, rmsr \n"
81 : "i"(MSR_IE) \ 81 " nop \n"
82 : "memory"); \ 82 " ori %0, %0, %1 \n"
83 } while (0) 83 " mts rmsr, %0 \n"
84 84 " nop \n"
85# endif /* CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR */ 85 : "=r"(tmp)
86 86 : "i"(MSR_IE)
87#define raw_local_irq_restore(flags) \ 87 : "memory");
88 do { \ 88}
89 asm volatile (" mts rmsr, %0; \ 89
90 nop;" \ 90#endif /* CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR */
91 : \ 91
92 : "r"(flags) \ 92static inline unsigned long arch_local_save_flags(void)
93 : "memory"); \
94 } while (0)
95
96static inline unsigned long get_msr(void)
97{ 93{
98 unsigned long flags; 94 unsigned long flags;
99 asm volatile (" mfs %0, rmsr; \ 95 asm volatile(" mfs %0, rmsr \n"
100 nop;" \ 96 " nop \n"
101 : "=r"(flags) \ 97 : "=r"(flags)
102 : \ 98 :
103 : "memory"); \ 99 : "memory");
104 return flags; 100 return flags;
105} 101}
106 102
107#define raw_local_save_flags(flags) ((flags) = get_msr()) 103static inline void arch_local_irq_restore(unsigned long flags)
108#define raw_irqs_disabled() ((get_msr() & MSR_IE) == 0) 104{
109#define raw_irqs_disabled_flags(flags) ((flags & MSR_IE) == 0) 105 asm volatile(" mts rmsr, %0 \n"
106 " nop \n"
107 :
108 : "r"(flags)
109 : "memory");
110}
111
112static inline bool arch_irqs_disabled_flags(unsigned long flags)
113{
114 return (flags & MSR_IE) == 0;
115}
116
117static inline bool arch_irqs_disabled(void)
118{
119 return arch_irqs_disabled_flags(arch_local_save_flags());
120}
110 121
111#endif /* _ASM_MICROBLAZE_IRQFLAGS_H */ 122#endif /* _ASM_MICROBLAZE_IRQFLAGS_H */
diff --git a/arch/microblaze/include/asm/memblock.h b/arch/microblaze/include/asm/memblock.h
index f9c2fa331d2..20a8e257c77 100644
--- a/arch/microblaze/include/asm/memblock.h
+++ b/arch/microblaze/include/asm/memblock.h
@@ -9,9 +9,6 @@
9#ifndef _ASM_MICROBLAZE_MEMBLOCK_H 9#ifndef _ASM_MICROBLAZE_MEMBLOCK_H
10#define _ASM_MICROBLAZE_MEMBLOCK_H 10#define _ASM_MICROBLAZE_MEMBLOCK_H
11 11
12/* MEMBLOCK limit is OFF */
13#define MEMBLOCK_REAL_LIMIT 0xFFFFFFFF
14
15#endif /* _ASM_MICROBLAZE_MEMBLOCK_H */ 12#endif /* _ASM_MICROBLAZE_MEMBLOCK_H */
16 13
17 14
diff --git a/arch/microblaze/include/asm/page.h b/arch/microblaze/include/asm/page.h
index cf377d91da7..ed9d0f6e2cd 100644
--- a/arch/microblaze/include/asm/page.h
+++ b/arch/microblaze/include/asm/page.h
@@ -205,9 +205,6 @@ extern int page_is_ram(unsigned long pfn);
205#define TOPHYS(addr) __virt_to_phys(addr) 205#define TOPHYS(addr) __virt_to_phys(addr)
206 206
207#ifdef CONFIG_MMU 207#ifdef CONFIG_MMU
208#ifdef CONFIG_CONTIGUOUS_PAGE_ALLOC
209#define WANT_PAGE_VIRTUAL 1 /* page alloc 2 relies on this */
210#endif
211 208
212#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ 209#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
213 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) 210 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
diff --git a/arch/microblaze/include/asm/pci.h b/arch/microblaze/include/asm/pci.h
index 5a388eeeb28..2232ff942ba 100644
--- a/arch/microblaze/include/asm/pci.h
+++ b/arch/microblaze/include/asm/pci.h
@@ -165,5 +165,7 @@ extern void __init xilinx_pci_init(void);
165static inline void __init xilinx_pci_init(void) { return; } 165static inline void __init xilinx_pci_init(void) { return; }
166#endif 166#endif
167 167
168#include <asm-generic/pci-dma-compat.h>
169
168#endif /* __KERNEL__ */ 170#endif /* __KERNEL__ */
169#endif /* __ASM_MICROBLAZE_PCI_H */ 171#endif /* __ASM_MICROBLAZE_PCI_H */
diff --git a/arch/microblaze/include/asm/pgalloc.h b/arch/microblaze/include/asm/pgalloc.h
index c614a893f8a..ebd35792482 100644
--- a/arch/microblaze/include/asm/pgalloc.h
+++ b/arch/microblaze/include/asm/pgalloc.h
@@ -165,7 +165,8 @@ extern inline void pte_free(struct mm_struct *mm, struct page *ptepage)
165 165
166#define __pte_free_tlb(tlb, pte, addr) pte_free((tlb)->mm, (pte)) 166#define __pte_free_tlb(tlb, pte, addr) pte_free((tlb)->mm, (pte))
167 167
168#define pmd_populate(mm, pmd, pte) (pmd_val(*(pmd)) = page_address(pte)) 168#define pmd_populate(mm, pmd, pte) \
169 (pmd_val(*(pmd)) = (unsigned long)page_address(pte))
169 170
170#define pmd_populate_kernel(mm, pmd, pte) \ 171#define pmd_populate_kernel(mm, pmd, pte) \
171 (pmd_val(*(pmd)) = (unsigned long) (pte)) 172 (pmd_val(*(pmd)) = (unsigned long) (pte))
diff --git a/arch/microblaze/include/asm/pgtable.h b/arch/microblaze/include/asm/pgtable.h
index ca2d9287154..d4f421672d3 100644
--- a/arch/microblaze/include/asm/pgtable.h
+++ b/arch/microblaze/include/asm/pgtable.h
@@ -57,6 +57,13 @@ static inline int pte_file(pte_t pte) { return 0; }
57 57
58#define pgprot_noncached_wc(prot) prot 58#define pgprot_noncached_wc(prot) prot
59 59
60/*
61 * All 32bit addresses are effectively valid for vmalloc...
62 * Sort of meaningless for non-VM targets.
63 */
64#define VMALLOC_START 0
65#define VMALLOC_END 0xffffffff
66
60#else /* CONFIG_MMU */ 67#else /* CONFIG_MMU */
61 68
62#include <asm-generic/4level-fixup.h> 69#include <asm-generic/4level-fixup.h>
diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 101fa098f62..bdc38312ae4 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -27,6 +27,7 @@
27 27
28/* Other Prototypes */ 28/* Other Prototypes */
29extern int early_uartlite_console(void); 29extern int early_uartlite_console(void);
30extern int early_uart16550_console(void);
30 31
31#ifdef CONFIG_PCI 32#ifdef CONFIG_PCI
32/* 33/*
diff --git a/arch/microblaze/include/asm/pvr.h b/arch/microblaze/include/asm/pvr.h
index 9578666e98b..37db96a15b4 100644
--- a/arch/microblaze/include/asm/pvr.h
+++ b/arch/microblaze/include/asm/pvr.h
@@ -30,7 +30,9 @@ struct pvr_s {
30#define PVR0_USE_EXC_MASK 0x04000000 30#define PVR0_USE_EXC_MASK 0x04000000
31#define PVR0_USE_ICACHE_MASK 0x02000000 31#define PVR0_USE_ICACHE_MASK 0x02000000
32#define PVR0_USE_DCACHE_MASK 0x01000000 32#define PVR0_USE_DCACHE_MASK 0x01000000
33#define PVR0_USE_MMU 0x00800000 /* new */ 33#define PVR0_USE_MMU 0x00800000
34#define PVR0_USE_BTC 0x00400000
35#define PVR0_ENDI 0x00200000
34#define PVR0_VERSION_MASK 0x0000FF00 36#define PVR0_VERSION_MASK 0x0000FF00
35#define PVR0_USER1_MASK 0x000000FF 37#define PVR0_USER1_MASK 0x000000FF
36 38
@@ -38,9 +40,9 @@ struct pvr_s {
38#define PVR1_USER2_MASK 0xFFFFFFFF 40#define PVR1_USER2_MASK 0xFFFFFFFF
39 41
40/* Configuration PVR masks */ 42/* Configuration PVR masks */
41#define PVR2_D_OPB_MASK 0x80000000 43#define PVR2_D_OPB_MASK 0x80000000 /* or AXI */
42#define PVR2_D_LMB_MASK 0x40000000 44#define PVR2_D_LMB_MASK 0x40000000
43#define PVR2_I_OPB_MASK 0x20000000 45#define PVR2_I_OPB_MASK 0x20000000 /* or AXI */
44#define PVR2_I_LMB_MASK 0x10000000 46#define PVR2_I_LMB_MASK 0x10000000
45#define PVR2_INTERRUPT_IS_EDGE_MASK 0x08000000 47#define PVR2_INTERRUPT_IS_EDGE_MASK 0x08000000
46#define PVR2_EDGE_IS_POSITIVE_MASK 0x04000000 48#define PVR2_EDGE_IS_POSITIVE_MASK 0x04000000
@@ -63,8 +65,8 @@ struct pvr_s {
63#define PVR2_OPCODE_0x0_ILL_MASK 0x00000040 65#define PVR2_OPCODE_0x0_ILL_MASK 0x00000040
64#define PVR2_UNALIGNED_EXC_MASK 0x00000020 66#define PVR2_UNALIGNED_EXC_MASK 0x00000020
65#define PVR2_ILL_OPCODE_EXC_MASK 0x00000010 67#define PVR2_ILL_OPCODE_EXC_MASK 0x00000010
66#define PVR2_IOPB_BUS_EXC_MASK 0x00000008 68#define PVR2_IOPB_BUS_EXC_MASK 0x00000008 /* or AXI */
67#define PVR2_DOPB_BUS_EXC_MASK 0x00000004 69#define PVR2_DOPB_BUS_EXC_MASK 0x00000004 /* or AXI */
68#define PVR2_DIV_ZERO_EXC_MASK 0x00000002 70#define PVR2_DIV_ZERO_EXC_MASK 0x00000002
69#define PVR2_FPU_EXC_MASK 0x00000001 71#define PVR2_FPU_EXC_MASK 0x00000001
70 72
@@ -208,6 +210,8 @@ struct pvr_s {
208#define PVR_MMU_TLB_ACCESS(pvr) (pvr.pvr[11] & PVR11_MMU_TLB_ACCESS) 210#define PVR_MMU_TLB_ACCESS(pvr) (pvr.pvr[11] & PVR11_MMU_TLB_ACCESS)
209#define PVR_MMU_ZONES(pvr) (pvr.pvr[11] & PVR11_MMU_ZONES) 211#define PVR_MMU_ZONES(pvr) (pvr.pvr[11] & PVR11_MMU_ZONES)
210 212
213/* endian */
214#define PVR_ENDIAN(pvr) (pvr.pvr[0] & PVR0_ENDI)
211 215
212int cpu_has_pvr(void); 216int cpu_has_pvr(void);
213void get_pvr(struct pvr_s *pvr); 217void get_pvr(struct pvr_s *pvr);
diff --git a/arch/microblaze/include/asm/seccomp.h b/arch/microblaze/include/asm/seccomp.h
new file mode 100644
index 00000000000..0d912758a0d
--- /dev/null
+++ b/arch/microblaze/include/asm/seccomp.h
@@ -0,0 +1,16 @@
1#ifndef _ASM_MICROBLAZE_SECCOMP_H
2#define _ASM_MICROBLAZE_SECCOMP_H
3
4#include <linux/unistd.h>
5
6#define __NR_seccomp_read __NR_read
7#define __NR_seccomp_write __NR_write
8#define __NR_seccomp_exit __NR_exit
9#define __NR_seccomp_sigreturn __NR_sigreturn
10
11#define __NR_seccomp_read_32 __NR_read
12#define __NR_seccomp_write_32 __NR_write
13#define __NR_seccomp_exit_32 __NR_exit
14#define __NR_seccomp_sigreturn_32 __NR_sigreturn
15
16#endif /* _ASM_MICROBLAZE_SECCOMP_H */
diff --git a/arch/microblaze/include/asm/setup.h b/arch/microblaze/include/asm/setup.h
index 782b5c89248..8f3968971e4 100644
--- a/arch/microblaze/include/asm/setup.h
+++ b/arch/microblaze/include/asm/setup.h
@@ -25,6 +25,12 @@ void early_printk(const char *fmt, ...);
25int setup_early_printk(char *opt); 25int setup_early_printk(char *opt);
26void disable_early_printk(void); 26void disable_early_printk(void);
27 27
28#if defined(CONFIG_EARLY_PRINTK)
29#define eprintk early_printk
30#else
31#define eprintk printk
32#endif
33
28void heartbeat(void); 34void heartbeat(void);
29void setup_heartbeat(void); 35void setup_heartbeat(void);
30 36
diff --git a/arch/microblaze/include/asm/thread_info.h b/arch/microblaze/include/asm/thread_info.h
index 8a8e9fc6e0c..b73da2ac21b 100644
--- a/arch/microblaze/include/asm/thread_info.h
+++ b/arch/microblaze/include/asm/thread_info.h
@@ -127,23 +127,19 @@ static inline struct thread_info *current_thread_info(void)
127#define TIF_SECCOMP 10 /* secure computing */ 127#define TIF_SECCOMP 10 /* secure computing */
128#define TIF_FREEZE 14 /* Freezing for suspend */ 128#define TIF_FREEZE 14 /* Freezing for suspend */
129 129
130/* FIXME change in entry.S */
131#define TIF_KERNEL_TRACE 8 /* kernel trace active */
132
133/* true if poll_idle() is polling TIF_NEED_RESCHED */ 130/* true if poll_idle() is polling TIF_NEED_RESCHED */
134#define TIF_POLLING_NRFLAG 16 131#define TIF_POLLING_NRFLAG 16
135 132
136#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) 133#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
137#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) 134#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
138#define _TIF_SIGPENDING (1<<TIF_SIGPENDING) 135#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
139#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) 136#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
140#define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) 137#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
141#define _TIF_IRET (1<<TIF_IRET) 138#define _TIF_IRET (1 << TIF_IRET)
142#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) 139#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
143#define _TIF_FREEZE (1<<TIF_FREEZE) 140#define _TIF_FREEZE (1 << TIF_FREEZE)
144#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) 141#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
145#define _TIF_SECCOMP (1 << TIF_SECCOMP) 142#define _TIF_SECCOMP (1 << TIF_SECCOMP)
146#define _TIF_KERNEL_TRACE (1 << TIF_KERNEL_TRACE)
147 143
148/* work to do in syscall trace */ 144/* work to do in syscall trace */
149#define _TIF_WORK_SYSCALL_MASK (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | \ 145#define _TIF_WORK_SYSCALL_MASK (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | \
diff --git a/arch/microblaze/include/asm/unaligned.h b/arch/microblaze/include/asm/unaligned.h
index 3658d91ac0f..2b97cbe500e 100644
--- a/arch/microblaze/include/asm/unaligned.h
+++ b/arch/microblaze/include/asm/unaligned.h
@@ -12,12 +12,18 @@
12 12
13# ifdef __KERNEL__ 13# ifdef __KERNEL__
14 14
15# include <linux/unaligned/be_struct.h> 15# include <linux/unaligned/be_byteshift.h>
16# include <linux/unaligned/le_byteshift.h> 16# include <linux/unaligned/le_byteshift.h>
17# include <linux/unaligned/generic.h> 17# include <linux/unaligned/generic.h>
18 18
19# define get_unaligned __get_unaligned_be 19
20# define put_unaligned __put_unaligned_be 20# ifdef __MICROBLAZEEL__
21# define get_unaligned __get_unaligned_le
22# define put_unaligned __put_unaligned_le
23# else
24# define get_unaligned __get_unaligned_be
25# define put_unaligned __put_unaligned_be
26# endif
21 27
22# endif /* __KERNEL__ */ 28# endif /* __KERNEL__ */
23#endif /* _ASM_MICROBLAZE_UNALIGNED_H */ 29#endif /* _ASM_MICROBLAZE_UNALIGNED_H */
diff --git a/arch/microblaze/include/asm/unistd.h b/arch/microblaze/include/asm/unistd.h
index 2b67e92a773..d770b00ec6b 100644
--- a/arch/microblaze/include/asm/unistd.h
+++ b/arch/microblaze/include/asm/unistd.h
@@ -383,8 +383,11 @@
383#define __NR_rt_tgsigqueueinfo 365 /* new */ 383#define __NR_rt_tgsigqueueinfo 365 /* new */
384#define __NR_perf_event_open 366 /* new */ 384#define __NR_perf_event_open 366 /* new */
385#define __NR_recvmmsg 367 /* new */ 385#define __NR_recvmmsg 367 /* new */
386#define __NR_fanotify_init 368
387#define __NR_fanotify_mark 369
388#define __NR_prlimit64 370
386 389
387#define __NR_syscalls 368 390#define __NR_syscalls 371
388 391
389#ifdef __KERNEL__ 392#ifdef __KERNEL__
390#ifndef __ASSEMBLY__ 393#ifndef __ASSEMBLY__