mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze
* 'next' of git://git.monstr.eu/linux-2.6-microblaze: (42 commits) microblaze: Fix build with make 3.82 fbdev/xilinxfb: Microblaze driver support microblaze: Support C optimized lib functions for little-endian microblaze: Separate library optimized functions microblaze: Support timer on AXI lite microblaze: Add support for little-endian Microblaze microblaze: KGDB little endian support microblaze: Add PVR for endians plus detection net: emaclite: Add support for little-endian platforms microblaze: trivial: Add comment for AXI pvr microblaze: pci-common cleanup microblaze: Support early console on uart16550 microblaze: Do not compile early console support for uartlite if is disabled microblaze: Setup early console dynamically microblaze: Rename all uartlite early printk functions microblaze: remove early printk uarlite console dependency from header microblaze: Remove additional compatible properties microblaze: Remove hardcoded asm instraction for PVR loading microblaze: Use static const char * const where possible microblaze: Define VMALLOC_START/END ...
This commit is contained in:
@@ -121,6 +121,23 @@ config CMDLINE_FORCE
|
||||
Set this to have arguments from the default kernel command string
|
||||
override those passed by the boot loader.
|
||||
|
||||
config SECCOMP
|
||||
bool "Enable seccomp to safely compute untrusted bytecode"
|
||||
depends on PROC_FS
|
||||
default y
|
||||
help
|
||||
This kernel feature is useful for number crunching applications
|
||||
that may need to compute untrusted bytecode during their
|
||||
execution. By using pipes or other transports made available to
|
||||
the process as file descriptors supporting the read/write
|
||||
syscalls, it's possible to isolate those applications in
|
||||
their own address space using seccomp. Once seccomp is
|
||||
enabled via /proc/<pid>/seccomp, it cannot be disabled
|
||||
and the task is only allowed to execute a few safe syscalls
|
||||
defined by each seccomp mode.
|
||||
|
||||
If unsure, say Y. Only embedded should say N here.
|
||||
|
||||
endmenu
|
||||
|
||||
menu "Advanced setup"
|
||||
|
||||
@@ -10,7 +10,7 @@ source "lib/Kconfig.debug"
|
||||
|
||||
config EARLY_PRINTK
|
||||
bool "Early printk function for kernel"
|
||||
depends on SERIAL_UARTLITE_CONSOLE
|
||||
depends on SERIAL_UARTLITE_CONSOLE || SERIAL_8250_CONSOLE
|
||||
default n
|
||||
help
|
||||
This option turns on/off early printk messages to console.
|
||||
|
||||
@@ -42,11 +42,8 @@ KBUILD_CFLAGS += -ffixed-r31 $(CPUFLAGS-1) $(CPUFLAGS-2)
|
||||
LDFLAGS :=
|
||||
LDFLAGS_vmlinux :=
|
||||
|
||||
LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
|
||||
|
||||
head-y := arch/microblaze/kernel/head.o
|
||||
libs-y += arch/microblaze/lib/
|
||||
libs-y += $(LIBGCC)
|
||||
core-y += arch/microblaze/kernel/
|
||||
core-y += arch/microblaze/mm/
|
||||
core-y += arch/microblaze/platform/
|
||||
@@ -72,12 +69,16 @@ export MMU DTB
|
||||
|
||||
all: linux.bin
|
||||
|
||||
BOOT_TARGETS = linux.bin linux.bin.gz simpleImage.%
|
||||
# With make 3.82 we cannot mix normal and wildcard targets
|
||||
BOOT_TARGETS1 = linux.bin linux.bin.gz
|
||||
BOOT_TARGETS2 = simpleImage.%
|
||||
|
||||
archclean:
|
||||
$(Q)$(MAKE) $(clean)=$(boot)
|
||||
|
||||
$(BOOT_TARGETS): vmlinux
|
||||
$(BOOT_TARGETS1): vmlinux
|
||||
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
|
||||
$(BOOT_TARGETS2): vmlinux
|
||||
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
|
||||
|
||||
define archhelp
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef _ASM_MICROBLAZE_BYTEORDER_H
|
||||
#define _ASM_MICROBLAZE_BYTEORDER_H
|
||||
|
||||
#ifdef __MICROBLAZEEL__
|
||||
#include <linux/byteorder/little_endian.h>
|
||||
#else
|
||||
#include <linux/byteorder/big_endian.h>
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_MICROBLAZE_BYTEORDER_H */
|
||||
|
||||
@@ -24,8 +24,13 @@ csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
|
||||
"addc %0, %0, %3\n\t"
|
||||
"addc %0, %0, r0\n\t"
|
||||
: "+&d" (sum)
|
||||
: "d" (saddr), "d" (daddr), "d" (len + proto));
|
||||
|
||||
: "d" (saddr), "d" (daddr),
|
||||
#ifdef __MICROBLAZEEL__
|
||||
"d" ((len + proto) << 8)
|
||||
#else
|
||||
"d" (len + proto)
|
||||
#endif
|
||||
);
|
||||
return sum;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ struct cpuinfo {
|
||||
u32 use_exc;
|
||||
u32 ver_code;
|
||||
u32 mmu;
|
||||
u32 endian;
|
||||
|
||||
/* CPU caches */
|
||||
u32 use_icache;
|
||||
@@ -76,7 +77,6 @@ struct cpuinfo {
|
||||
u32 num_rd_brk;
|
||||
u32 num_wr_brk;
|
||||
u32 cpu_clock_freq; /* store real freq of cpu */
|
||||
u32 freq_div_hz; /* store freq/HZ */
|
||||
|
||||
/* FPGA family */
|
||||
u32 fpga_family_code;
|
||||
@@ -97,7 +97,8 @@ void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu);
|
||||
static inline unsigned int fcpu(struct device_node *cpu, char *n)
|
||||
{
|
||||
int *val;
|
||||
return (val = (int *) of_get_property(cpu, n, NULL)) ? *val : 0;
|
||||
return (val = (int *) of_get_property(cpu, n, NULL)) ?
|
||||
be32_to_cpup(val) : 0;
|
||||
}
|
||||
|
||||
#endif /* _ASM_MICROBLAZE_CPUINFO_H */
|
||||
|
||||
@@ -71,7 +71,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
|
||||
|
||||
#define ELF_ET_DYN_BASE (0x08000000)
|
||||
|
||||
#ifdef __LITTLE_ENDIAN__
|
||||
#ifdef __MICROBLAZEEL__
|
||||
#define ELF_DATA ELFDATA2LSB
|
||||
#else
|
||||
#define ELF_DATA ELFDATA2MSB
|
||||
|
||||
@@ -38,12 +38,9 @@ static inline int gpio_cansleep(unsigned int gpio)
|
||||
return __gpio_cansleep(gpio);
|
||||
}
|
||||
|
||||
/*
|
||||
* Not implemented, yet.
|
||||
*/
|
||||
static inline int gpio_to_irq(unsigned int gpio)
|
||||
{
|
||||
return -ENOSYS;
|
||||
return __gpio_to_irq(gpio);
|
||||
}
|
||||
|
||||
static inline int irq_to_gpio(unsigned int irq)
|
||||
|
||||
@@ -243,6 +243,8 @@ static inline void __iomem *__ioremap(phys_addr_t address, unsigned long size,
|
||||
#define out_8(a, v) __raw_writeb((v), (a))
|
||||
#define in_8(a) __raw_readb(a)
|
||||
|
||||
#define mmiowb()
|
||||
|
||||
#define ioport_map(port, nr) ((void __iomem *)(port))
|
||||
#define ioport_unmap(addr)
|
||||
|
||||
|
||||
@@ -205,9 +205,6 @@ extern int page_is_ram(unsigned long pfn);
|
||||
#define TOPHYS(addr) __virt_to_phys(addr)
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
#ifdef CONFIG_CONTIGUOUS_PAGE_ALLOC
|
||||
#define WANT_PAGE_VIRTUAL 1 /* page alloc 2 relies on this */
|
||||
#endif
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
@@ -165,5 +165,7 @@ extern void __init xilinx_pci_init(void);
|
||||
static inline void __init xilinx_pci_init(void) { return; }
|
||||
#endif
|
||||
|
||||
#include <asm-generic/pci-dma-compat.h>
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* __ASM_MICROBLAZE_PCI_H */
|
||||
|
||||
@@ -165,7 +165,8 @@ extern inline void pte_free(struct mm_struct *mm, struct page *ptepage)
|
||||
|
||||
#define __pte_free_tlb(tlb, pte, addr) pte_free((tlb)->mm, (pte))
|
||||
|
||||
#define pmd_populate(mm, pmd, pte) (pmd_val(*(pmd)) = page_address(pte))
|
||||
#define pmd_populate(mm, pmd, pte) \
|
||||
(pmd_val(*(pmd)) = (unsigned long)page_address(pte))
|
||||
|
||||
#define pmd_populate_kernel(mm, pmd, pte) \
|
||||
(pmd_val(*(pmd)) = (unsigned long) (pte))
|
||||
|
||||
@@ -57,6 +57,13 @@ static inline int pte_file(pte_t pte) { return 0; }
|
||||
|
||||
#define pgprot_noncached_wc(prot) prot
|
||||
|
||||
/*
|
||||
* All 32bit addresses are effectively valid for vmalloc...
|
||||
* Sort of meaningless for non-VM targets.
|
||||
*/
|
||||
#define VMALLOC_START 0
|
||||
#define VMALLOC_END 0xffffffff
|
||||
|
||||
#else /* CONFIG_MMU */
|
||||
|
||||
#include <asm-generic/4level-fixup.h>
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
/* Other Prototypes */
|
||||
extern int early_uartlite_console(void);
|
||||
extern int early_uart16550_console(void);
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
/*
|
||||
|
||||
@@ -30,7 +30,9 @@ struct pvr_s {
|
||||
#define PVR0_USE_EXC_MASK 0x04000000
|
||||
#define PVR0_USE_ICACHE_MASK 0x02000000
|
||||
#define PVR0_USE_DCACHE_MASK 0x01000000
|
||||
#define PVR0_USE_MMU 0x00800000 /* new */
|
||||
#define PVR0_USE_MMU 0x00800000
|
||||
#define PVR0_USE_BTC 0x00400000
|
||||
#define PVR0_ENDI 0x00200000
|
||||
#define PVR0_VERSION_MASK 0x0000FF00
|
||||
#define PVR0_USER1_MASK 0x000000FF
|
||||
|
||||
@@ -38,9 +40,9 @@ struct pvr_s {
|
||||
#define PVR1_USER2_MASK 0xFFFFFFFF
|
||||
|
||||
/* Configuration PVR masks */
|
||||
#define PVR2_D_OPB_MASK 0x80000000
|
||||
#define PVR2_D_OPB_MASK 0x80000000 /* or AXI */
|
||||
#define PVR2_D_LMB_MASK 0x40000000
|
||||
#define PVR2_I_OPB_MASK 0x20000000
|
||||
#define PVR2_I_OPB_MASK 0x20000000 /* or AXI */
|
||||
#define PVR2_I_LMB_MASK 0x10000000
|
||||
#define PVR2_INTERRUPT_IS_EDGE_MASK 0x08000000
|
||||
#define PVR2_EDGE_IS_POSITIVE_MASK 0x04000000
|
||||
@@ -63,8 +65,8 @@ struct pvr_s {
|
||||
#define PVR2_OPCODE_0x0_ILL_MASK 0x00000040
|
||||
#define PVR2_UNALIGNED_EXC_MASK 0x00000020
|
||||
#define PVR2_ILL_OPCODE_EXC_MASK 0x00000010
|
||||
#define PVR2_IOPB_BUS_EXC_MASK 0x00000008
|
||||
#define PVR2_DOPB_BUS_EXC_MASK 0x00000004
|
||||
#define PVR2_IOPB_BUS_EXC_MASK 0x00000008 /* or AXI */
|
||||
#define PVR2_DOPB_BUS_EXC_MASK 0x00000004 /* or AXI */
|
||||
#define PVR2_DIV_ZERO_EXC_MASK 0x00000002
|
||||
#define PVR2_FPU_EXC_MASK 0x00000001
|
||||
|
||||
@@ -208,6 +210,8 @@ struct pvr_s {
|
||||
#define PVR_MMU_TLB_ACCESS(pvr) (pvr.pvr[11] & PVR11_MMU_TLB_ACCESS)
|
||||
#define PVR_MMU_ZONES(pvr) (pvr.pvr[11] & PVR11_MMU_ZONES)
|
||||
|
||||
/* endian */
|
||||
#define PVR_ENDIAN(pvr) (pvr.pvr[0] & PVR0_ENDI)
|
||||
|
||||
int cpu_has_pvr(void);
|
||||
void get_pvr(struct pvr_s *pvr);
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef _ASM_MICROBLAZE_SECCOMP_H
|
||||
#define _ASM_MICROBLAZE_SECCOMP_H
|
||||
|
||||
#include <linux/unistd.h>
|
||||
|
||||
#define __NR_seccomp_read __NR_read
|
||||
#define __NR_seccomp_write __NR_write
|
||||
#define __NR_seccomp_exit __NR_exit
|
||||
#define __NR_seccomp_sigreturn __NR_sigreturn
|
||||
|
||||
#define __NR_seccomp_read_32 __NR_read
|
||||
#define __NR_seccomp_write_32 __NR_write
|
||||
#define __NR_seccomp_exit_32 __NR_exit
|
||||
#define __NR_seccomp_sigreturn_32 __NR_sigreturn
|
||||
|
||||
#endif /* _ASM_MICROBLAZE_SECCOMP_H */
|
||||
@@ -25,6 +25,12 @@ void early_printk(const char *fmt, ...);
|
||||
int setup_early_printk(char *opt);
|
||||
void disable_early_printk(void);
|
||||
|
||||
#if defined(CONFIG_EARLY_PRINTK)
|
||||
#define eprintk early_printk
|
||||
#else
|
||||
#define eprintk printk
|
||||
#endif
|
||||
|
||||
void heartbeat(void);
|
||||
void setup_heartbeat(void);
|
||||
|
||||
|
||||
@@ -127,23 +127,19 @@ static inline struct thread_info *current_thread_info(void)
|
||||
#define TIF_SECCOMP 10 /* secure computing */
|
||||
#define TIF_FREEZE 14 /* Freezing for suspend */
|
||||
|
||||
/* FIXME change in entry.S */
|
||||
#define TIF_KERNEL_TRACE 8 /* kernel trace active */
|
||||
|
||||
/* true if poll_idle() is polling TIF_NEED_RESCHED */
|
||||
#define TIF_POLLING_NRFLAG 16
|
||||
|
||||
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
|
||||
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
|
||||
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
|
||||
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
|
||||
#define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP)
|
||||
#define _TIF_IRET (1<<TIF_IRET)
|
||||
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
|
||||
#define _TIF_FREEZE (1<<TIF_FREEZE)
|
||||
#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
|
||||
#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
|
||||
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
|
||||
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
|
||||
#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
|
||||
#define _TIF_IRET (1 << TIF_IRET)
|
||||
#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
|
||||
#define _TIF_FREEZE (1 << TIF_FREEZE)
|
||||
#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
|
||||
#define _TIF_SECCOMP (1 << TIF_SECCOMP)
|
||||
#define _TIF_KERNEL_TRACE (1 << TIF_KERNEL_TRACE)
|
||||
|
||||
/* work to do in syscall trace */
|
||||
#define _TIF_WORK_SYSCALL_MASK (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | \
|
||||
|
||||
@@ -12,12 +12,18 @@
|
||||
|
||||
# ifdef __KERNEL__
|
||||
|
||||
# include <linux/unaligned/be_struct.h>
|
||||
# include <linux/unaligned/be_byteshift.h>
|
||||
# include <linux/unaligned/le_byteshift.h>
|
||||
# include <linux/unaligned/generic.h>
|
||||
|
||||
# define get_unaligned __get_unaligned_be
|
||||
# define put_unaligned __put_unaligned_be
|
||||
|
||||
# ifdef __MICROBLAZEEL__
|
||||
# define get_unaligned __get_unaligned_le
|
||||
# define put_unaligned __put_unaligned_le
|
||||
# else
|
||||
# define get_unaligned __get_unaligned_be
|
||||
# define put_unaligned __put_unaligned_be
|
||||
# endif
|
||||
|
||||
# endif /* __KERNEL__ */
|
||||
#endif /* _ASM_MICROBLAZE_UNALIGNED_H */
|
||||
|
||||
@@ -383,8 +383,11 @@
|
||||
#define __NR_rt_tgsigqueueinfo 365 /* new */
|
||||
#define __NR_perf_event_open 366 /* new */
|
||||
#define __NR_recvmmsg 367 /* new */
|
||||
#define __NR_fanotify_init 368
|
||||
#define __NR_fanotify_mark 369
|
||||
#define __NR_prlimit64 370
|
||||
|
||||
#define __NR_syscalls 368
|
||||
#define __NR_syscalls 371
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user