Skip to content
Snippets Groups Projects
Commit 6917b51d authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull CRIS updates from Jesper Nilsson:
 "Mostly removal of old cruft of which we can use a generic version, or
  fixes for code not commonly run in the cris port, but also additions
  to enable some good debug"

* tag 'cris-for-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris: (25 commits)
  CRISv10: delete unused lib/dmacopy.c
  CRISv10: delete unused lib/old_checksum.c
  CRIS: fix switch_mm() lockdep splat
  CRISv32: enable LOCKDEP_SUPPORT
  CRIS: add STACKTRACE_SUPPORT
  CRISv32: annotate irq enable in idle loop
  CRISv32: add support for irqflags tracing
  CRIS: UAPI: use generic types.h
  CRIS: UAPI: use generic shmbuf.h
  CRIS: UAPI: use generic msgbuf.h
  CRIS: UAPI: use generic socket.h
  CRIS: UAPI: use generic sembuf.h
  CRIS: UAPI: use generic sockios.h
  CRIS: UAPI: use generic auxvec.h
  CRIS: UAPI: use generic headers via Kbuild
  CRIS: UAPI: fix elf.h export
  CRIS: don't make asm/elf.h depend on asm/user.h
  CRIS: UAPI: fix ptrace.h
  CRISv32: Squash compile warnings for axisflashmap
  CRISv32: Add GPIO driver to the default configs
  ...
parents 10fbd36e 254a0f41
No related branches found
No related tags found
No related merge requests found
Showing
with 108 additions and 169 deletions
...@@ -36,6 +36,17 @@ config FORCE_MAX_ZONEORDER ...@@ -36,6 +36,17 @@ config FORCE_MAX_ZONEORDER
int int
default 6 default 6
config TRACE_IRQFLAGS_SUPPORT
depends on ETRAX_ARCH_V32
def_bool y
config STACKTRACE_SUPPORT
def_bool y
config LOCKDEP_SUPPORT
depends on ETRAX_ARCH_V32
def_bool y
config CRIS config CRIS
bool bool
default y default y
...@@ -58,6 +69,7 @@ config CRIS ...@@ -58,6 +69,7 @@ config CRIS
select CLKSRC_MMIO if ETRAX_ARCH_V32 select CLKSRC_MMIO if ETRAX_ARCH_V32
select GENERIC_CLOCKEVENTS if ETRAX_ARCH_V32 select GENERIC_CLOCKEVENTS if ETRAX_ARCH_V32
select GENERIC_SCHED_CLOCK if ETRAX_ARCH_V32 select GENERIC_SCHED_CLOCK if ETRAX_ARCH_V32
select HAVE_DEBUG_BUGVERBOSE if ETRAX_ARCH_V32
config HZ config HZ
int int
......
...@@ -955,6 +955,14 @@ sys_call_table: ...@@ -955,6 +955,14 @@ sys_call_table:
.long sys_process_vm_writev .long sys_process_vm_writev
.long sys_kcmp /* 350 */ .long sys_kcmp /* 350 */
.long sys_finit_module .long sys_finit_module
.long sys_sched_setattr
.long sys_sched_getattr
.long sys_renameat2
.long sys_seccomp /* 355 */
.long sys_getrandom
.long sys_memfd_create
.long sys_bpf
.long sys_execveat
/* /*
* NOTE!! This doesn't have to be exact - we just have * NOTE!! This doesn't have to be exact - we just have
......
/*
* memcpy for large blocks, using memory-memory DMA channels 6 and 7 in Etrax
*/
#include <asm/svinto.h>
#include <asm/io.h>
#define D(x)
void *dma_memcpy(void *pdst,
const void *psrc,
unsigned int pn)
{
static etrax_dma_descr indma, outdma;
D(printk(KERN_DEBUG "dma_memcpy %d bytes... ", pn));
#if 0
*R_GEN_CONFIG = genconfig_shadow =
(genconfig_shadow & ~0x3c0000) |
IO_STATE(R_GEN_CONFIG, dma6, intdma7) |
IO_STATE(R_GEN_CONFIG, dma7, intdma6);
#endif
indma.sw_len = outdma.sw_len = pn;
indma.ctrl = d_eol | d_eop;
outdma.ctrl = d_eol;
indma.buf = psrc;
outdma.buf = pdst;
*R_DMA_CH6_FIRST = &indma;
*R_DMA_CH7_FIRST = &outdma;
*R_DMA_CH6_CMD = IO_STATE(R_DMA_CH6_CMD, cmd, start);
*R_DMA_CH7_CMD = IO_STATE(R_DMA_CH7_CMD, cmd, start);
while (*R_DMA_CH7_CMD == 1)
/* wait for completion */;
D(printk(KERN_DEBUG "done\n"));
}
/*
* INET An implementation of the TCP/IP protocol suite for the LINUX
* operating system. INET is implemented using the BSD Socket
* interface as the means of communication with the user level.
*
* IP/TCP/UDP checksumming routines
*
* Authors: Jorge Cwik, <jorge@laser.satlink.net>
* Arnt Gulbrandsen, <agulbra@nvg.unit.no>
* Tom May, <ftom@netcom.com>
* Lots of code moved from tcp.c and ip.c; see those files
* for more names.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#include <net/checksum.h>
#include <net/module.h>
#undef PROFILE_CHECKSUM
#ifdef PROFILE_CHECKSUM
/* these are just for profiling the checksum code with an oscillioscope.. uh */
#if 0
#define BITOFF *((unsigned char *)0xb0000030) = 0xff
#define BITON *((unsigned char *)0xb0000030) = 0x0
#endif
#include <asm/io.h>
#define CBITON LED_ACTIVE_SET(1)
#define CBITOFF LED_ACTIVE_SET(0)
#define BITOFF
#define BITON
#else
#define BITOFF
#define BITON
#define CBITOFF
#define CBITON
#endif
/*
* computes a partial checksum, e.g. for TCP/UDP fragments
*/
#include <asm/delay.h>
__wsum csum_partial(const void *p, int len, __wsum __sum)
{
u32 sum = (__force u32)__sum;
const u16 *buff = p;
/*
* Experiments with ethernet and slip connections show that buff
* is aligned on either a 2-byte or 4-byte boundary.
*/
const void *endMarker = p + len;
const void *marker = endMarker - (len % 16);
#if 0
if((int)buff & 0x3)
printk("unaligned buff %p\n", buff);
__delay(900); /* extra delay of 90 us to test performance hit */
#endif
BITON;
while (buff < marker) {
sum += *buff++;
sum += *buff++;
sum += *buff++;
sum += *buff++;
sum += *buff++;
sum += *buff++;
sum += *buff++;
sum += *buff++;
}
marker = endMarker - (len % 2);
while (buff < marker)
sum += *buff++;
if (endMarker > buff)
sum += *(const u8 *)buff; /* add extra byte separately */
BITOFF;
return (__force __wsum)sum;
}
EXPORT_SYMBOL(csum_partial);
...@@ -202,7 +202,7 @@ config ETRAX_PA_CHANGEABLE_DIR ...@@ -202,7 +202,7 @@ config ETRAX_PA_CHANGEABLE_DIR
default "0x00" if ETRAXFS default "0x00" if ETRAXFS
default "0x00000000" if !ETRAXFS default "0x00000000" if !ETRAXFS
help help
This is a bitmask (8 bits) with information of what bits in PA that a This is a bitmask with information of what bits in PA that a
user can change direction on using ioctl's. user can change direction on using ioctl's.
Bit set = changeable. Bit set = changeable.
You probably want 0 here, but it depends on your hardware. You probably want 0 here, but it depends on your hardware.
...@@ -213,7 +213,7 @@ config ETRAX_PA_CHANGEABLE_BITS ...@@ -213,7 +213,7 @@ config ETRAX_PA_CHANGEABLE_BITS
default "0x00" if ETRAXFS default "0x00" if ETRAXFS
default "0x00000000" if !ETRAXFS default "0x00000000" if !ETRAXFS
help help
This is a bitmask (8 bits) with information of what bits in PA This is a bitmask with information of what bits in PA
that a user can change the value on using ioctl's. that a user can change the value on using ioctl's.
Bit set = changeable. Bit set = changeable.
...@@ -223,7 +223,7 @@ config ETRAX_PB_CHANGEABLE_DIR ...@@ -223,7 +223,7 @@ config ETRAX_PB_CHANGEABLE_DIR
default "0x00000" if ETRAXFS default "0x00000" if ETRAXFS
default "0x00000000" if !ETRAXFS default "0x00000000" if !ETRAXFS
help help
This is a bitmask (18 bits) with information of what bits in PB This is a bitmask with information of what bits in PB
that a user can change direction on using ioctl's. that a user can change direction on using ioctl's.
Bit set = changeable. Bit set = changeable.
You probably want 0 here, but it depends on your hardware. You probably want 0 here, but it depends on your hardware.
...@@ -234,7 +234,7 @@ config ETRAX_PB_CHANGEABLE_BITS ...@@ -234,7 +234,7 @@ config ETRAX_PB_CHANGEABLE_BITS
default "0x00000" if ETRAXFS default "0x00000" if ETRAXFS
default "0x00000000" if !ETRAXFS default "0x00000000" if !ETRAXFS
help help
This is a bitmask (18 bits) with information of what bits in PB This is a bitmask with information of what bits in PB
that a user can change the value on using ioctl's. that a user can change the value on using ioctl's.
Bit set = changeable. Bit set = changeable.
...@@ -244,7 +244,7 @@ config ETRAX_PC_CHANGEABLE_DIR ...@@ -244,7 +244,7 @@ config ETRAX_PC_CHANGEABLE_DIR
default "0x00000" if ETRAXFS default "0x00000" if ETRAXFS
default "0x00000000" if !ETRAXFS default "0x00000000" if !ETRAXFS
help help
This is a bitmask (18 bits) with information of what bits in PC This is a bitmask with information of what bits in PC
that a user can change direction on using ioctl's. that a user can change direction on using ioctl's.
Bit set = changeable. Bit set = changeable.
You probably want 0 here, but it depends on your hardware. You probably want 0 here, but it depends on your hardware.
...@@ -253,9 +253,9 @@ config ETRAX_PC_CHANGEABLE_BITS ...@@ -253,9 +253,9 @@ config ETRAX_PC_CHANGEABLE_BITS
hex "PC user changeable bits mask" hex "PC user changeable bits mask"
depends on ETRAX_GPIO depends on ETRAX_GPIO
default "0x00000" if ETRAXFS default "0x00000" if ETRAXFS
default "0x00000000" if ETRAXFS default "0x00000000" if !ETRAXFS
help help
This is a bitmask (18 bits) with information of what bits in PC This is a bitmask with information of what bits in PC
that a user can change the value on using ioctl's. that a user can change the value on using ioctl's.
Bit set = changeable. Bit set = changeable.
...@@ -264,7 +264,7 @@ config ETRAX_PD_CHANGEABLE_DIR ...@@ -264,7 +264,7 @@ config ETRAX_PD_CHANGEABLE_DIR
depends on ETRAX_GPIO && ETRAXFS depends on ETRAX_GPIO && ETRAXFS
default "0x00000" default "0x00000"
help help
This is a bitmask (18 bits) with information of what bits in PD This is a bitmask with information of what bits in PD
that a user can change direction on using ioctl's. that a user can change direction on using ioctl's.
Bit set = changeable. Bit set = changeable.
You probably want 0x00000 here, but it depends on your hardware. You probably want 0x00000 here, but it depends on your hardware.
......
...@@ -313,6 +313,7 @@ static int __init init_axis_flash(void) ...@@ -313,6 +313,7 @@ static int __init init_axis_flash(void)
size_t len; size_t len;
int ram_rootfs_partition = -1; /* -1 => no RAM rootfs partition */ int ram_rootfs_partition = -1; /* -1 => no RAM rootfs partition */
int part; int part;
struct mtd_partition *partition;
/* We need a root fs. If it resides in RAM, we need to use an /* We need a root fs. If it resides in RAM, we need to use an
* MTDRAM device, so it must be enabled in the kernel config, * MTDRAM device, so it must be enabled in the kernel config,
...@@ -329,7 +330,7 @@ static int __init init_axis_flash(void) ...@@ -329,7 +330,7 @@ static int __init init_axis_flash(void)
main_mtd = flash_probe(); main_mtd = flash_probe();
if (main_mtd) if (main_mtd)
printk(KERN_INFO "%s: 0x%08x bytes of NOR flash memory.\n", printk(KERN_INFO "%s: 0x%08llx bytes of NOR flash memory.\n",
main_mtd->name, main_mtd->size); main_mtd->name, main_mtd->size);
#ifdef CONFIG_ETRAX_NANDFLASH #ifdef CONFIG_ETRAX_NANDFLASH
...@@ -388,10 +389,10 @@ static int __init init_axis_flash(void) ...@@ -388,10 +389,10 @@ static int __init init_axis_flash(void)
#endif #endif
if (main_mtd) { if (main_mtd) {
loff_t ptable_sector = CONFIG_ETRAX_PTABLE_SECTOR;
main_mtd->owner = THIS_MODULE; main_mtd->owner = THIS_MODULE;
axisflash_mtd = main_mtd; axisflash_mtd = main_mtd;
loff_t ptable_sector = CONFIG_ETRAX_PTABLE_SECTOR;
/* First partition (rescue) is always set to the default. */ /* First partition (rescue) is always set to the default. */
pidx++; pidx++;
...@@ -517,7 +518,7 @@ static int __init init_axis_flash(void) ...@@ -517,7 +518,7 @@ static int __init init_axis_flash(void)
/* Decide whether to use default partition table. */ /* Decide whether to use default partition table. */
/* Only use default table if we actually have a device (main_mtd) */ /* Only use default table if we actually have a device (main_mtd) */
struct mtd_partition *partition = &axis_partitions[0]; partition = &axis_partitions[0];
if (main_mtd && !ptable_ok) { if (main_mtd && !ptable_ok) {
memcpy(axis_partitions, axis_default_partitions, memcpy(axis_partitions, axis_default_partitions,
sizeof(axis_default_partitions)); sizeof(axis_default_partitions));
...@@ -580,7 +581,7 @@ static int __init init_axis_flash(void) ...@@ -580,7 +581,7 @@ static int __init init_axis_flash(void)
printk(KERN_INFO "axisflashmap: Adding RAM partition " printk(KERN_INFO "axisflashmap: Adding RAM partition "
"for rootfs image.\n"); "for rootfs image.\n");
err = mtdram_init_device(mtd_ram, err = mtdram_init_device(mtd_ram,
(void *)partition[part].offset, (void *)(u_int32_t)partition[part].offset,
partition[part].size, partition[part].size,
partition[part].name); partition[part].name);
if (err) if (err)
......
...@@ -957,7 +957,7 @@ static void __init virtual_gpio_init(void) ...@@ -957,7 +957,7 @@ static void __init virtual_gpio_init(void)
static int __init gpio_init(void) static int __init gpio_init(void)
{ {
int res; int res, res2;
printk(KERN_INFO "ETRAX FS GPIO driver v2.7, (c) 2003-2008 " printk(KERN_INFO "ETRAX FS GPIO driver v2.7, (c) 2003-2008 "
"Axis Communications AB\n"); "Axis Communications AB\n");
...@@ -977,7 +977,7 @@ static int __init gpio_init(void) ...@@ -977,7 +977,7 @@ static int __init gpio_init(void)
CRIS_LED_DISK_READ(0); CRIS_LED_DISK_READ(0);
CRIS_LED_DISK_WRITE(0); CRIS_LED_DISK_WRITE(0);
int res2 = request_irq(GIO_INTR_VECT, gpio_interrupt, res2 = request_irq(GIO_INTR_VECT, gpio_interrupt,
IRQF_SHARED, "gpio", &alarmlist); IRQF_SHARED, "gpio", &alarmlist);
if (res2) { if (res2) {
printk(KERN_ERR "err: irq for gpio\n"); printk(KERN_ERR "err: irq for gpio\n");
......
...@@ -425,12 +425,11 @@ gpio_open(struct inode *inode, struct file *filp) ...@@ -425,12 +425,11 @@ gpio_open(struct inode *inode, struct file *filp)
if (p > GPIO_MINOR_LAST) if (p > GPIO_MINOR_LAST)
return -EINVAL; return -EINVAL;
priv = kmalloc(sizeof(struct gpio_private), GFP_KERNEL); priv = kzalloc(sizeof(struct gpio_private), GFP_KERNEL);
if (!priv) if (!priv)
return -ENOMEM; return -ENOMEM;
mutex_lock(&gpio_mutex); mutex_lock(&gpio_mutex);
memset(priv, 0, sizeof(*priv));
priv->minor = p; priv->minor = p;
......
...@@ -240,6 +240,17 @@ ret_from_sys_call: ...@@ -240,6 +240,17 @@ ret_from_sys_call:
.type _Rexit,@function .type _Rexit,@function
_Rexit: _Rexit:
#if defined(CONFIG_TRACE_IRQFLAGS)
addoq +PT_ccs, $sp, $acr
move.d [$acr], $r0
btstq 15, $r0 ; I1
bpl 1f
nop
jsr trace_hardirqs_on
nop
1:
#endif
;; This epilogue MUST match the prologues in multiple_interrupt, irq.h ;; This epilogue MUST match the prologues in multiple_interrupt, irq.h
;; and ptregs.h. ;; and ptregs.h.
addq 4, $sp ; Skip orig_r10. addq 4, $sp ; Skip orig_r10.
...@@ -875,6 +886,14 @@ sys_call_table: ...@@ -875,6 +886,14 @@ sys_call_table:
.long sys_process_vm_writev .long sys_process_vm_writev
.long sys_kcmp /* 350 */ .long sys_kcmp /* 350 */
.long sys_finit_module .long sys_finit_module
.long sys_sched_setattr
.long sys_sched_getattr
.long sys_renameat2
.long sys_seccomp /* 355 */
.long sys_getrandom
.long sys_memfd_create
.long sys_bpf
.long sys_execveat
/* /*
* NOTE!! This doesn't have to be exact - we just have * NOTE!! This doesn't have to be exact - we just have
......
...@@ -23,9 +23,9 @@ extern void stop_watchdog(void); ...@@ -23,9 +23,9 @@ extern void stop_watchdog(void);
/* We use this if we don't have any better idle routine. */ /* We use this if we don't have any better idle routine. */
void default_idle(void) void default_idle(void)
{ {
local_irq_enable();
/* Halt until exception. */ /* Halt until exception. */
__asm__ volatile("ei \n\t" __asm__ volatile("halt");
"halt ");
} }
/* /*
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/ucontext.h> #include <asm/ucontext.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <arch/ptrace.h>
#include <arch/hwregs/cpu_vect.h> #include <arch/hwregs/cpu_vect.h>
extern unsigned long cris_signal_return_page; extern unsigned long cris_signal_return_page;
......
...@@ -46,6 +46,8 @@ static int __crisv32_pinmux_alloc(int port, int first_pin, int last_pin, ...@@ -46,6 +46,8 @@ static int __crisv32_pinmux_alloc(int port, int first_pin, int last_pin,
pins[port][i] = mode; pins[port][i] = mode;
crisv32_pinmux_set(port); crisv32_pinmux_set(port);
return 0;
} }
static int crisv32_pinmux_init(void) static int crisv32_pinmux_init(void)
...@@ -93,6 +95,7 @@ int crisv32_pinmux_alloc_fixed(enum fixed_function function) ...@@ -93,6 +95,7 @@ int crisv32_pinmux_alloc_fixed(enum fixed_function function)
int ret = -EINVAL; int ret = -EINVAL;
char saved[sizeof pins]; char saved[sizeof pins];
unsigned long flags; unsigned long flags;
reg_pinmux_rw_hwprot hwprot;
spin_lock_irqsave(&pinmux_lock, flags); spin_lock_irqsave(&pinmux_lock, flags);
...@@ -101,7 +104,7 @@ int crisv32_pinmux_alloc_fixed(enum fixed_function function) ...@@ -101,7 +104,7 @@ int crisv32_pinmux_alloc_fixed(enum fixed_function function)
crisv32_pinmux_init(); /* Must be done before we read rw_hwprot */ crisv32_pinmux_init(); /* Must be done before we read rw_hwprot */
reg_pinmux_rw_hwprot hwprot = REG_RD(pinmux, regi_pinmux, rw_hwprot); hwprot = REG_RD(pinmux, regi_pinmux, rw_hwprot);
switch (function) { switch (function) {
case pinmux_ser1: case pinmux_ser1:
...@@ -227,6 +230,7 @@ int crisv32_pinmux_dealloc_fixed(enum fixed_function function) ...@@ -227,6 +230,7 @@ int crisv32_pinmux_dealloc_fixed(enum fixed_function function)
int ret = -EINVAL; int ret = -EINVAL;
char saved[sizeof pins]; char saved[sizeof pins];
unsigned long flags; unsigned long flags;
reg_pinmux_rw_hwprot hwprot;
spin_lock_irqsave(&pinmux_lock, flags); spin_lock_irqsave(&pinmux_lock, flags);
...@@ -235,7 +239,7 @@ int crisv32_pinmux_dealloc_fixed(enum fixed_function function) ...@@ -235,7 +239,7 @@ int crisv32_pinmux_dealloc_fixed(enum fixed_function function)
crisv32_pinmux_init(); /* Must be done before we read rw_hwprot */ crisv32_pinmux_init(); /* Must be done before we read rw_hwprot */
reg_pinmux_rw_hwprot hwprot = REG_RD(pinmux, regi_pinmux, rw_hwprot); hwprot = REG_RD(pinmux, regi_pinmux, rw_hwprot);
switch (function) { switch (function) {
case pinmux_ser1: case pinmux_ser1:
......
...@@ -12,10 +12,6 @@ CONFIG_ETRAX_FAST_TIMER=y ...@@ -12,10 +12,6 @@ CONFIG_ETRAX_FAST_TIMER=y
CONFIG_CRIS_MACH_ARTPEC3=y CONFIG_CRIS_MACH_ARTPEC3=y
CONFIG_ETRAX_DRAM_SIZE=32 CONFIG_ETRAX_DRAM_SIZE=32
CONFIG_ETRAX_FLASH1_SIZE=4 CONFIG_ETRAX_FLASH1_SIZE=4
CONFIG_ETRAX_DEF_GIO_PA_OE=1c
CONFIG_ETRAX_DEF_GIO_PA_OUT=00
CONFIG_ETRAX_DEF_GIO_PB_OE=00000
CONFIG_ETRAX_DEF_GIO_PB_OUT=00000
CONFIG_NET=y CONFIG_NET=y
CONFIG_PACKET=y CONFIG_PACKET=y
CONFIG_UNIX=y CONFIG_UNIX=y
...@@ -42,3 +38,4 @@ CONFIG_JFFS2_FS=y ...@@ -42,3 +38,4 @@ CONFIG_JFFS2_FS=y
CONFIG_CRAMFS=y CONFIG_CRAMFS=y
CONFIG_NFS_FS=y CONFIG_NFS_FS=y
CONFIG_NFS_V3=y CONFIG_NFS_V3=y
CONFIG_ETRAX_GPIO=y
...@@ -38,3 +38,4 @@ CONFIG_JFFS2_FS=y ...@@ -38,3 +38,4 @@ CONFIG_JFFS2_FS=y
CONFIG_CRAMFS=y CONFIG_CRAMFS=y
CONFIG_NFS_FS=y CONFIG_NFS_FS=y
CONFIG_NFS_V3=y CONFIG_NFS_V3=y
CONFIG_ETRAX_GPIO=y
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
* All other stuff is done out-of-band with exception handlers. * All other stuff is done out-of-band with exception handlers.
*/ */
#define BUG() \ #define BUG() \
do { \
__asm__ __volatile__ ("0: break 14\n\t" \ __asm__ __volatile__ ("0: break 14\n\t" \
".section .fixup,\"ax\"\n" \ ".section .fixup,\"ax\"\n" \
"1:\n\t" \ "1:\n\t" \
...@@ -21,9 +22,15 @@ ...@@ -21,9 +22,15 @@
".section __ex_table,\"a\"\n\t" \ ".section __ex_table,\"a\"\n\t" \
".dword 0b, 1b\n\t" \ ".dword 0b, 1b\n\t" \
".previous\n\t" \ ".previous\n\t" \
: : "ri" (__FILE__), "i" (__LINE__)) : : "ri" (__FILE__), "i" (__LINE__)); \
unreachable(); \
} while (0)
#else #else
#define BUG() __asm__ __volatile__ ("break 14\n\t") #define BUG() \
do { \
__asm__ __volatile__ ("break 14\n\t"); \
unreachable(); \
} while (0)
#endif #endif
#define HAVE_ARCH_BUG #define HAVE_ARCH_BUG
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#define __ASM_CRIS_ARCH_IRQFLAGS_H #define __ASM_CRIS_ARCH_IRQFLAGS_H
#include <linux/types.h> #include <linux/types.h>
#include <arch/ptrace.h> #include <asm/ptrace.h>
static inline unsigned long arch_local_save_flags(void) static inline unsigned long arch_local_save_flags(void)
{ {
......
generic-y += atomic.h generic-y += atomic.h
generic-y += auxvec.h
generic-y += barrier.h generic-y += barrier.h
generic-y += bitsperlong.h
generic-y += clkdev.h generic-y += clkdev.h
generic-y += cmpxchg.h generic-y += cmpxchg.h
generic-y += cputime.h generic-y += cputime.h
generic-y += device.h generic-y += device.h
generic-y += div64.h generic-y += div64.h
generic-y += errno.h
generic-y += exec.h generic-y += exec.h
generic-y += emergency-restart.h generic-y += emergency-restart.h
generic-y += fcntl.h
generic-y += futex.h generic-y += futex.h
generic-y += hardirq.h generic-y += hardirq.h
generic-y += ioctl.h
generic-y += ipcbuf.h
generic-y += irq_regs.h generic-y += irq_regs.h
generic-y += irq_work.h generic-y += irq_work.h
generic-y += kdebug.h generic-y += kdebug.h
...@@ -19,11 +25,22 @@ generic-y += local.h ...@@ -19,11 +25,22 @@ generic-y += local.h
generic-y += local64.h generic-y += local64.h
generic-y += mcs_spinlock.h generic-y += mcs_spinlock.h
generic-y += mm-arch-hooks.h generic-y += mm-arch-hooks.h
generic-y += mman.h
generic-y += module.h generic-y += module.h
generic-y += msgbuf.h
generic-y += percpu.h generic-y += percpu.h
generic-y += poll.h
generic-y += preempt.h generic-y += preempt.h
generic-y += resource.h
generic-y += sections.h generic-y += sections.h
generic-y += sembuf.h
generic-y += shmbuf.h
generic-y += siginfo.h
generic-y += socket.h
generic-y += sockios.h
generic-y += statfs.h
generic-y += topology.h generic-y += topology.h
generic-y += trace_clock.h generic-y += trace_clock.h
generic-y += types.h
generic-y += vga.h generic-y += vga.h
generic-y += xor.h generic-y += xor.h
...@@ -11,7 +11,14 @@ extern void switch_mm(struct mm_struct *prev, struct mm_struct *next, ...@@ -11,7 +11,14 @@ extern void switch_mm(struct mm_struct *prev, struct mm_struct *next,
#define deactivate_mm(tsk,mm) do { } while (0) #define deactivate_mm(tsk,mm) do { } while (0)
#define activate_mm(prev,next) switch_mm((prev),(next),NULL) static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next)
{
unsigned long flags;
local_irq_save(flags);
switch_mm(prev, next, NULL);
local_irq_restore(flags);
}
/* current active pgd - this is similar to other processors pgd /* current active pgd - this is similar to other processors pgd
* registers like cr3 on the i386 * registers like cr3 on the i386
......
#ifndef __CRIS_STACKTRACE_H
#define __CRIS_STACKTRACE_H
void walk_stackframe(unsigned long sp,
int (*fn)(unsigned long addr, void *data),
void *data);
#endif
#ifndef _ETRAX_TYPES_H
#define _ETRAX_TYPES_H
#include <uapi/asm/types.h>
/*
* These aren't exported outside the kernel to avoid name space clashes
*/
#define BITS_PER_LONG 32
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment