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

Commit 1fa185eb authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull CRIS changes from Jesper Nilsson.

* tag 'cris-for-3.20' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris:
  CRIS: Whitespace cleanup
  CRIS: macro whitespace fixes in uaccess.h
  CRIS: uaccess: fix sparse errors
  CRISv32: Remove unnecessary KERN_INFO from sync_serial
  CRIS: Fix missing NR_CPUS in menuconfig
  CRISv32: Avoid warning of unused variable
  CRIS: Avoid warning in cris mm/fault.c
  CRIS: Export csum_partial_copy_nocheck
parents a9724125 9987c19e
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -57,6 +57,10 @@ config HZ
	int
	int
	default 100
	default 100


config NR_CPUS
	int
	default "1"

source "init/Kconfig"
source "init/Kconfig"


source "kernel/Kconfig.freezer"
source "kernel/Kconfig.freezer"
+2 −2
Original line number Original line Diff line number Diff line
@@ -1286,7 +1286,7 @@ static void start_dma_out(struct sync_port *port, const char *data, int count)


		tr_cfg.tr_en = regk_sser_yes;
		tr_cfg.tr_en = regk_sser_yes;
		REG_WR(sser, port->regi_sser, rw_tr_cfg, tr_cfg);
		REG_WR(sser, port->regi_sser, rw_tr_cfg, tr_cfg);
		DEBUGTRDMA(pr_info(KERN_INFO "dma s\n"););
		DEBUGTRDMA(pr_info("dma s\n"););
	} else {
	} else {
		DMA_CONTINUE_DATA(port->regi_dmaout);
		DMA_CONTINUE_DATA(port->regi_dmaout);
		DEBUGTRDMA(pr_info("dma c\n"););
		DEBUGTRDMA(pr_info("dma c\n"););
@@ -1443,7 +1443,7 @@ static inline void handle_rx_packet(struct sync_port *port)
	reg_dma_rw_ack_intr ack_intr = { .data = regk_dma_yes };
	reg_dma_rw_ack_intr ack_intr = { .data = regk_dma_yes };
	unsigned long flags;
	unsigned long flags;


	DEBUGRXINT(pr_info(KERN_INFO "!"));
	DEBUGRXINT(pr_info("!"));
	spin_lock_irqsave(&port->lock, flags);
	spin_lock_irqsave(&port->lock, flags);


	/* If we overrun the user experience is crap regardless if we
	/* If we overrun the user experience is crap regardless if we
+4 −0
Original line number Original line Diff line number Diff line
@@ -107,8 +107,10 @@ static short int watchdog_key = 42; /* arbitrary 7 bit number */
 * is used though, so set this really low. */
 * is used though, so set this really low. */
#define WATCHDOG_MIN_FREE_PAGES 8
#define WATCHDOG_MIN_FREE_PAGES 8


#if defined(CONFIG_ETRAX_WATCHDOG_NICE_DOGGY)
/* for reliable NICE_DOGGY behaviour */
/* for reliable NICE_DOGGY behaviour */
static int bite_in_progress;
static int bite_in_progress;
#endif


void reset_watchdog(void)
void reset_watchdog(void)
{
{
@@ -155,7 +157,9 @@ void handle_watchdog_bite(struct pt_regs *regs)


	nmi_enter();
	nmi_enter();
	oops_in_progress = 1;
	oops_in_progress = 1;
#if defined(CONFIG_ETRAX_WATCHDOG_NICE_DOGGY)
	bite_in_progress = 1;
	bite_in_progress = 1;
#endif
	printk(KERN_WARNING "Watchdog bite\n");
	printk(KERN_WARNING "Watchdog bite\n");


	/* Check if forced restart or unexpected watchdog */
	/* Check if forced restart or unexpected watchdog */
+97 −73
Original line number Original line Diff line number Diff line
@@ -50,7 +50,8 @@
#define segment_eq(a, b)	((a).seg == (b).seg)
#define segment_eq(a, b)	((a).seg == (b).seg)


#define __kernel_ok (segment_eq(get_fs(), KERNEL_DS))
#define __kernel_ok (segment_eq(get_fs(), KERNEL_DS))
#define __user_ok(addr,size) (((size) <= TASK_SIZE)&&((addr) <= TASK_SIZE-(size)))
#define __user_ok(addr, size) \
	(((size) <= TASK_SIZE) && ((addr) <= TASK_SIZE-(size)))
#define __access_ok(addr, size) (__kernel_ok || __user_ok((addr), (size)))
#define __access_ok(addr, size) (__kernel_ok || __user_ok((addr), (size)))
#define access_ok(type, addr, size) __access_ok((unsigned long)(addr), (size))
#define access_ok(type, addr, size) __access_ok((unsigned long)(addr), (size))


@@ -69,8 +70,7 @@
 * on our cache or tlb entries.
 * on our cache or tlb entries.
 */
 */


struct exception_table_entry
struct exception_table_entry {
{
	unsigned long insn, fixup;
	unsigned long insn, fixup;
};
};


@@ -108,11 +108,20 @@ extern long __put_user_bad(void);
do {									\
do {									\
	retval = 0;							\
	retval = 0;							\
	switch (size) {							\
	switch (size) {							\
	  case 1: __put_user_asm(x,ptr,retval,"move.b"); break;	\
	case 1:								\
	  case 2: __put_user_asm(x,ptr,retval,"move.w"); break;	\
		__put_user_asm(x, ptr, retval, "move.b");		\
	  case 4: __put_user_asm(x,ptr,retval,"move.d"); break;	\
		break;							\
	  case 8: __put_user_asm_64(x,ptr,retval); break;	\
	case 2:								\
	  default: __put_user_bad();				\
		__put_user_asm(x, ptr, retval, "move.w");		\
		break;							\
	case 4:								\
		__put_user_asm(x, ptr, retval, "move.d");		\
		break;							\
	case 8:								\
		__put_user_asm_64(x, ptr, retval);			\
		break;							\
	default:							\
		__put_user_bad();					\
	}								\
	}								\
} while (0)
} while (0)


@@ -120,11 +129,20 @@ do { \
do {									\
do {									\
	retval = 0;							\
	retval = 0;							\
	switch (size) {							\
	switch (size) {							\
	  case 1: __get_user_asm(x,ptr,retval,"move.b"); break;	\
	case 1:								\
	  case 2: __get_user_asm(x,ptr,retval,"move.w"); break;	\
		__get_user_asm(x, ptr, retval, "move.b");		\
	  case 4: __get_user_asm(x,ptr,retval,"move.d"); break;	\
		break;							\
	  case 8: __get_user_asm_64(x,ptr,retval); break;	\
	case 2:								\
	  default: (x) = __get_user_bad();			\
		__get_user_asm(x, ptr, retval, "move.w");		\
		break;							\
	case 4:								\
		__get_user_asm(x, ptr, retval, "move.d");		\
		break;							\
	case 8:								\
		__get_user_asm_64(x, ptr, retval);			\
		break;							\
	default:							\
		(x) = __get_user_bad();					\
	}								\
	}								\
} while (0)
} while (0)


@@ -153,7 +171,7 @@ struct __large_struct { unsigned long buf[100]; };
({								\
({								\
	long __gu_err, __gu_val;				\
	long __gu_err, __gu_val;				\
	__get_user_size(__gu_val, (ptr), (size), __gu_err);	\
	__get_user_size(__gu_val, (ptr), (size), __gu_err);	\
	(x) = (__typeof__(*(ptr)))__gu_val;			\
	(x) = (__force __typeof__(*(ptr)))__gu_val;		\
	__gu_err;						\
	__gu_err;						\
})
})


@@ -163,7 +181,7 @@ struct __large_struct { unsigned long buf[100]; };
	const __typeof__(*(ptr)) *__gu_addr = (ptr);			\
	const __typeof__(*(ptr)) *__gu_addr = (ptr);			\
	if (access_ok(VERIFY_READ, __gu_addr, size))			\
	if (access_ok(VERIFY_READ, __gu_addr, size))			\
		__get_user_size(__gu_val, __gu_addr, (size), __gu_err);	\
		__get_user_size(__gu_val, __gu_addr, (size), __gu_err);	\
	(x) = (__typeof__(*(ptr)))__gu_val;				\
	(x) = (__force __typeof__(*(ptr)))__gu_val;			\
	__gu_err;							\
	__gu_err;							\
})
})


@@ -210,6 +228,7 @@ static inline long
strncpy_from_user(char *dst, const char __user *src, long count)
strncpy_from_user(char *dst, const char __user *src, long count)
{
{
	long res = -EFAULT;
	long res = -EFAULT;

	if (access_ok(VERIFY_READ, src, 1))
	if (access_ok(VERIFY_READ, src, 1))
		res = __do_strncpy_from_user(dst, src, count);
		res = __do_strncpy_from_user(dst, src, count);
	return res;
	return res;
@@ -223,6 +242,7 @@ static inline unsigned long
__constant_copy_from_user(void *to, const void __user *from, unsigned long n)
__constant_copy_from_user(void *to, const void __user *from, unsigned long n)
{
{
	unsigned long ret = 0;
	unsigned long ret = 0;

	if (n == 0)
	if (n == 0)
		;
		;
	else if (n == 1)
	else if (n == 1)
@@ -273,6 +293,7 @@ static inline unsigned long
__constant_copy_to_user(void __user *to, const void *from, unsigned long n)
__constant_copy_to_user(void __user *to, const void *from, unsigned long n)
{
{
	unsigned long ret = 0;
	unsigned long ret = 0;

	if (n == 0)
	if (n == 0)
		;
		;
	else if (n == 1)
	else if (n == 1)
@@ -323,6 +344,7 @@ static inline unsigned long
__constant_clear_user(void __user *to, unsigned long n)
__constant_clear_user(void __user *to, unsigned long n)
{
{
	unsigned long ret = 0;
	unsigned long ret = 0;

	if (n == 0)
	if (n == 0)
		;
		;
	else if (n == 1)
	else if (n == 1)
@@ -391,8 +413,10 @@ __generic_clear_user_nocheck(void __user *to, unsigned long n)


/* without checking */
/* without checking */


#define __copy_to_user(to,from,n)   __generic_copy_to_user_nocheck((to),(from),(n))
#define __copy_to_user(to, from, n) \
#define __copy_from_user(to,from,n) __generic_copy_from_user_nocheck((to),(from),(n))
	__generic_copy_to_user_nocheck((to), (from), (n))
#define __copy_from_user(to, from, n) \
	__generic_copy_from_user_nocheck((to), (from), (n))
#define __copy_to_user_inatomic __copy_to_user
#define __copy_to_user_inatomic __copy_to_user
#define __copy_from_user_inatomic __copy_from_user
#define __copy_from_user_inatomic __copy_from_user
#define __clear_user(to, n) __generic_clear_user_nocheck((to), (n))
#define __clear_user(to, n) __generic_clear_user_nocheck((to), (n))
+1 −0
Original line number Original line Diff line number Diff line
@@ -67,3 +67,4 @@ EXPORT_SYMBOL(schedule_usleep);
#endif
#endif
EXPORT_SYMBOL(csum_partial);
EXPORT_SYMBOL(csum_partial);
EXPORT_SYMBOL(csum_partial_copy_from_user);
EXPORT_SYMBOL(csum_partial_copy_from_user);
EXPORT_SYMBOL(csum_partial_copy_nocheck);
Loading