Re: [PATCH] CRIS: enable GPIOLIB

2015-02-09 Thread Jesper Nilsson
On Sun, Feb 08, 2015 at 04:31:58PM +0100, Rabin Vincent wrote:
 Enable GPIOLIB on CRIS so that we can use the generic GPIO APIs.
 
 Signed-off-by: Rabin Vincent ra...@rab.in

Looks good, putting it in the CRIS tree for 3.20.

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/4] CRIS: add device tree support

2015-02-09 Thread Jesper Nilsson
On Sun, Feb 08, 2015 at 04:35:42PM +0100, Rabin Vincent wrote:
 Add support for booting CRIS with a built-in device tree.
 
 Signed-off-by: Rabin Vincent ra...@rab.in

Looks good, putting it in the CRIS tree for 3.20.

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/4] CRISv32: add irq domains support

2015-02-09 Thread Jesper Nilsson
On Sun, Feb 08, 2015 at 04:35:43PM +0100, Rabin Vincent wrote:
 Add support for IRQ domains to the CRISv32 interrupt controller.
 
 Signed-off-by: Rabin Vincent ra...@rab.in

Looks good, putting it in the CRIS tree for 3.20.

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 3/4] CRIS: document CRISv32 intc bindings

2015-02-09 Thread Jesper Nilsson
On Sun, Feb 08, 2015 at 04:35:44PM +0100, Rabin Vincent wrote:
 Add the DT bindings documentation for the CRISV32 interrupt controller.
 
 Signed-off-by: Rabin Vincent ra...@rab.in

Looks good, putting it in the CRIS tree for 3.20.

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 4/4] CRIS: add Axis 88 board device tree

2015-02-09 Thread Jesper Nilsson
On Sun, Feb 08, 2015 at 04:35:45PM +0100, Rabin Vincent wrote:
 Add a minimal device tree for the ETRAX FS SoC and the Axis 88 developer
 board.
 
 Signed-off-by: Rabin Vincent ra...@rab.in

Looks good, putting it in the CRIS tree for 3.20.

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/3] CRISv32: don't attempt syscall restart on irq exit

2015-02-09 Thread Jesper Nilsson
On Sun, Feb 08, 2015 at 09:45:02PM +0100, Rabin Vincent wrote:
 r9 is used to determine whether syscall restarting must be performed or
 not.  Unfortunately, r9 is never set to zero in the non-syscall path,
 and r9 is on top of that a callee-saved register which can be set to
 non-zero by the C functions that are called during IRQ handling.
 
 This means that if r10 (used for the syscall return value) is one of the
 -ERESTART* values when a hardware interrupt occurs which leads to a
 signal being delivered to the process, the kernel will restart a
 syscall which never occurred.  This will lead to the PC being moved back
 by 2 on return to user space.
 
 Fix the problem by setting r9 to zero in the interrupt path.
 
 Test case (should loop forever but ends up executing the break 8 trap
 instruction):
 
   #include signal.h
   #include stdlib.h
   #include sys/time.h
 
   void f(int n)
   {
   register int r9 asm (r9) = 1;
   register int r10 asm (r10) = n;
 
   __asm__ __volatile__(
   ba 1f  \n
   nop\n
   break  8   \n
   1: ba  .   \n
   nop\n
   :
   : r (r9), r (r10)
   : memory);
   }
 
   void handler1(int sig) { }
 
   int main(int argc, char *argv[])
   {
   struct itimerval t1 = { .it_value = {1} };
 
   signal(SIGALRM, handler1);
   setitimer(ITIMER_REAL, t1, NULL);
 
   f(-513); /* -ERESTARTNOINTR */
 
   return 0;
   }
 
 Signed-off-by: Rabin Vincent ra...@rab.in

Nice, added in the CRIS tree for 3.20.

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/3] CRISv32: prevent bogus restarts on sigreturn

2015-02-09 Thread Jesper Nilsson
On Sun, Feb 08, 2015 at 09:45:03PM +0100, Rabin Vincent wrote:
 Al Viro noted that CRIS is vulnerable to bogus restarts on sigreturn.


 Reported-by: Al Viro v...@zeniv.linux.org.uk
 Signed-off-by: Rabin Vincent ra...@rab.in

Nice, added in the CRIS tree for 3.20.

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 3/3] CRISv32: handle multiple signals

2015-02-09 Thread Jesper Nilsson
On Sun, Feb 08, 2015 at 09:45:04PM +0100, Rabin Vincent wrote:
 Al Viro noted that CRIS fails to handle multiple signals.
 
 This fixes the problem for CRISv32 by making it use a C work_pending
 handling loop similar to the ARM implementation in 0a267fa6a15d41c
 (ARM: 7472/1: pull all work_pending logics into C function).
 
 This also happens to fixes the warnings which currently trigger on
 CRISv32 due to do_signal() being called with interrupts disabled.

 Reported-by: Al Viro v...@zeniv.linux.org.uk
 Signed-off-by: Rabin Vincent ra...@rab.in

Nice, added in the CRIS tree for 3.20.

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 3/3] CRISv32: handle multiple signals

2015-02-09 Thread Jesper Nilsson
On Sun, Feb 08, 2015 at 06:03:49PM -0800, Guenter Roeck wrote:
 On Sun, Feb 08, 2015 at 09:45:04PM +0100, Rabin Vincent wrote:
  Al Viro noted that CRIS fails to handle multiple signals.
[snip]
  Reported-by: Al Viro v...@zeniv.linux.org.uk
  Link: http://lkml.kernel.org/r/20121208074429.gc4...@zeniv.linux.org.uk
  Signed-off-by: Rabin Vincent ra...@rab.in
 
 Hi Rabin,
 
 Works nicely, and, yes, it does fix the annoying traceback.
 
 Tested-by: Guenter Roeck li...@roeck-us.net
 
 Wondering - what serial driver do you use with crisv32, if any ?
 So far I always patch in a cut-down version of the driver
 from 2.6.26/33 which was never submitted upstream.

Niclas Cassel has submitted a reworked driver for crisv32,
which is in Gregs tree now, unfortunately it wasn't sent to LKML,
only the linux-serial list, but it should be headed to Linus soon.

http://www.spinics.net/lists/linux-serial/msg15619.html


 Thanks,
 Guenter

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] VFS: Convert file-f_dentry-d_inode to file_inode() [ver #2]

2015-01-16 Thread Jesper Nilsson
On Tue, Jan 13, 2015 at 06:57:53PM +0100, David Howells wrote:
 Convert file-f_dentry-d_inode to file_inode() so as to get layered
 filesystems right.
 
 Found with: git grep '[.]f_dentry'

Yes, compile works with this patch. Do you want me to take it through
the CRIS tree or do you have any other tree in mind?

 Signed-off-by: David Howells dhowe...@redhat.com

In any case:

Reviewed-by: Jesper Nilsson jesper.nils...@axis.com

  arch/cris/arch-v32/drivers/sync_serial.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/arch/cris/arch-v32/drivers/sync_serial.c 
 b/arch/cris/arch-v32/drivers/sync_serial.c
 index 08a313fc2241..f772068d9e79 100644
 --- a/arch/cris/arch-v32/drivers/sync_serial.c
 +++ b/arch/cris/arch-v32/drivers/sync_serial.c
 @@ -604,7 +604,7 @@ static ssize_t __sync_serial_read(struct file *file,
 struct timespec *ts)
  {
   unsigned long flags;
 - int dev = MINOR(file-f_dentry-d_inode-i_rdev);
 + int dev = MINOR(file_inode(file)-i_rdev);
   int avail;
   struct sync_port *port;
   unsigned char *start;
 

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 6/6] CRIS: use generic headers via Kbuild

2015-02-19 Thread Jesper Nilsson
On Thu, Feb 19, 2015 at 08:29:56PM +0100, Rabin Vincent wrote:
 Delete headers which do nothing but include the asm-generic versions and
 use Kbuild magic instead.
 
 Signed-off-by: Rabin Vincent ra...@rab.in

Nice! Added to the CRIS-tree.

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 5/6] CRIS: use generic cmpxchg.h

2015-02-19 Thread Jesper Nilsson
On Thu, Feb 19, 2015 at 08:29:55PM +0100, Rabin Vincent wrote:
 CRIS can use asm-generic's cmpxchg.h
 
 Signed-off-by: Rabin Vincent ra...@rab.in

Looks good, adding to the CRIS-tree.

Thanks!

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] cris: Remove unnecessary KERN_INFO from sync_serial.c

2015-01-27 Thread Jesper Nilsson
On Thu, Jan 15, 2015 at 12:52:08PM +0100, Masanari Iida wrote:
 This patch remove unnecessary KERN_INFO in sync_serial.c

Thanks, added for 3.20.

/Jesper

 Signed-off-by: Masanari Iida standby2...@gmail.com
 ---
  arch/cris/arch-v32/drivers/sync_serial.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/arch/cris/arch-v32/drivers/sync_serial.c 
 b/arch/cris/arch-v32/drivers/sync_serial.c
 index 08a313f..91e8773 100644
 --- a/arch/cris/arch-v32/drivers/sync_serial.c
 +++ b/arch/cris/arch-v32/drivers/sync_serial.c
 @@ -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;
   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 {
   DMA_CONTINUE_DATA(port-regi_dmaout);
   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 };
   unsigned long flags;
  
 - DEBUGRXINT(pr_info(KERN_INFO !));
 + DEBUGRXINT(pr_info(!));
   spin_lock_irqsave(port-lock, flags);
  
   /* If we overrun the user experience is crap regardless if we
 -- 
 2.3.0.rc0

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 06/40] cris/uaccess: fix sparse errors

2015-01-27 Thread Jesper Nilsson
On Tue, Jan 06, 2015 at 04:43:50PM +0100, Michael S. Tsirkin wrote:
 virtio wants to read bitwise types from userspace using get_user.  At the
 moment this triggers sparse errors, since the value is passed through an
 integer.
 
 Fix that up using __force.

Looks sane, I'll take this in the CRIS tree since you
have a cleanup patch which depends on it.

Thanks!

/Jesper

 Signed-off-by: Michael S. Tsirkin m...@redhat.com
 ---
  arch/cris/include/asm/uaccess.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/arch/cris/include/asm/uaccess.h b/arch/cris/include/asm/uaccess.h
 index 9145408..9cf5a23 100644
 --- a/arch/cris/include/asm/uaccess.h
 +++ b/arch/cris/include/asm/uaccess.h
 @@ -153,7 +153,7 @@ struct __large_struct { unsigned long buf[100]; };
  ({   \
   long __gu_err, __gu_val;\
   __get_user_size(__gu_val,(ptr),(size),__gu_err);\
 - (x) = (__typeof__(*(ptr)))__gu_val; \
 + (x) = (__force __typeof__(*(ptr)))__gu_val; \
   __gu_err;   \
  })
  
 @@ -163,7 +163,7 @@ struct __large_struct { unsigned long buf[100]; };
   const __typeof__(*(ptr)) *__gu_addr = (ptr);\
   if (access_ok(VERIFY_READ,__gu_addr,size))  \
   __get_user_size(__gu_val,__gu_addr,(size),__gu_err);\
 - (x) = (__typeof__(*(ptr)))__gu_val; \
 + (x) = (__force __typeof__(*(ptr)))__gu_val; \
   __gu_err;   \
  })
  
 -- 
 MST

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 33/40] cris: macro whitespace fixes

2015-01-27 Thread Jesper Nilsson
On Tue, Jan 06, 2015 at 04:45:21PM +0100, Michael S. Tsirkin wrote:
 While working on arch/cris/include/asm/uaccess.h, I noticed
 that some macros within this header are made harder to read because they
 violate a coding style rule: space is missing after comma.
 
 Fix it up.

Thanks, looks good.
I'll take it into the CRIS tree for 3.20.

 Signed-off-by: Michael S. Tsirkin m...@redhat.com

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH for-3.20-fixes] workqueue: fix hang involving racing cancel[_delayed]_work_sync()'s for PREEMPT_NONE

2015-02-09 Thread Jesper Nilsson
.
*/
 - if (unlikely(ret == -ENOENT))
 - flush_work(work);
 + if (unlikely(ret == -ENOENT)) {
 + DEFINE_WAIT(wait);
 + prepare_to_wait(waitq, wait, TASK_UNINTERRUPTIBLE);
 + if (work_is_canceling(work))
 + schedule();
 + finish_wait(waitq, wait);
 + }
   } while (unlikely(ret  0));
  
   /* tell other tasks trying to grab @work to back off */
 @@ -2749,6 +2767,16 @@ static bool __cancel_work_timer(struct w
  
   flush_work(work);
   clear_work_data(work);
 +
 + /*
 +  * Paired with prepare_to_wait() above so that either
 +  * waitqueue_active() is visible here or !work_is_canceling() is
 +  * visible there.
 +  */
 + smp_mb();
 + if (waitqueue_active(waitq))
 + wake_up(waitq);
 +
   return ret;
  }
  

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH for-3.20-fixes] workqueue: fix hang involving racing cancel[_delayed]_work_sync()'s for PREEMPT_NONE

2015-02-10 Thread Jesper Nilsson
On Mon, Feb 09, 2015 at 05:29:55PM +0100, Jesper Nilsson wrote:
 On Mon, Feb 09, 2015 at 05:15:27PM +0100, Tejun Heo wrote:
  Hello,
 
 Hi,
 
  Can you please verify that the following patch fixes the issue?
 
 Rabin will have to report if it fixes it for his synthetic case,
 but I'll try it in my real-world jffs2 sync problem, and report
 after a couple of hours.

I let the test run for the night, and got no failures.
Before I got at most an hour of tests before lockup.

Tested-by: Jesper Nilsson jesper.nils...@axis.com

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 3/3] CRISv32: handle multiple signals

2015-02-10 Thread Jesper Nilsson
On Mon, Feb 09, 2015 at 05:57:03PM +0100, Guenter Roeck wrote:
 On Mon, Feb 09, 2015 at 10:57:27AM +0100, Jesper Nilsson wrote:
  
  Niclas Cassel has submitted a reworked driver for crisv32,
  which is in Gregs tree now, unfortunately it wasn't sent to LKML,
  only the linux-serial list, but it should be headed to Linus soon.
  
  http://www.spinics.net/lists/linux-serial/msg15619.html
  
 I fetched it from Greg's tree and gave it a test. Works nicely
 when combined with the other pending patches for crisv32.
 
 Different question - do you by any chance have a working configuration
 for crisv10 in combination with qemu ?

I'm afraid not, there are large similarities between the
two, but enough to make them separate architectures.
I know that Edgar Iglesias said that it would not be very hard,
perhaps he has some ideas? (added CC)

 Thanks,
 Guenter

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[GIT PULL] CRIS changes for 3.20

2015-02-15 Thread Jesper Nilsson
Hi Linus!

Please pull the below changes for some small CRIS fixes for 3.20.

The following changes since commit c59c961ca511dc7ee2f4f7e9c224d16f5c76ca6e:

  Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux 
(2015-01-27 19:12:38 -0800)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris.git 
tags/cris-for-3.20

for you to fetch changes up to 9987c19ed9a71693bf3efce2957666b2513a5252:

  CRIS: Whitespace cleanup (2015-02-14 18:54:12 +0100)


CRIS changes for 3.20


Jesper Nilsson (5):
  CRIS: Export csum_partial_copy_nocheck
  CRIS: Avoid warning in cris mm/fault.c
  CRISv32: Avoid warning of unused variable
  CRIS: Fix missing NR_CPUS in menuconfig
  CRIS: Whitespace cleanup

Masanari Iida (1):
  CRISv32: Remove unnecessary KERN_INFO from sync_serial

Michael S. Tsirkin (2):
  CRIS: uaccess: fix sparse errors
  CRIS: macro whitespace fixes in uaccess.h

 arch/cris/Kconfig|4 +
 arch/cris/arch-v32/drivers/sync_serial.c |4 +-
 arch/cris/arch-v32/kernel/time.c |4 +
 arch/cris/include/asm/uaccess.h  |  170 +-
 arch/cris/kernel/crisksyms.c |1 +
 arch/cris/mm/fault.c |4 +-
 6 files changed, 111 insertions(+), 76 deletions(-)

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/6] CRISv32: don't enable irqs in INIT_THREAD

2015-02-19 Thread Jesper Nilsson
On Thu, Feb 19, 2015 at 08:29:51PM +0100, Rabin Vincent wrote:
 INIT_THREAD enables interrupts in the thread_struct's saved flags.  This
 means that interrupts get enabled in the middle of context_switch()
 while switching to new tasks that get forked off the init task during
 boot.  Don't do this.
 
 Fixes the following splat on boot with spinlock debugging on:
 
   BUG: spinlock cpu recursion on CPU#0, swapper/2
lock: runqueues+0x0/0x47c, .magic: dead4ead, .owner: swapper/0,
   .owner_cpu: 0
   CPU: 0 PID: 2 Comm: swapper Not tainted 3.19.0-08796-ga747b55 #285
 
   Call Trace:
   [c0032b80] spin_bug+0x2a/0x36
   [c0032c98] do_raw_spin_lock+0xa2/0x126
   [c01964b0] _raw_spin_lock+0x20/0x2a
   [c00286c8] scheduler_tick+0x22/0x76
   [c003db2c] update_process_times+0x5e/0x72
   [c0007a94] timer_interrupt+0x4e/0x6a
   [c00378d6] handle_irq_event_percpu+0x54/0xf2
   [c00379c4] handle_irq_event+0x50/0x74
   [c003988e] handle_simple_irq+0x6c/0xbe
   [c0037270] generic_handle_irq+0x2a/0x36
   [c0004c40] do_IRQ+0x38/0x84
   [c000662e] crisv32_do_IRQ+0x54/0x60
   [c0006204] IRQ0x4b_interrupt+0x34/0x3c
   [c0192baa] __schedule+0x24a/0x532
   [c00056b4] ret_from_kernel_thread+0x0/0x14
 
 Signed-off-by: Rabin Vincent ra...@rab.in

Looks good, adding to the CRIS-tree.

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/6] CRIS: remove SMP code

2015-02-19 Thread Jesper Nilsson
On Thu, Feb 19, 2015 at 08:29:52PM +0100, Rabin Vincent wrote:
 The CRIS SMP code cannot be built since there is no (and appears to
 never have been) a CONFIG_SMP Kconfig option in arch/cris/.  Remove it.
 
 Signed-off-by: Rabin Vincent ra...@rab.in

Nice, added to the queue for the CRIS-tree.

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 3/6] CRIS: use generic atomic bitops

2015-02-19 Thread Jesper Nilsson
On Thu, Feb 19, 2015 at 08:29:53PM +0100, Rabin Vincent wrote:
 The generic atomic bitops are the same as the CRIS-specific ones.
 
 Signed-off-by: Rabin Vincent ra...@rab.in

Looks good, added to the CRIS-tree.

Thanks,

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 4/6] CRIS: use generic atomic.h

2015-02-19 Thread Jesper Nilsson
On Thu, Feb 19, 2015 at 08:29:54PM +0100, Rabin Vincent wrote:
 CRIS can use asm-generic's atomic.h.
 
 Signed-off-by: Rabin Vincent ra...@rab.in

Agreed, added to the CRIS-tree.

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] cris: fix integer overflow in ELF_ET_DYN_BASE

2015-03-25 Thread Jesper Nilsson
On Tue, Mar 24, 2015 at 06:31:23PM +0300, Andrey Ryabinin wrote:
 Almost all arches define ELF_ET_DYN_BASE as 2/3 of TASK_SIZE.
 Though it seems that some architectures do this in a wrong way.
 The problem is that 2*TASK_SIZE may overflow 32-bits so
 the real ELF_ET_DYN_BASE becomes wrong.
 Fix this overflow by dividing TASK_SIZE prior to multiplying:
   (TASK_SIZE / 3 * 2)

Good catch, thanks, added to the CRIS-tree.

 Signed-off-by: Andrey Ryabinin a.ryabi...@samsung.com

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH for-3.20-fixes] workqueue: fix hang involving racing cancel[_delayed]_work_sync()'s for PREEMPT_NONE

2015-03-02 Thread Jesper Nilsson
On Mon, Mar 02, 2015 at 11:21:44AM -0500, Tejun Heo wrote:
 On Mon, Mar 02, 2015 at 01:26:15PM +0100, Jesper Nilsson wrote:
  On Mon, Feb 09, 2015 at 05:15:27PM +0100, Tejun Heo wrote:
   Hello,
  
  Hi!
  
   This patch removes the possible hang by updating __cancel_work_timer()
   to explicitly wait for clearing of CANCELING rather than invoking
   flush_work() after try_to_grab_pending() fails with -ENOENT.  The
   explicit wait uses the matching bit waitqueue for the CANCELING bit.
   
   Link: http://lkml.kernel.org/g/20150206171156.ga8...@axis.com
   
   Signed-off-by: Tejun Heo t...@kernel.org
   Reported-by: Rabin Vincent rabin.vinc...@axis.com
   Cc: sta...@vger.kernel.org
  
  What's the status on this patch, it's not in 4.0-rc1 at least?
  Is it queued for the 3.18 stable branch?
 
 Sorry about the delay.  Applied to wq/for-4.0-fixes.  Will push out in
 a week or so.

Thanks, that works great. Just wanted to know. :-)

 Thanks.
 
 -- 
 tejun

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH for-3.20-fixes] workqueue: fix hang involving racing cancel[_delayed]_work_sync()'s for PREEMPT_NONE

2015-03-02 Thread Jesper Nilsson
On Mon, Feb 09, 2015 at 05:15:27PM +0100, Tejun Heo wrote:
 Hello,

Hi!

 This patch removes the possible hang by updating __cancel_work_timer()
 to explicitly wait for clearing of CANCELING rather than invoking
 flush_work() after try_to_grab_pending() fails with -ENOENT.  The
 explicit wait uses the matching bit waitqueue for the CANCELING bit.
 
 Link: http://lkml.kernel.org/g/20150206171156.ga8...@axis.com
 
 Signed-off-by: Tejun Heo t...@kernel.org
 Reported-by: Rabin Vincent rabin.vinc...@axis.com
 Cc: sta...@vger.kernel.org

What's the status on this patch, it's not in 4.0-rc1 at least?
Is it queued for the 3.18 stable branch?

Best regards,

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V2 - 15/27] cris: Remove use of seq_printf return value

2015-02-22 Thread Jesper Nilsson
On Sun, Feb 22, 2015 at 05:00:30AM +0100, Joe Perches wrote:
 The seq_printf return value, because it's frequently misused,
 will eventually be converted to void.
 
 See: commit 1f33c41c03da (seq_file: Rename seq_overflow() to
  seq_has_overflowed() and make public)

 Signed-off-by: Joe Perches j...@perches.com

Acked-by: Jesper Nilsson jesper.nils...@axis.com

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 09/32] cris/arch-v10: copy_thread(): rename 'arg' argument to 'kthread_arg'

2015-03-25 Thread Jesper Nilsson
On Fri, Mar 13, 2015 at 07:04:24PM +0100, Alex Dowad wrote:
 The 'arg' argument to copy_thread() is only ever used when forking a new
 kernel thread. Hence, rename it to 'kthread_arg' for clarity (and consistency
 with do_fork() and other arch-specific implementations of copy_thread()).
 
 Signed-off-by: Alex Dowad alexinbeij...@gmail.com

Acked-by: Jesper Nilsson jesper.nils...@axis.com

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 10/32] cris/arch-v32: copy_thread(): rename 'arg' argument to 'kthread_arg'

2015-03-25 Thread Jesper Nilsson
On Fri, Mar 13, 2015 at 07:04:25PM +0100, Alex Dowad wrote:
 The 'arg' argument to copy_thread() is only ever used when forking a new
 kernel thread. Hence, rename it to 'kthread_arg' for clarity (and consistency
 with do_fork() and other arch-specific implementations of copy_thread()).
 
 Signed-off-by: Alex Dowad alexinbeij...@gmail.com

Acked-by: Jesper Nilsson jesper.nils...@axis.com

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[GIT PULL]: CRIS changes for 4.1

2015-04-25 Thread Jesper Nilsson
Hi Linus,

Please pull the below tree for some much needed love for the CRIS-port,
there's a bunch of changes this time, giving the CRISv32 port a bit of
modern makeover with device-tree, irq domain and gpiolib support,
and more switchover to generic frameworks.

Some small fixes and removal of the theoretical SMP support brings up the rear.

Thanks!

The following changes since commit 90a5a895cc8b284ac522757a01de15e36710c2b9:

  Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (2015-03-23 
10:16:13 -0700)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris.git 
tags/cris-for-4.1

for you to fetch changes up to d939b52abe0cee9cc3167f554da6b864db86d3f2:

  cris: fix integer overflow in ELF_ET_DYN_BASE (2015-03-25 11:35:12 +0100)


CRIS changes for 4.1


Andrey Ryabinin (1):
  cris: fix integer overflow in ELF_ET_DYN_BASE

Jesper Nilsson (1):
  Add binding documentation for CRIS

Rabin Vincent (17):
  CRIS: enable GPIOLIB
  CRISv32: add irq domains support
  CRISv32: add device tree support
  CRIS: add Axis 88 board device tree
  CRISv32: don't attempt syscall restart on irq exit
  CRISv32: prevent bogus restarts on sigreturn
  CRISv32: handle multiple signals
  CRISv32: don't enable irqs in INIT_THREAD
  CRIS: remove SMP code
  CRISv10: remove redundant macros from system.h
  CRIS: use generic atomic bitops
  CRIS: use generic atomic.h
  CRIS: use generic cmpxchg.h
  CRIS: use generic headers via Kbuild
  CRISv32: use generic clockevents
  CRISv32: use MMIO clocksource
  CRISv32: use GENERIC_SCHED_CLOCK

 Documentation/devicetree/bindings/cris/axis.txt|9 +
 Documentation/devicetree/bindings/cris/boards.txt  |8 +
 .../devicetree/bindings/cris/interrupts.txt|   23 ++
 arch/cris/Kconfig  |   12 +-
 arch/cris/Makefile |4 +
 arch/cris/arch-v32/kernel/Makefile |1 -
 arch/cris/arch-v32/kernel/entry.S  |   42 +--
 arch/cris/arch-v32/kernel/head.S   |   32 --
 arch/cris/arch-v32/kernel/irq.c|   31 +-
 arch/cris/arch-v32/kernel/setup.c  |5 -
 arch/cris/arch-v32/kernel/signal.c |5 +
 arch/cris/arch-v32/kernel/smp.c|  358 
 arch/cris/arch-v32/kernel/time.c   |  180 +-
 arch/cris/arch-v32/lib/Makefile|2 +-
 arch/cris/arch-v32/lib/spinlock.S  |   40 ---
 arch/cris/arch-v32/mm/init.c   |   11 -
 arch/cris/arch-v32/mm/mmu.S|4 -
 arch/cris/boot/dts/Makefile|6 +
 arch/cris/boot/dts/dev88.dts   |   18 +
 arch/cris/boot/dts/etraxfs.dtsi|   38 +++
 arch/cris/include/arch-v10/arch/atomic.h   |7 -
 arch/cris/include/arch-v10/arch/system.h   |8 -
 arch/cris/include/arch-v32/arch/atomic.h   |   36 --
 arch/cris/include/arch-v32/arch/processor.h|3 +-
 arch/cris/include/arch-v32/arch/spinlock.h |  131 ---
 arch/cris/include/asm/Kbuild   |   15 +-
 arch/cris/include/asm/atomic.h |  149 
 arch/cris/include/asm/bitops.h |  111 +-
 arch/cris/include/asm/cmpxchg.h|   53 ---
 arch/cris/include/asm/device.h |7 -
 arch/cris/include/asm/div64.h  |1 -
 arch/cris/include/asm/elf.h|2 +-
 arch/cris/include/asm/emergency-restart.h  |6 -
 arch/cris/include/asm/futex.h  |6 -
 arch/cris/include/asm/hardirq.h|7 -
 arch/cris/include/asm/irq_regs.h   |1 -
 arch/cris/include/asm/kdebug.h |1 -
 arch/cris/include/asm/kmap_types.h |   10 -
 arch/cris/include/asm/local.h  |1 -
 arch/cris/include/asm/local64.h|1 -
 arch/cris/include/asm/percpu.h |6 -
 arch/cris/include/asm/smp.h|   10 -
 arch/cris/include/asm/spinlock.h   |1 -
 arch/cris/include/asm/tlbflush.h   |7 -
 arch/cris/include/asm/topology.h   |6 -
 arch/cris/kernel/Makefile  |1 +
 arch/cris/kernel/devicetree.c  |   14 +
 arch/cris/kernel/ptrace.c  |   23 ++
 arch/cris/kernel/setup.c   |   15 +
 arch/cris/kernel/time.c|2 +
 50 files changed, 325 insertions(+), 1145 deletions(-)
 create mode 100644

Re: [PATCH] cris: arch-v32: gpio: Use kzalloc instead of kmalloc/memset

2015-05-11 Thread Jesper Nilsson
On Fri, May 01, 2015 at 03:58:19PM +0200, Christophe Jaillet wrote:
 Turn a kmalloc/memset into an equivalent kzalloc.
 Doing so also move the zero'ing of the memory outside of a mutex.

Agreed, thanks!

 Signed-off-by: Christophe Jaillet christophe.jail...@wanadoo.fr

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/2] CRISv32: add unreachable() to BUG()

2015-05-17 Thread Jesper Nilsson
On Thu, May 14, 2015 at 02:36:55PM +0200, Rabin Vincent wrote:
 Add an unreachable() in the BUG() implementations, to get rid of
 several warnings similar to the one below:
 
  kernel/sched/core.c: In function 'pick_next_task':
  kernel/sched/core.c:2690:1: warning: control reaches end of non-void 
 function [-Wreturn-type]

Thanks, applied!

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] CRISv32: allow CONFIG_DEBUG_BUGVERBOSE

2015-05-17 Thread Jesper Nilsson
On Thu, May 14, 2015 at 02:36:56PM +0200, Rabin Vincent wrote:
 Support for verbose BUG reporting already exists, but the HAVE flag that
 allows the option to be enabled is missing.

Thanks, applied!

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 23/24] arch: Remove exec_domain from remaining archs

2015-04-13 Thread Jesper Nilsson
On Sat, Apr 11, 2015 at 10:48:02PM +0200, Richard Weinberger wrote:
 Signed-off-by: Richard Weinberger rich...@nod.at
  arch/cris/arch-v10/kernel/signal.c  | 2 --
  arch/cris/arch-v32/kernel/signal.c  | 2 --
  arch/cris/include/asm/thread_info.h | 2 --

For the CRIS parts:

Acked-by: Jesper Nilsson jesper.nils...@axis.com

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 3/3] tty: remove buf parameter from tty_name()

2015-04-07 Thread Jesper Nilsson
On Tue, Mar 31, 2015 at 03:55:59PM +0200, Rasmus Villemoes wrote:
 tty_name no longer uses the buf parameter, so remove it along with all
 the 64 byte stack buffers that used to be passed in.
 
 Mostly generated by the coccinelle script
 
 @depends on patch@
 identifier buf;
 constant C;
 expression tty;
 @@
 - char buf[C];
   +...
 - tty_name(tty, buf)
 + tty_name(tty)
   ...+
 
 allmodconfig compiles, so I'm fairly confident the stack buffers
 weren't used for other purposes as well.
 
 Signed-off-by: Rasmus Villemoes li...@rasmusvillemoes.dk

For the CRISv10 driver:

Acked-by: Jesper Nilsson jesper.nils...@axis.com

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH -next] cris: Fix system call references for cris v10

2015-06-08 Thread Jesper Nilsson
On Fri, Jun 05, 2015 at 04:10:19PM +0200, Guenter Roeck wrote:
 The newly wired system calls cause compile errors when building
 crisv10 images.
 
 arch/cris/arch-v10/kernel/built-in.o: In function `sys_call_table':
 (.rodata+0x580): undefined reference to `_sys_sched_setattr'
 arch/cris/arch-v10/kernel/built-in.o: In function `sys_call_table':
 (.rodata+0x584): undefined reference to `_sys_sched_getattr'
 arch/cris/arch-v10/kernel/built-in.o: In function `sys_call_table':
 (.rodata+0x588): undefined reference to `_sys_renameat2'
 arch/cris/arch-v10/kernel/built-in.o: In function `sys_call_table':
 (.rodata+0x58c): undefined reference to `_sys_seccomp'
 arch/cris/arch-v10/kernel/built-in.o: In function `sys_call_table':
 (.rodata+0x590): undefined reference to `_sys_getrandom'
 arch/cris/arch-v10/kernel/built-in.o: In function `sys_call_table':
 (.rodata+0x594): undefined reference to `_sys_memfd_create'
 arch/cris/arch-v10/kernel/built-in.o: In function `sys_call_table':
 (.rodata+0x598): undefined reference to `_sys_bpf'
 arch/cris/arch-v10/kernel/built-in.o: In function `sys_call_table':
 (.rodata+0x59c): undefined reference to `_sys_execveat'
 
 Fixes: 3e48d266639b (CRIS: Wire up missing syscalls)
 Cc: Chen Gang gang.chen.5...@gmail.com
 Signed-off-by: Guenter Roeck li...@roeck-us.net

Hi Guenter!

Thanks, a similar patch should already be folded into the
original tree, could you verify with the latest for-next/linux-next?

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [GIT PULL] CRIS changes for -next

2015-06-03 Thread Jesper Nilsson
 (95%)
  rename arch/cris/include/{arch-v10/arch/elf.h = uapi/asm/elf_v10.h} (98%)
  rename arch/cris/include/{arch-v32/arch/elf.h = uapi/asm/elf_v32.h} (98%)
  delete mode 100644 arch/cris/include/uapi/asm/errno.h
  delete mode 100644 arch/cris/include/uapi/asm/fcntl.h
  delete mode 100644 arch/cris/include/uapi/asm/ioctl.h
  delete mode 100644 arch/cris/include/uapi/asm/ipcbuf.h
  delete mode 100644 arch/cris/include/uapi/asm/kvm_para.h
  delete mode 100644 arch/cris/include/uapi/asm/mman.h
  delete mode 100644 arch/cris/include/uapi/asm/msgbuf.h
  delete mode 100644 arch/cris/include/uapi/asm/poll.h
  rename arch/cris/include/{arch-v10/arch/ptrace.h = uapi/asm/ptrace_v10.h} 
 (100%)
  rename arch/cris/include/{arch-v32/arch/ptrace.h = uapi/asm/ptrace_v32.h} 
 (100%)
  delete mode 100644 arch/cris/include/uapi/asm/resource.h
  delete mode 100644 arch/cris/include/uapi/asm/sembuf.h
  delete mode 100644 arch/cris/include/uapi/asm/shmbuf.h
  delete mode 100644 arch/cris/include/uapi/asm/siginfo.h
  delete mode 100644 arch/cris/include/uapi/asm/socket.h
  delete mode 100644 arch/cris/include/uapi/asm/sockios.h
  delete mode 100644 arch/cris/include/uapi/asm/statfs.h
  delete mode 100644 arch/cris/include/uapi/asm/types.h
  create mode 100644 arch/cris/kernel/stacktrace.c

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] cris: Wire up missing syscalls

2015-06-03 Thread Jesper Nilsson

On Wed, May 06, 2015 at 03:48:12PM +0200, Chen Gang wrote:
 The related warnings:
 
 CALLscripts/checksyscalls.sh
   stdin:1229:2: warning: #warning syscall sched_setattr not implemented 
 [-Wcpp]
   stdin:1232:2: warning: #warning syscall sched_getattr not implemented 
 [-Wcpp]
   stdin:1235:2: warning: #warning syscall renameat2 not implemented [-Wcpp]
   stdin:1238:2: warning: #warning syscall seccomp not implemented [-Wcpp]
   stdin:1241:2: warning: #warning syscall getrandom not implemented [-Wcpp]
   stdin:1244:2: warning: #warning syscall memfd_create not implemented 
 [-Wcpp]
   stdin:1247:2: warning: #warning syscall bpf not implemented [-Wcpp]
   stdin:1250:2: warning: #warning syscall execveat not implemented [-Wcpp]
 
 Signed-off-by: Chen Gang gang.chen.5...@gmail.com

Thanks and applied, sorry for the long delay, I had to rewrite the patch a bit
since the v10 and v32 does not have the same standard in prefixing underscores.
Also, to be safe I also bumped the NR_syscalls as below.

---
 arch/cris/arch-v10/kernel/entry.S   |8 
 arch/cris/arch-v32/kernel/entry.S   |8 
 arch/cris/include/asm/unistd.h  |2 +-
 arch/cris/include/uapi/asm/unistd.h |8 
 4 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/arch/cris/arch-v10/kernel/entry.S 
b/arch/cris/arch-v10/kernel/entry.S
index 81570fc..d94c520 100644
--- a/arch/cris/arch-v10/kernel/entry.S
+++ b/arch/cris/arch-v10/kernel/entry.S
@@ -955,6 +955,14 @@ sys_call_table:
.long sys_process_vm_writev
.long sys_kcmp  /* 350 */
.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
diff --git a/arch/cris/arch-v32/kernel/entry.S 
b/arch/cris/arch-v32/kernel/entry.S
index 026a0b2..1c5595a 100644
--- a/arch/cris/arch-v32/kernel/entry.S
+++ b/arch/cris/arch-v32/kernel/entry.S
@@ -875,6 +875,14 @@ sys_call_table:
.long sys_process_vm_writev
.long sys_kcmp  /* 350 */
.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
diff --git a/arch/cris/include/asm/unistd.h b/arch/cris/include/asm/unistd.h
index 0f40fed..9c23535 100644
--- a/arch/cris/include/asm/unistd.h
+++ b/arch/cris/include/asm/unistd.h
@@ -4,7 +4,7 @@
 #include uapi/asm/unistd.h
 
 
-#define NR_syscalls 360
+#define NR_syscalls 365
 
 #include arch/unistd.h
 
diff --git a/arch/cris/include/uapi/asm/unistd.h 
b/arch/cris/include/uapi/asm/unistd.h
index f3287fa..062b648 100644
--- a/arch/cris/include/uapi/asm/unistd.h
+++ b/arch/cris/include/uapi/asm/unistd.h
@@ -356,5 +356,13 @@
 #define __NR_process_vm_writev 349
 #define __NR_kcmp  350
 #define __NR_finit_module  351
+#define __NR_sched_setattr 352
+#define __NR_sched_getattr 353
+#define __NR_renameat2 354
+#define __NR_seccomp   355
+#define __NR_getrandom 356
+#define __NR_memfd_create  357
+#define __NR_bpf   358
+#define __NR_execveat  359
 
 #endif /* _UAPI_ASM_CRIS_UNISTD_H_ */
-- 
1.7.10.4


/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/2] CRISv10: delete unused lib/old_checksum.c

2015-06-03 Thread Jesper Nilsson
On Fri, May 22, 2015 at 08:58:48PM +0200, Rabin Vincent wrote:
 This file is never built.
 
 Signed-off-by: Rabin Vincent ra...@rab.in

Thanks, added.

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] cris: Wire up missing syscalls

2015-06-03 Thread Jesper Nilsson
On Wed, Jun 03, 2015 at 01:36:47PM +0200, Chen Gang wrote:
 On 06/03/2015 06:20 PM, Jesper Nilsson wrote:
  On Wed, May 06, 2015 at 03:48:12PM +0200, Chen Gang wrote:
  The related warnings:
  Signed-off-by: Chen Gang gang.chen.5...@gmail.com
  Thanks and applied, sorry for the long delay, I had to rewrite the patch a 
  bit
  since the v10 and v32 does not have the same standard in prefixing 
  underscores.
  Also, to be safe I also bumped the NR_syscalls as below.
  
 
 Oh, it doesn't matter, everyone's time resources are expensive, so I
 should/can understand your delay response.

Thanks for understanding.

 Sorry for my carelessness: use _sys*, and keep original NR_syscalls no
 touch. And also 3 additional things I guess we may need a look:
 
  - For v10, need we also use sys* instead of _sys*?

No, the trick here is that v10 and v32 uses different standards
with regards to prefixing underscore. I'm hoping to fix that someday.

  - Most archs do not implement seccomp and bpf, which can pass building,
but will return -ENOSYS during running. Need we left them still as
warnings? (I guess, it depends on the maintainer's taste).

Well, I don't have any strong feelings in either direction. :-)

  - In the latest next tree, it also add additional userfaultfd syscall,
need we add it, too?

Hm, haven't seen that syscall, I'm guessing it's in linux-next?

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] cris: Wire up missing syscalls

2015-06-04 Thread Jesper Nilsson
On Wed, Jun 03, 2015 at 05:04:26PM +0200, Jesper Nilsson wrote:
 On Wed, Jun 03, 2015 at 01:36:47PM +0200, Chen Gang wrote:
   - For v10, need we also use sys* instead of _sys*?
 
 No, the trick here is that v10 and v32 uses different standards
 with regards to prefixing underscore. I'm hoping to fix that someday.

... and as your autotest found, this was a real problem.
I'll push a new commit to drop the underscore for v10 also.

BR,

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] cris: don't use module_init for non-modular core eeprom.c code

2015-06-15 Thread Jesper Nilsson
On Sun, Jun 14, 2015 at 05:05:21PM -0400, Paul Gortmaker wrote:
 The eeprom.c code is compiled based on the Kconfig setting
 ETRAX_I2C_EEPROM, which is bool.  So the code is either built in
 or absent.  It will never be modular, so using module_init as an
 alias for __initcall is rather misleading.
 
 Fix this up now, so that we can relocate module_init from
 init.h into module.h in the future.  If we don't do this, we'd
 have to add module.h to obviously non-modular code, and that
 would be a worse thing.
 
 Direct use of __initcall is discouraged, vs prioritized ones.
 Use of device_initcall is consistent with what __initcall
 maps onto, and hence does not change the init order, making the
 impact of this change zero.   Should someone with real hardware
 for boot testing want to change it later to arch_initcall or
 something different, they can do that at a later date.
 
 Cc: Mikael Starvik star...@axis.com

Looks good, I'll take it in the CRIS-tree.

 Cc: linux-cris-ker...@axis.com
 Signed-off-by: Paul Gortmaker paul.gortma...@windriver.com

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH -next] cris: Drop reference to get_cmos_time()

2015-10-26 Thread Jesper Nilsson
On Sun, Oct 25, 2015 at 03:50:59PM -0700, Guenter Roeck wrote:
> Function get_cmos_time() was removed with commit 657926a83df9 ("cris:
> time: Cleanup of persistent clock stuff"). The remaining reference to
> it may cause the following build error.
> 
> arch/cris/kernel/built-in.o:(___ksymtab+get_cmos_time+0x0):
>   undefined reference to `get_cmos_time'
> Makefile:946: recipe for target 'vmlinux' failed

Agreed, added to the cris-tree.

Thanks,

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [GIT PULL]: CRIS changes for 4.4

2015-11-03 Thread Jesper Nilsson
On Tue, Nov 03, 2015 at 01:49:23AM +0100, Stephen Rothwell wrote:
> Hi Jesper,
> 
> On Mon, 2 Nov 2015 21:17:03 +0100 Jesper Nilsson <jesper.nils...@axis.com> 
> wrote:
> >
> > Please pull CRIS changes for 4.4:
> > 
> > Mostly another batch of code removal due to move to standard
> > frameworks for CRISv32, initial devicetree configuration for
> > a couple of boards, and some small fixes for kgdb and time handling.
> > 
> > Thanks,
> > 
> > /Jesper
> > 
> > The following changes since commit 6a13feb9c82803e2b815eca72fa7a9f5561d7861:
> > 
> >   Linux 4.3 (2015-11-01 16:05:25 -0800)
> > 
> > are available in the git repository at:
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris.git 
> > tags/cris-for-4.4
> 
> This is all the same patches as are in linux-next (and have been for
> some time) but has been rebased on top of v4.3 today ...

Yes, you're right, I did do a rebase to make a final
compile test, I should have dropped that branch and
sent the for-next branch instead. :-(

> Cheers,
> Stephen Rothwells...@canb.auug.org.au

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[GIT PULL]: CRIS changes for 4.4

2015-11-02 Thread Jesper Nilsson
Hi Linus,

Please pull CRIS changes for 4.4:

Mostly another batch of code removal due to move to standard
frameworks for CRISv32, initial devicetree configuration for
a couple of boards, and some small fixes for kgdb and time handling.

Thanks,

/Jesper

The following changes since commit 6a13feb9c82803e2b815eca72fa7a9f5561d7861:

  Linux 4.3 (2015-11-01 16:05:25 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris.git 
tags/cris-for-4.4

for you to fetch changes up to 4247896f4b8bdbe2c9a03c2f713b636e94eab210:

  cris: Drop reference to get_cmos_time() (2015-11-02 20:03:05 +0100)


CRIS changes for 4.4


Andy Shevchenko (2):
  cris: kgdb: use native hex2bin
  cris: re-use helpers to dump data in hex format

Chen Gang (2):
  cris: arch-v10: kgdb: Use BAR instead of DTP0 for register P12
  cris: arch-v10: kgdb: Add '__used' for static variable is_dyn_brkp

Guenter Roeck (1):
  cris: Drop reference to get_cmos_time()

Jesper Nilsson (1):
  CRIS: Drop code related to obsolete or unused kconfigs

Rabin Vincent (6):
  CRIS v32: increase NR_IRQS
  CRIS: add dt-bindings symlink
  CRIS v32: dev88: add GPIO, LEDs, RTC, temp sensor
  CRIS v32: add ARTPEC-3 and P1343 device trees
  CRIS v32: remove I2C bitbanging driver
  CRIS v32: remove old GPIO and LEDs code

Xunlei Pang (1):
  cris: time: Cleanup of persistent clock stuff

 arch/cris/Kconfig   |1 -
 arch/cris/arch-v10/kernel/head.S|  106 ---
 arch/cris/arch-v10/kernel/kgdb.c|   89 +--
 arch/cris/arch-v10/mm/init.c|   14 +-
 arch/cris/arch-v32/Kconfig  |   89 ---
 arch/cris/arch-v32/drivers/Kconfig  |  167 -
 arch/cris/arch-v32/drivers/Makefile |1 -
 arch/cris/arch-v32/drivers/axisflashmap.c   |   40 +-
 arch/cris/arch-v32/drivers/i2c.c|  751 
 arch/cris/arch-v32/drivers/i2c.h|   16 -
 arch/cris/arch-v32/drivers/mach-a3/Makefile |1 -
 arch/cris/arch-v32/drivers/mach-a3/gpio.c   |  999 ---
 arch/cris/arch-v32/drivers/mach-fs/Makefile |1 -
 arch/cris/arch-v32/drivers/mach-fs/gpio.c   |  978 --
 arch/cris/arch-v32/kernel/crisksyms.c   |3 -
 arch/cris/arch-v32/kernel/debugport.c   |2 -
 arch/cris/arch-v32/kernel/head.S|4 -
 arch/cris/arch-v32/kernel/irq.c |6 +-
 arch/cris/arch-v32/kernel/kgdb.c|   96 +--
 arch/cris/arch-v32/kernel/setup.c   |8 -
 arch/cris/arch-v32/mach-a3/Makefile |2 +-
 arch/cris/arch-v32/mach-a3/io.c |  149 
 arch/cris/arch-v32/mach-fs/Kconfig  |   19 -
 arch/cris/arch-v32/mach-fs/Makefile |2 +-
 arch/cris/arch-v32/mach-fs/io.c |  191 -
 arch/cris/boot/dts/artpec3.dtsi |   46 ++
 arch/cris/boot/dts/dev88.dts|   49 ++
 arch/cris/boot/dts/etraxfs.dtsi |8 +
 arch/cris/boot/dts/include/dt-bindings  |1 +
 arch/cris/boot/dts/p1343.dts|   76 ++
 arch/cris/boot/rescue/head_v10.S|3 -
 arch/cris/include/arch-v32/arch/io.h|  140 
 arch/cris/include/arch-v32/arch/irq.h   |2 +-
 arch/cris/include/asm/eshlibld.h|3 +-
 arch/cris/include/asm/io.h  |2 +
 arch/cris/include/uapi/asm/etraxgpio.h  |  157 -
 arch/cris/kernel/crisksyms.c|2 -
 arch/cris/kernel/time.c |   25 -
 38 files changed, 272 insertions(+), 3977 deletions(-)
 delete mode 100644 arch/cris/arch-v32/drivers/i2c.c
 delete mode 100644 arch/cris/arch-v32/drivers/i2c.h
 delete mode 100644 arch/cris/arch-v32/drivers/mach-a3/gpio.c
 delete mode 100644 arch/cris/arch-v32/drivers/mach-fs/gpio.c
 delete mode 100644 arch/cris/arch-v32/mach-a3/io.c
 delete mode 100644 arch/cris/arch-v32/mach-fs/io.c
 create mode 100644 arch/cris/boot/dts/artpec3.dtsi
 create mode 12 arch/cris/boot/dts/include/dt-bindings
 create mode 100644 arch/cris/boot/dts/p1343.dts
 delete mode 100644 arch/cris/include/arch-v32/arch/io.h

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Problems with 'mtd: warn when registering the same master many times'

2015-11-02 Thread Jesper Nilsson
On Mon, Nov 02, 2015 at 12:09:31PM -0800, Guenter Roeck wrote:
> On Mon, Nov 02, 2015 at 09:43:56AM -0800, Brian Norris wrote:
> > On Mon, Nov 02, 2015 at 07:41:48AM -0800, Guenter Roeck wrote:
> > > I also see the warning in crisv32 runtime tests. This is because the code 
> > > in
> > > arch/cris/arch-v32/drivers/axisflashmap.c calls mtd_device_register() 
> > > multiple times
> > > with the same mtd_info argument, each time to register a different 
> > > partition.
> > > I am not sure if the check is appropriate for this case either, since the 
> > > code calls
> > > mtd_device_register(), both 'type' and 'parser_data' are NULL, 
> > > parse_mtd_partitions()
> > > does not do anything, and the problem you are concerned about does not 
> > > apply.
> > 
> > Actually, that platform is probably one of the main reasons for the
> > warning patch. It is not kosher to call mtd_device_register() as many
> > times as it does. So, you get a warning until somebody can be bothered
> > to fix that ugly code.
> > 
> > > How about changing the warning to something like the following ?
> > > 
> > > WARN_ONCE(types && mtd->_reboot && mtd->reboot_notifier.notifier_call, 
> > > "MTD already registered\n");
> > 
> > No, that doesn't make much sense. We might as well just be removing the
> > check entirely at that point, since this just looks like you're shooting
> > at a random/fragile hack.
> > 
> > > This would eliminate (what I think are) false positives and only warn if 
> > > there
> > > is a real problem.
> > 
> > I think we have the option of either taking patch [1] or taking your
> > first suggestion. But the axisflashmap.c is not a false positive, and it
> > should be fixed. Or just live with the warning, if it's unmaintained.
> > 
> We'll see if Jesper has any comments. I didn't see an easy way to fix that
> driver myself, so I guess we may have to live with the warning for now.

Yeah, I'm sorry to say that we're aware of the problem but haven't
got to fixing it... At one time (3.20?), the code actually went into
an infinite loop on startup. :-(
I'll boost this to the head of the queue to be fixed, but I hope you can live
with the warning until we can find a mythical "Round Tuit".

> Thanks,
> Guenter

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RESEND PATCH] timerfd: Allow TFD_TIMER_CANCEL_ON_SET with relative timeouts

2015-10-20 Thread Jesper Nilsson
On Tue, Oct 20, 2015 at 10:18:22AM +0200, Arnd Bergmann wrote:
> On Monday 19 October 2015 11:53:25 John Stultz wrote:
> > 
> > But yea. At the same time I get you want to avoid user-pain like in
> > the case of the badly initialized RTC, but in that case would
> > returning 0 for RTC reads greater then y2038 on 32 bit systems be a
> > more sane fix?
> 
> I like that idea. In theory we could go further and check that the RTC
> is somewhere between 2015 and 2037 (or higher on 64-bit systems) but
> return 0 (1970) for anything that is outside of that range. That might
> have side-effects for users that have a legitimate reason to backdate
> their clocks though.

This is how the RTC framework used to handle it before the referenced
patch in my original mail, so a reversal (conditional on 32bit)
would solve that part of the problem.

It also looks like Miroslav's patch will handle the other cases of a
accidental user initiated set of a bad date or a maliciously set NTP.
Though, from my point of view, a wrap-around to 1970 would be just as valid
as a jump one week in the past.

What's the current status of that patch?

>   Arnd

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RESEND PATCH] timerfd: Allow TFD_TIMER_CANCEL_ON_SET with relative timeouts

2015-10-09 Thread Jesper Nilsson
Allow TFD_TIMER_CANCEL_ON_SET on timerfd_settime() with relative
as well as absolute timeout.

Signed-off-by: Jesper Nilsson <jesper.nils...@axis.com>
---
Resending after some discussion with Thomas Gleixner at ELCE,
and Cc:ing John Stultz and Michael Kerrisk who may have comments.

Longer background:

One of the uses for TFD_TIMER_CANCEL_ON_SET is to get
an event when the CLOCK_REALTIME changes (as by NTP or user action).
In this case, the timeout irrelevant, and the maximum
available value would be selected to avoid mis-triggers.

However, timerfd uses time_t for configuration, and the maximum
value on a 32bit time_t system is actually a valid time
(near 2038-01-19 03:14) in the 64bit ktime_t used internally in timerfd.

One way of provoking this problem would be to set the time
using "date '2038-01-19 03:14'" and letting the time roll over
a few seconds later.

After this time, a timerfd will continuously fire
when configured with a maximum absolute timeout,
potentially stealing all CPU and stopping the application
from doing what it really should be doing.
Which would be fine, unless the application is systemd
and loops at startup, leaving the system in a state where
the kernel is up, but nothing running in userspace. :-(

This problem was further exposed in kernel v3.19 by
commit a6d6e1c879efa4b77e250c34fe5fe1c34e6ef070
which introduced 64bit time in the RTC subsystem.
On an unconfigured RTC or an RTC with flat/removed battery
the date on could be random, and in some cases past 2038.

Of course, the proposed patch only allows the setting of relative
timeouts with TFD_TIMER_CANCEL_ON_SET, any application using
it would also need to be patched to use the relative timer
for this solve the described problem.

Another solution would be to add a new flag to timerfd_settime()
to indicate that the timer value is irrelevant, but I considered
it an unnecessary waste of a flag-bit.

A third possible solution is to steal the time (0,0)
(which currently gives -EINVAL) to indicate that the timeout
is irrelevant. This would however be a change in behaviour
that a current user wouldn't expect, perhaps making a previously
correctly failing application wait until a time change (or forever)

Tested on a MIPS 34Kc with kernel v4.1.

 fs/timerfd.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/timerfd.c b/fs/timerfd.c
index b94fa6c..8ec3aeb 100644
--- a/fs/timerfd.c
+++ b/fs/timerfd.c
@@ -134,7 +134,7 @@ static void timerfd_setup_cancel(struct timerfd_ctx *ctx, 
int flags)
 {
if ((ctx->clockid == CLOCK_REALTIME ||
 ctx->clockid == CLOCK_REALTIME_ALARM) &&
-   (flags & TFD_TIMER_ABSTIME) && (flags & TFD_TIMER_CANCEL_ON_SET)) {
+   (flags & TFD_TIMER_CANCEL_ON_SET)) {
if (!ctx->might_cancel) {
ctx->might_cancel = true;
        spin_lock(_lock);
-- 
1.7.10.4


/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] timerfd: Allow TFD_TIMER_CANCEL_ON_SET with relative timeouts

2015-09-07 Thread Jesper Nilsson
Allow TFD_TIMER_CANCEL_ON_SET on timerfd_settime() with relative
as well as absolute timeout.

Signed-off-by: Jesper Nilsson <jesper.nils...@axis.com>
---
Longer background:

One of the uses for TFD_TIMER_CANCEL_ON_SET is to get
an event when the CLOCK_REALTIME changes (as by NTP or user action).
In this case, the timeout irrelevant, and the maximum
available value could be selected to avoid mis-triggers.

However, timerfd uses time_t for configuration, and the maximum
value on a 32bit time_t system is actually a valid time
(near 2038-01-19 03:14) in the 64bit ktime_t used internally in timerfd.

One way of provoking this problem would be to set the time
using "date '2038-01-19 03:14'" and letting the time roll over
a few seconds later.

After this time, a timerfd will continuously fire
when configured with a maximum absolute timeout,
potentially stealing all CPU and stopping the application
from doing what it really should be doing.
Which would be fine, unless the application is systemd
and loops at startup, leaving the system in a state where
the kernel is up, but nothing running in userspace. :-(

This problem was further exposed in kernel v3.19 by
commit a6d6e1c879efa4b77e250c34fe5fe1c34e6ef070
which introduced 64bit time in the RTC subsystem.
On an unconfigured RTC or an RTC with flat/removed battery
the date on could be random, and in some cases past 2038.

Of course, the proposed patch only allows the setting of relative
timeouts with TFD_TIMER_CANCEL_ON_SET, any application using
it would also need to be patched to use the relative timer
for this solve the described problem.

Another solution would be to add a new flag to timerfd_settime()
to indicate that the timer value is irrelevant, but I considered
it an unnecessary waste of a flag-bit.

Tested on a MIPS 34Kc with kernel v4.1.

 fs/timerfd.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/timerfd.c b/fs/timerfd.c
index b94fa6c..8ec3aeb 100644
--- a/fs/timerfd.c
+++ b/fs/timerfd.c
@@ -134,7 +134,7 @@ static void timerfd_setup_cancel(struct timerfd_ctx *ctx, 
int flags)
 {
if ((ctx->clockid == CLOCK_REALTIME ||
 ctx->clockid == CLOCK_REALTIME_ALARM) &&
-   (flags & TFD_TIMER_ABSTIME) && (flags & TFD_TIMER_CANCEL_ON_SET)) {
+   (flags & TFD_TIMER_CANCEL_ON_SET)) {
if (!ctx->might_cancel) {
ctx->might_cancel = true;
        spin_lock(_lock);
-- 
1.7.10.4


/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[GIT PULL]: CRIS changes for 4.3

2015-09-12 Thread Jesper Nilsson
Hi Linus!

Please pull the below tree for CRIS changes for 4.3.
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 som good debug.

Thanks!

The following changes since commit 51e771c0d25b43d0f12b2c7c01939942becbbe28:

  Merge branch 'for-linus' of 
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input (2015-09-04 12:02:11 
-0700)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris.git 
tags/cris-for-4.3

for you to fetch changes up to 254a0f4135482dc02701562a38e10675a48c8ddf:

  CRISv10: delete unused lib/dmacopy.c (2015-09-05 00:56:51 +0200)


CRIS changes for 4.3


Chen Gang (1):
  CRIS: Wire up missing syscalls

Christophe Jaillet (1):
  cris: arch-v32: gpio: Use kzalloc instead of kmalloc/memset

Jesper Nilsson (3):
  CRISv32: ETRAX FS: Squash warnings in pinmux driver
  CRISv32: Add GPIO driver to the default configs
  CRISv32: Squash compile warnings for axisflashmap

Rabin Vincent (20):
  CRISv32: add unreachable() to BUG()
  CRISv32: allow CONFIG_DEBUG_BUGVERBOSE
  CRIS: UAPI: fix ptrace.h
  CRIS: don't make asm/elf.h depend on asm/user.h
  CRIS: UAPI: fix elf.h export
  CRIS: UAPI: use generic headers via Kbuild
  CRIS: UAPI: use generic auxvec.h
  CRIS: UAPI: use generic sockios.h
  CRIS: UAPI: use generic sembuf.h
  CRIS: UAPI: use generic socket.h
  CRIS: UAPI: use generic msgbuf.h
  CRIS: UAPI: use generic shmbuf.h
  CRIS: UAPI: use generic types.h
  CRISv32: add support for irqflags tracing
  CRISv32: annotate irq enable in idle loop
  CRIS: add STACKTRACE_SUPPORT
  CRISv32: enable LOCKDEP_SUPPORT
  CRIS: fix switch_mm() lockdep splat
  CRISv10: delete unused lib/old_checksum.c
  CRISv10: delete unused lib/dmacopy.c

 arch/cris/Kconfig  |   12 +++
 arch/cris/arch-v10/kernel/entry.S  |8 ++
 arch/cris/arch-v10/lib/dmacopy.c   |   42 -
 arch/cris/arch-v10/lib/old_checksum.c  |   86 --
 arch/cris/arch-v32/drivers/Kconfig |   16 ++--
 arch/cris/arch-v32/drivers/axisflashmap.c  |9 +-
 arch/cris/arch-v32/drivers/mach-a3/gpio.c  |4 +-
 arch/cris/arch-v32/drivers/mach-fs/gpio.c  |3 +-
 arch/cris/arch-v32/kernel/entry.S  |   19 
 arch/cris/arch-v32/kernel/process.c|4 +-
 arch/cris/arch-v32/kernel/signal.c |1 -
 arch/cris/arch-v32/mach-fs/pinmux.c|8 +-
 arch/cris/configs/artpec_3_defconfig   |5 +-
 arch/cris/configs/etraxfs_defconfig|1 +
 arch/cris/include/arch-v32/arch/bug.h  |   11 ++-
 arch/cris/include/arch-v32/arch/irqflags.h |2 +-
 arch/cris/include/asm/Kbuild   |   17 
 arch/cris/include/asm/mmu_context.h|9 +-
 arch/cris/include/asm/stacktrace.h |8 ++
 arch/cris/include/asm/types.h  |   12 ---
 arch/cris/include/asm/unistd.h |2 +-
 arch/cris/include/uapi/asm/Kbuild  |5 ++
 arch/cris/include/uapi/asm/auxvec.h|4 -
 arch/cris/include/uapi/asm/bitsperlong.h   |1 -
 arch/cris/include/{ => uapi}/asm/elf.h |9 +-
 .../{arch-v10/arch/elf.h => uapi/asm/elf_v10.h}|5 +-
 .../{arch-v32/arch/elf.h => uapi/asm/elf_v32.h}|5 +-
 arch/cris/include/uapi/asm/errno.h |6 --
 arch/cris/include/uapi/asm/fcntl.h |1 -
 arch/cris/include/uapi/asm/ioctl.h |1 -
 arch/cris/include/uapi/asm/ipcbuf.h|1 -
 arch/cris/include/uapi/asm/kvm_para.h  |1 -
 arch/cris/include/uapi/asm/mman.h  |1 -
 arch/cris/include/uapi/asm/msgbuf.h|   33 ---
 arch/cris/include/uapi/asm/poll.h  |1 -
 arch/cris/include/uapi/asm/ptrace.h|6 +-
 .../arch/ptrace.h => uapi/asm/ptrace_v10.h}|0
 .../arch/ptrace.h => uapi/asm/ptrace_v32.h}|0
 arch/cris/include/uapi/asm/resource.h  |6 --
 arch/cris/include/uapi/asm/sembuf.h|   25 --
 arch/cris/include/uapi/asm/shmbuf.h|   42 -
 arch/cris/include/uapi/asm/siginfo.h   |6 --
 arch/cris/include/uapi/asm/socket.h|   92 
 arch/cris/include/uapi/asm/sockios.h   |   13 ---
 arch/cris/include/uapi/asm/statfs.h|6 --
 arch/cris/include/uapi/asm/types.h |1 -
 arch/cris/include/ua

Re: [PATCH] cris: kgdb: use native hex2bin

2015-09-30 Thread Jesper Nilsson
On Wed, Sep 30, 2015 at 06:37:51PM +0300, Andy Shevchenko wrote:
> On Wed, 2015-09-30 at 17:22 +0200, Jesper Nilsson wrote:
> > On Wed, Sep 30, 2015 at 04:46:53PM +0200, Andy Shevchenko wrote:
> > > On Tue, 2013-06-04 at 11:51 +0300, Andy Shevchenko wrote:
> > > > There are kernel native helpers to convert hex ascii to the 
> > > > binary 
> > > > format:
> > > > hex_to_bin() and hex2bin(). Thus, no need to reimplement them 
> > > > customly.
> > > > 
> > > 
> > > No one is interested in this?
> > 
> > Hm, dunno why, but obviously I've missed these patches,
> > and I can't find them on my main mailaccount either.
> > 
> > Anyways, I found them on a secondary account, and have
> > added them to the CRIS linux-next tree.
> 
> Just noticed that it was along time ago and currently it might produce
> compile warnings or errors since now hex2bin is prefixed by
> __must_check.
> 
> Would you like me to send v2?

Unless you've tweaked them more since you sent them,
it shouldn't be necessary, the patches applied cleanly.
Those (most) files in CRIS are not touched very often... :-)

> Andy Shevchenko <andriy.shevche...@linux.intel.com>

/^JN - Jesper Nilsson
--
  Jesper Nilsson -- jesper_at_jni.nu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] cris: kgdb: use native hex2bin

2015-09-30 Thread Jesper Nilsson
On Wed, Sep 30, 2015 at 08:02:34PM +0200, Jesper Nilsson wrote:
> On Wed, Sep 30, 2015 at 06:37:51PM +0300, Andy Shevchenko wrote:
> > On Wed, 2015-09-30 at 17:22 +0200, Jesper Nilsson wrote:
> > > On Wed, Sep 30, 2015 at 04:46:53PM +0200, Andy Shevchenko wrote:
> > > > On Tue, 2013-06-04 at 11:51 +0300, Andy Shevchenko wrote:
> > > > > There are kernel native helpers to convert hex ascii to the 
> > > > > binary 
> > > > > format:
> > > > > hex_to_bin() and hex2bin(). Thus, no need to reimplement them 
> > > > > customly.
> > > > > 
> > > > 
> > > > No one is interested in this?
> > > 
> > > Hm, dunno why, but obviously I've missed these patches,
> > > and I can't find them on my main mailaccount either.
> > > 
> > > Anyways, I found them on a secondary account, and have
> > > added them to the CRIS linux-next tree.
> > 
> > Just noticed that it was along time ago and currently it might produce
> > compile warnings or errors since now hex2bin is prefixed by
> > __must_check.
> > 
> > Would you like me to send v2?
> 
> Unless you've tweaked them more since you sent them,
> it shouldn't be necessary, the patches applied cleanly.
> Those (most) files in CRIS are not touched very often... :-)

... and now I saw your v2, I'll take that instead since
you already fixed the __must_check problems.

Thanks a lot!

> > Andy Shevchenko <andriy.shevche...@linux.intel.com>

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2, resend 1/1] cris: kgdb: use native hex2bin

2015-10-01 Thread Jesper Nilsson
On Thu, Oct 01, 2015 at 02:42:29PM +0300, Andy Shevchenko wrote:
> There are kernel native helpers to convert hex ascii to the binary format:
> hex_to_bin() and hex2bin(). Thus, no need to reimplement them customly.

Thanks, added to the CRIS tree, and also confirming our
company mailserver is broken. :-P

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3] cris: arch-v10: kgdb: Add '__used' for static variable is_dyn_brkp

2015-10-01 Thread Jesper Nilsson
On Thu, Aug 06, 2015 at 12:34:53AM +0200, Chen Gang wrote:
> Within one C file, current gcc can optimize the global static variables
> according to the C code, but it will skip assembly code -- it will pass
> them to gas directly.
> 
> if the static variable is used between C code and assembly code in one C
> file (e.g. is_dyn_brkp in kgdb.c), it needs '__used' to let gcc know it
> should be still used, or gcc may remove it for optimization.
> 
> The related error in this case:
> 
> LD  init/built-in.o
>   arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_breakpoint':
>   (.text+0x2aca): undefined reference to `is_dyn_brkp'
>   arch/cris/arch-v10/kernel/built-in.o: In function `is_static':
>   kgdb.c:(.text+0x2ada): undefined reference to `is_dyn_brkp'
> 
> Signed-off-by: Chen Gang <gang.chen.5...@gmail.com>

Added to the cris tree, thanks!

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] cris: arch-v10: kgdb: Use BAR instead of DTP0 for register P12

2015-10-01 Thread Jesper Nilsson
Hi,

On Sat, Jul 11, 2015 at 05:47:24AM +0800, Chen Gang wrote:
> For arch-v10, there is no DTP0 register, and at present, assembler know
> BAR, so use BAR instead of DTP0, the related error (with allmodconfig):
> 
> CC  arch/cris/arch-v10/kernel/kgdb.o
>   {standard input}: Assembler messages:
>   {standard input}:6: Error: Illegal operands
>   {standard input}:6: Error: Illegal operands
> 
> Signed-off-by: Chen Gang <gang.chen.5...@gmail.com>

While checking another kgdb related fix, I hit this bug too.
Applied to the for-next branch of the cris tree.

Sorry about the slow (glacial) response time and thanks!

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 4/6] CRIS v32: add ARTPEC-3 and P1343 device trees

2015-10-01 Thread Jesper Nilsson
On Mon, Aug 03, 2015 at 08:19:22PM +0200, Rabin Vincent wrote:
> Add a device tree for the Axis P1343 with the ARTPEC-3 SoC and on-board
> LEDs and RTC.

Applied to the cris tree, thanks!

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/6] CRIS: add dt-bindings symlink

2015-10-01 Thread Jesper Nilsson
On Mon, Aug 03, 2015 at 08:19:20PM +0200, Rabin Vincent wrote:
> Add a dt-bindings symlink to get DT include files, as on other
> architectures.  See c58299a ("kbuild: create an "include chroot" for DT
> bindings") for the details.

Applied to the cris tree, thanks!

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 3/6] CRIS v32: dev88: add GPIO, LEDs, RTC, temp sensor

2015-10-01 Thread Jesper Nilsson
On Mon, Aug 03, 2015 at 08:19:21PM +0200, Rabin Vincent wrote:
> Add the GPIO driver to the device tree and, using it, support for the
> LEDs and the RTC chip (via I2C-GPIO), as well as the temperature sensor
> (via SPI-GPIO).

Applied to the cris tree, thanks!

/^JN - Jesper Nilsson
-- 
       Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/6] CRIS v32: increase NR_IRQS

2015-10-01 Thread Jesper Nilsson
On Mon, Aug 03, 2015 at 08:19:19PM +0200, Rabin Vincent wrote:
> Increase NR_IQRS so we can fit in GPIO interrupts.

Applied to the cris tree, thanks!

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] cris: time: Cleanup of persistent clock stuff

2015-10-01 Thread Jesper Nilsson
On Fri, Jul 17, 2015 at 05:31:26PM +0800, Xunlei Pang wrote:
> From: Xunlei Pang <pang.xun...@linaro.org>
> 
> - Remove update_persistent_clock(), as it does nothing now.
> - Remove read_persistent_clock(), let it fall back to the weak version.

Thanks, applied to the cris tree.

/^JN - Jesper Nilsson
-- 
       Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/1] cris: re-use helpers to dump data in hex format

2015-10-01 Thread Jesper Nilsson
On Thu, Oct 01, 2015 at 03:17:25PM +0300, Andy Shevchenko wrote:
> There are native helpers such as print_hex_byte() and %*ph specifier to dump
> data in hex format. Re-use them instead of a custom approach.

Ah, excellent, pushing this to for-next immediately...

> Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com>

/^JN - Jesper Nilsson
-- 
       Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 6/6] CRIS v32: remove old GPIO and LEDs code

2015-10-01 Thread Jesper Nilsson
On Mon, Aug 03, 2015 at 08:19:24PM +0200, Rabin Vincent wrote:
> Since we now have a gpiolib driver, remove this code:
> 
> The gpio-etraxfs driver (along with things like gpio-keys-polled for
> polling support) replaces the GIO driver implementations in mach-a3 and
> mach-fs.  The various generic external chip drivers replace the "virtual
> gpio" parts.
> 
> The generic gpio-leds driver replaces the LED handling.

Applied to the cris tree, thanks!

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 5/6] CRIS v32: remove I2C bitbanging driver

2015-10-01 Thread Jesper Nilsson
On Mon, Aug 03, 2015 at 08:19:23PM +0200, Rabin Vincent wrote:
> Now that we have a gpiolib GPIO driver, the generic i2c-gpio driver
> provides this functionality.

Applied to the cris tree, thanks!

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: CRIS v32: leftover references on ETRAX_VIRTUAL_GPIO

2015-10-02 Thread Jesper Nilsson
On Fri, Oct 02, 2015 at 08:57:22AM +0200, Valentin Rothberg wrote:
> Hi Rabin,
> 
> your commit ("CRIS v32: remove old GPIO and LEDs code") is in today's
> linux-next tree (i.e., 20151002).  Among other Kconfig options, the
> commit removes ETRAX_VIRTUAL_GPIO but leaves the following references in
> the code:
> 
> 0 arch/cris/arch-v32/kernel/setup.c   132 #ifdef CONFIG_ETRAX_VIRTUAL_GPIO
> 1 arch/cris/arch-v32/kernel/setup.c   149 #ifdef CONFIG_ETRAX_VIRTUAL_GPIO
> 2 arch/cris/arch-v32/mach-fs/Kconfig  197 depends on ETRAX_VIRTUAL_GPIO
> 3 arch/cris/arch-v32/mach-fs/Kconfig  208 depends on ETRAX_VIRTUAL_GPIO
> 4 arch/cris/include/uapi/asm/etraxgpio.h   59 #ifdef CONFIG_ETRAX_VIRTUAL_GPIO
> 5 arch/cris/include/uapi/asm/etraxgpio.h   74 #ifdef CONFIG_ETRAX_VIRTUAL_GPIO
> 
> Is it intentional or just an accident?
> 
> I found the issue with scripts/checkkconfigsymbols.py.

Good tip, I've gone through the list and removed the ones I found
to be orphaned. There was one that actually was a typo, and some that was
false detections. For example ETRAX_SER is only a part of magic macro 
concatenation...
For reference:

CRIS: Drop code related to obsolete or unused kconfigs

Drop all code related to Kconfigs that don't exist.
Fix one Kconfig where it was actually typo:ed (ETRAX_KGB_PORT2)
Drop content related to CRIS v32 SoCs from etraxgpio.h headerfile,
all use of GPIO for both ETRAX FS and ARTPEC-3 should now be through
standard gpiolib instead.

Signed-off-by: Jesper Nilsson <jesper.nils...@axis.com>
---
 arch/cris/arch-v10/kernel/head.S   |  106 -
 arch/cris/arch-v10/mm/init.c   |   14 +--
 arch/cris/arch-v32/kernel/debugport.c  |2 -
 arch/cris/arch-v32/kernel/head.S   |4 -
 arch/cris/arch-v32/kernel/irq.c|2 +-
 arch/cris/arch-v32/kernel/setup.c  |8 --
 arch/cris/arch-v32/mach-fs/Kconfig |   19 
 arch/cris/boot/rescue/head_v10.S   |3 -
 arch/cris/include/asm/eshlibld.h   |3 +-
 arch/cris/include/uapi/asm/etraxgpio.h |  157 
 10 files changed, 5 insertions(+), 313 deletions(-)

diff --git a/arch/cris/arch-v10/kernel/head.S b/arch/cris/arch-v10/kernel/head.S
index 4a146e1..a4877a4 100644
--- a/arch/cris/arch-v10/kernel/head.S
+++ b/arch/cris/arch-v10/kernel/head.S
@@ -354,63 +354,6 @@ no_command_line:
blo 1b
nop
 
-#ifdef CONFIG_BLK_DEV_ETRAXIDE
-   ;; disable ATA before enabling it in genconfig below
-   moveq   0,$r0
-   move.d  $r0,[R_ATA_CTRL_DATA]
-   move.d  $r0,[R_ATA_TRANSFER_CNT]
-   move.d  $r0,[R_ATA_CONFIG]
-#if 0
-   move.d  R_PORT_G_DATA, $r1
-   move.d  $r0, [$r1]; assert ATA bus-reset
-   nop
-   nop
-   nop
-   nop
-   nop
-   nop
-   move.d  0x0800,$r0
-   move.d  $r0,[$r1]
-#endif
-#endif
-
-#ifdef CONFIG_JULIETTE
-   ;; configure external DMA channel 0 before enabling it in genconfig
-
-   moveq   0,$r0
-   move.d  $r0,[R_EXT_DMA_0_ADDR]
-   ; cnt enable, word size, output, stop, size 0
-   move.dIO_STATE (R_EXT_DMA_0_CMD, cnt, enable)   \
-   | IO_STATE (R_EXT_DMA_0_CMD, rqpol, ahigh)  \
-   | IO_STATE (R_EXT_DMA_0_CMD, apol, ahigh)   \
-   | IO_STATE (R_EXT_DMA_0_CMD, rq_ack, burst) \
-   | IO_STATE (R_EXT_DMA_0_CMD, wid, word) \
-   | IO_STATE (R_EXT_DMA_0_CMD, dir, output)   \
-   | IO_STATE (R_EXT_DMA_0_CMD, run, stop) \
-   | IO_FIELD (R_EXT_DMA_0_CMD, trf_count, 0),$r0
-   move.d  $r0,[R_EXT_DMA_0_CMD]
-
-   ;; reset dma4 and wait for completion
-
-   moveq   IO_STATE (R_DMA_CH4_CMD, cmd, reset),$r0
-   move.b  $r0,[R_DMA_CH4_CMD]
-1: move.b  [R_DMA_CH4_CMD],$r0
-   and.b   IO_MASK (R_DMA_CH4_CMD, cmd),$r0
-   cmp.b   IO_STATE (R_DMA_CH4_CMD, cmd, reset),$r0
-   beq 1b
-   nop
-
-   ;; reset dma5 and wait for completion
-
-   moveq   IO_STATE (R_DMA_CH5_CMD, cmd, reset),$r0
-   move.b  $r0,[R_DMA_CH5_CMD]
-1: move.b  [R_DMA_CH5_CMD],$r0
-   and.b   IO_MASK (R_DMA_CH5_CMD, cmd),$r0
-   cmp.b   IO_STATE (R_DMA_CH5_CMD, cmd, reset),$r0
-   beq 1b
-   nop
-#endif
-
;; Etrax product HW genconfig setup
 
moveq   0,$r0
@@ -447,21 +390,6 @@ no_command_line:
| IO_STATE (R_GEN_CONFIG, dma9, usb),$r0
 
 
-#if defined(CONFIG_ETRAX_DEF_R_PORT_G0_DIR_OUT)
-or.d  IO_STATE (R_GEN_CONFIG, g0dir, out),$r0
-#endif
-
-#if defined(CONFIG_ETRAX_DEF_R_PORT_G8_15_DIR_OUT)
-or.d  IO_STATE (R_GEN_CONFIG, g8_15dir, out),$r0
-#endif
-#if defined(CONFIG_ETRAX_DEF_R_PORT_G16_23_DIR_OUT)
-   or.d  IO_STATE (R_GEN_CONFIG, g16_23dir, out),$r0
-#endif
-
-#if defined(CONFIG_ETRAX_DEF_R_PORT_G24_DIR_OUT)
-   or.d  IO_STATE (R_GEN_CONFIG, g24dir, out),$

Re: CRIS v32: leftover references on ETRAX_VIRTUAL_GPIO

2015-10-02 Thread Jesper Nilsson
On Fri, Oct 02, 2015 at 08:57:22AM +0200, Valentin Rothberg wrote:
> Hi Rabin,

Hi!

> your commit ("CRIS v32: remove old GPIO and LEDs code") is in today's
> linux-next tree (i.e., 20151002).  Among other Kconfig options, the
> commit removes ETRAX_VIRTUAL_GPIO but leaves the following references in
> the code:
> 
> 0 arch/cris/arch-v32/kernel/setup.c   132 #ifdef CONFIG_ETRAX_VIRTUAL_GPIO
> 1 arch/cris/arch-v32/kernel/setup.c   149 #ifdef CONFIG_ETRAX_VIRTUAL_GPIO
> 2 arch/cris/arch-v32/mach-fs/Kconfig  197 depends on ETRAX_VIRTUAL_GPIO
> 3 arch/cris/arch-v32/mach-fs/Kconfig  208 depends on ETRAX_VIRTUAL_GPIO
> 4 arch/cris/include/uapi/asm/etraxgpio.h   59 #ifdef CONFIG_ETRAX_VIRTUAL_GPIO
> 5 arch/cris/include/uapi/asm/etraxgpio.h   74 #ifdef CONFIG_ETRAX_VIRTUAL_GPIO
> 
> Is it intentional or just an accident?

I'm guessing it's an accident, I did have some trouble applying that
particular patch and I had to verify the patch by hand, but I might
have made a mistake and removed something that Rabin didn't remove.
(Since I knew this symbol was tightly connected to the CRIS gpio)

Anyways, I'll roll a patch for removing them, thanks for the heads-up!

/Jesper

> I found the issue with scripts/checkkconfigsymbols.py.
> 
> Kind regards,
>  Valentin

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] cris: kgdb: use native hex2bin

2015-09-30 Thread Jesper Nilsson
On Wed, Sep 30, 2015 at 04:46:53PM +0200, Andy Shevchenko wrote:
> On Tue, 2013-06-04 at 11:51 +0300, Andy Shevchenko wrote:
> > There are kernel native helpers to convert hex ascii to the binary 
> > format:
> > hex_to_bin() and hex2bin(). Thus, no need to reimplement them 
> > customly.
> > 
> 
> No one is interested in this?

Hm, dunno why, but obviously I've missed these patches,
and I can't find them on my main mailaccount either.

Anyways, I found them on a secondary account, and have
added them to the CRIS linux-next tree.

Thanks!

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: crisv32 runtime failure in -next due to 'page-flags: define behavior SL*B-related flags on compound pages'

2015-09-18 Thread Jesper Nilsson
On Fri, Sep 18, 2015 at 05:25:07PM +0300, Kirill A. Shutemov wrote:
> On Thu, Sep 17, 2015 at 09:29:27AM -0700, Guenter Roeck wrote:
> > Hi,
> > 
> > my crisv32 qemu test fails with next-20150917 as follows.
> > 
> > NET: Registered protocol family 16
> > kernel BUG at mm/slab.c:1648!
> > Linux 4.3.0-rc1-next-20150917 #1 Wed Sep 16 23:56:59 PDT 2015
> > Oops: 
> > 
> > [ register dump follows ]
> > 
> > See 
> > http://server.roeck-us.net:8010/builders/qemu-crisv32-next/builds/83/steps/qemubuildcommand/logs/stdio
> > for a complete log.
> 
> Is there a chance to get proper backtrace?

Yes, it should be possible with CONFIG_KALLSYMS=y in the kconfig.

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 15/25] cris: nand: use the mtd instance embedded in struct nand_chip

2015-12-08 Thread Jesper Nilsson
On Tue, Dec 01, 2015 at 12:03:12PM +0100, Boris Brezillon wrote:
> struct nand_chip now embeds an mtd device. Patch all drivers to make use
> of this mtd instance instead of using the instance embedded in their
> private struct or dynamically allocated.
> 
> Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com>

Acked-by: Jesper Nilsson <jesper.nils...@axis.com>

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 18/25] cris: nand: remove useless mtd->priv = chip assignments

2015-12-08 Thread Jesper Nilsson
On Tue, Dec 01, 2015 at 12:03:15PM +0100, Boris Brezillon wrote:
> mtd_to_nand() now uses the container_of() approach to transform an
> mtd_info pointer into a nand_chip one. Drop useless mtd->priv
> assignments from NAND controller drivers.
> 
> Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com>

Acked-by: Jesper Nilsson <jesper.nils...@axis.com>

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v12 01/15] PCI: Let pci_mmap_page_range() take extra resource pointer

2016-06-07 Thread Jesper Nilsson
On Fri, Jun 03, 2016 at 05:06:28PM -0700, Yinghai Lu wrote:
> This one is preparing patch for next one:
>   PCI: Let pci_mmap_page_range() take resource addr
> 
> We need to pass extra resource pointer to avoid searching that again
> for powerpc and microblaze prot set operation.
> 
> Signed-off-by: Yinghai Lu <ying...@kernel.org>
> Cc: linux-arm-ker...@lists.infradead.org

For the CRIS part:

Acked-by: Jesper Nilsson <jesper.nils...@axis.com>

> diff --git a/arch/cris/arch-v32/drivers/pci/bios.c 
> b/arch/cris/arch-v32/drivers/pci/bios.c
> index 64a5fb9..082efb9 100644
> --- a/arch/cris/arch-v32/drivers/pci/bios.c
> +++ b/arch/cris/arch-v32/drivers/pci/bios.c
> @@ -14,7 +14,8 @@ void pcibios_set_master(struct pci_dev *dev)
>   pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
>  }
>  
> -int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
> +int pci_mmap_page_range(struct pci_dev *dev, struct resource *res,
> + struct vm_area_struct *vma,
>   enum pci_mmap_state mmap_state, int write_combine)
>  {
>   unsigned long prot;
> diff --git a/arch/cris/include/asm/pci.h b/arch/cris/include/asm/pci.h
> index b1b289d..65198cb 100644
> --- a/arch/cris/include/asm/pci.h
> +++ b/arch/cris/include/asm/pci.h
> @@ -42,9 +42,6 @@ struct pci_dev;
>  #define PCI_DMA_BUS_IS_PHYS  (1)
>  
>  #define HAVE_PCI_MMAP
> -extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct 
> *vma,
> -        enum pci_mmap_state mmap_state, int 
> write_combine);
> -
>  
>  #endif /* __KERNEL__ */

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


[GIT PULL]: CRIS changes for 4.5

2016-01-21 Thread Jesper Nilsson
Hi Linus,

Please pull CRIS changes for 4.5, it's just some fixups for
section mismatches from Guenter.

Thanks,

/Jesper

The following changes since commit c5a37883f42be712a989e54d5d6c0159b0e56599:

  Merge branch 'akpm' (patches from Andrew) (2015-11-10 21:14:23 -0800)

are available in the git repository at:


  g...@gitolite.kernel.org:pub/scm/linux/kernel/git/jesper/cris.git 
tags/cris-for-4.5

for you to fetch changes up to f9f3f864b5e8c09d7837d8980edba4ad52969819:

  cris: Fix section mismatches in architecture startup code (2015-12-15 
14:03:19 +0100)


CRIS changes for 4.5


Guenter Roeck (2):
  cris: debugport: Fix section mismatches
  cris: Fix section mismatches in architecture startup code

 arch/cris/arch-v10/kernel/debugport.c |   22 +++---
 arch/cris/arch-v10/kernel/head.S  |6 --
 arch/cris/arch-v32/kernel/head.S  |6 --
 arch/cris/kernel/vmlinux.lds.S|1 +
 4 files changed, 20 insertions(+), 15 deletions(-)

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


Re: [GIT PULL]: CRIS changes for 4.5

2016-01-21 Thread Jesper Nilsson
On Thu, Jan 21, 2016 at 03:28:52PM +0530, Sudip Mukherjee wrote:
> On Thu, Jan 21, 2016 at 10:30:06AM +0100, Jesper Nilsson wrote:
> > are available in the git repository at:
> > 
> > 
> >   g...@gitolite.kernel.org:pub/scm/linux/kernel/git/jesper/cris.git 
> > tags/cris-for-4.5
> 
> I think -
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris.git 
> tags/cris-for-4.5

Yes, you are of course right, I'll resend the pull request.

> regards
> sudip

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


[GIT PULL]: CRIS changes for 4.5

2016-01-21 Thread Jesper Nilsson
Hi Linus,

Please pull CRIS changes for 4.5, it's just some fixups for
section mismatches from Guenter.

This is the same as the previous pull request, but now with
a normal git.kernel.org address.

Thanks,

/Jesper

The following changes since commit c5a37883f42be712a989e54d5d6c0159b0e56599:

  Merge branch 'akpm' (patches from Andrew) (2015-11-10 21:14:23 -0800)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris.git 
tags/cris-for-4.5

for you to fetch changes up to f9f3f864b5e8c09d7837d8980edba4ad52969819:

  cris: Fix section mismatches in architecture startup code (2015-12-15 
14:03:19 +0100)


CRIS changes for 4.5


Guenter Roeck (2):
  cris: debugport: Fix section mismatches
  cris: Fix section mismatches in architecture startup code

 arch/cris/arch-v10/kernel/debugport.c |   22 +++---
 arch/cris/arch-v10/kernel/head.S  |6 --
 arch/cris/arch-v32/kernel/head.S  |6 --
 arch/cris/kernel/vmlinux.lds.S|1 +
 4 files changed, 20 insertions(+), 15 deletions(-)

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


Re: [PATCH V3 04/11] CRIS v32: nand: set ECC algorithm explicitly

2016-04-22 Thread Jesper Nilsson
On Sun, Apr 17, 2016 at 10:53:00PM +0200, Rafał Miłecki wrote:
> This is part of process deprecating NAND_ECC_SOFT_BCH (and switching to
> enum nand_ecc_algo).
> 
> Signed-off-by: Rafał Miłecki <zaj...@gmail.com>

Acked-by: Jesper Nilsson <jesper.nils...@axis.com>


/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


Re: [PATCH 13/54] MAINTAINERS: Add file patterns for cris device tree bindings

2016-05-23 Thread Jesper Nilsson
On Sun, May 22, 2016 at 11:05:50AM +0200, Geert Uytterhoeven wrote:
> Submitters of device tree binding documentation may forget to CC
> the subsystem maintainer if this is missing.
> 
> Signed-off-by: Geert Uytterhoeven <ge...@linux-m68k.org>
> Cc: Mikael Starvik <star...@axis.com>

Acked-by: Jesper Nilsson <jesper.nils...@axis.com>

> Cc: linux-cris-ker...@axis.com
> ---
> Please apply this patch directly if you want to be involved in device
> tree binding documentation for your subsystem.

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


Re: [patch V4 02/31] bitops: Include generic parity.h in some architectures' bitops.h

2016-05-11 Thread Jesper Nilsson
On Wed, May 11, 2016 at 05:06:17PM +0800, zengzhao...@163.com wrote:
> From: Zhaoxiu Zeng <zhaoxiu.z...@gmail.com>
> 
> Simply use the generic version.
> 
> Signed-off-by: Zhaoxiu Zeng <zhaoxiu.z...@gmail.com>
> Acked-by: Hans-Christian Noren Egtvedt <egtv...@samfundet.no> [for avr32]

For the CRIS part:

Acked-by: Jesper Nilsson <jesper.nils...@axis.com>

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


Re: [PATCH v4 06/18] cris: Remove unnecessary of_platform_populate with default match table

2016-05-16 Thread Jesper Nilsson
On Thu, May 12, 2016 at 08:06:03PM +0800, Kefeng Wang wrote:
> After patch "of/platform: Add common method to populate default bus",
> it is possible for arch code to remove unnecessary callers about the
> of_platform_populate with default match table.
> 
> Cc: Mikael Starvik <star...@axis.com>

Acked-by: Jesper Nilsson <jesper.nils...@axis.com>

> Signed-off-by: Kefeng Wang <wangkefeng.w...@huawei.com>
> ---
>  arch/cris/kernel/setup.c | 8 ----
>  1 file changed, 8 deletions(-)

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


Re: [PATCH 1/2] dt-bindings: pci: add DT binding for Axis ARTPEC-6 PCIe controller

2016-05-07 Thread Jesper Nilsson
On Thu, May 05, 2016 at 05:03:31PM -0500, Rob Herring wrote:
> On Wed, May 04, 2016 at 01:54:17PM +0200, Niklas Cassel wrote:
> > From: Niklas Cassel <niklas.cas...@axis.com>
> > 
> > This commit adds the Device Tree binding documentation that allows to
> > describe the PCIe controller found in the Axis ARTPEC-6 SoC.
> > 
> > Signed-off-by: Niklas Cassel <niklas.cas...@axis.com>
> > ---
> >  .../devicetree/bindings/pci/axis,artpec6-pcie.txt  | 45 
> > ++
> >  1 file changed, 45 insertions(+)
> >  create mode 100644 
> > Documentation/devicetree/bindings/pci/axis,artpec6-pcie.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/pci/axis,artpec6-pcie.txt 
> > b/Documentation/devicetree/bindings/pci/axis,artpec6-pcie.txt
> > new file mode 100644
> > index 000..fdac2a2
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/pci/axis,artpec6-pcie.txt
> > @@ -0,0 +1,45 @@
> > +* Axis ARTPEC-6 PCIe interface
> > +
> > +This PCIe host controller is based on the Synopsis Designware PCIe IP
> > +and thus inherits all the common properties defined in designware-pcie.txt.
> > +
> > +Required properties:
> > +- compatible: "axis,artpec6-pcie", "snps,dw-pcie"
> > +- reg: base addresses and lengths of the pcie controller (DBI),
> > +   the phy controller, and configuration address space.
> > +- reg-names: Must include the following entries:
> > +   - "dbi"
> > +   - "phy"
> > +   - "config"
> > +- interrupts: A list of interrupt outputs of the controller. Must contain 
> > an
> > +  entry for each entry in the interrupt-names property.
> > +- interrupt-names: Must include the following entries:
> > +   - "msi": The interrupt that is asserted when an MSI is received
> > +- syscon: Should contain a link to the syscon device node.
> 
> What is the syscon for? Perhaps a name that reflects the purpose.

It's the SoC System Controller, and holds some chip-specific registers
for the Synopsys IP control, clocks and some termination variables spring
to mind. It was named sysctrl earlier, although that's not very much more
descriptive.

> Rob

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


Re: [PATCH] cris: migrate exception table users off module.h and onto extable.h

2017-01-25 Thread Jesper Nilsson
On Tue, Jan 24, 2017 at 12:31:49PM -0500, Paul Gortmaker wrote:
> This file was only including module.h for exception table related
> functions.  We've now separated that content out into its own file
> "extable.h" so now move over to that and avoid all the extra header
> content in module.h that we don't really need to compile this file.
> 
> Reported-by: kbuild test robot <l...@intel.com>
> Cc: Mikael Starvik <star...@axis.com>

Acked-by: Jesper Nilsson <jesper.nils...@axis.com>

> Cc: linux-cris-ker...@axis.com
> Signed-off-by: Paul Gortmaker <paul.gortma...@windriver.com>
> ---
> 
> [This is to be added to the other 20 patches of this for-merge series:
>  https://lkml.kernel.org/r/20170122163244.11740-1-paul.gortma...@windriver.com
>  I didn't want to resend all 20 again just for the addition of a one liner.]

Not a problem, looks good.

>  arch/cris/arch-v32/kernel/traps.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/cris/arch-v32/kernel/traps.c 
> b/arch/cris/arch-v32/kernel/traps.c
> index d79666aefd71..ad6174e217c9 100644
> --- a/arch/cris/arch-v32/kernel/traps.c
> +++ b/arch/cris/arch-v32/kernel/traps.c
> @@ -3,7 +3,7 @@
>   */
>  
>  #include 
> -#include 
> +#include 
>  #include 
>  #include 
>  #include 
> -- 
> 2.11.0

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


Re: [PATCH 5/6] cris: remove unused wp_works_ok macro

2017-02-13 Thread Jesper Nilsson
On Sun, Feb 12, 2017 at 10:12:11PM +0100, Mathias Krause wrote:
> It had no use since it's introduction in v2.4.1.2. Get rid of it.

Agreed.

Acked-by: Jesper Nilsson <jesper.nils...@axis.com>

> Cc: Mikael Starvik <star...@axis.com>
> Signed-off-by: Mathias Krause <mini...@googlemail.com>
> ---
>  arch/cris/include/arch-v10/arch/processor.h |3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/arch/cris/include/arch-v10/arch/processor.h 
> b/arch/cris/include/arch-v10/arch/processor.h
> index 93feb2a487d8..58f75bee1d6c 100644
> --- a/arch/cris/include/arch-v10/arch/processor.h
> +++ b/arch/cris/include/arch-v10/arch/processor.h
> @@ -7,9 +7,6 @@
>   */
>  #define current_text_addr() ({void *pc; __asm__ ("move.d $pc,%0" : "=rm" 
> (pc)); pc; })
>  
> -/* CRIS has no problems with write protection */
> -#define wp_works_ok 1
> -
>  /* CRIS thread_struct. this really has nothing to do with the processor 
> itself, since
>   * CRIS does not do any hardware task-switching, but it's here for legacy 
> reasons.
>   * The thread_struct here is used when task-switching using _resume defined 
> in entry.S.
> -- 
> 1.7.10.4

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


[PATCH] DMA: nbpfaxi: check for errors from dma_map_single

2016-10-05 Thread Jesper Nilsson
Check for error return from dma_map_single.
Move the addition of the node to the list to after we check
for error, so we can reuse the list in unmapping.

Found by enabling CONFIG_DMA_API_DEBUG.

Signed-off-by: Jesper Nilsson <jesper.nils...@axis.com>
---
 drivers/dma/nbpfaxi.c | 15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/nbpfaxi.c b/drivers/dma/nbpfaxi.c
index 42ac2ff..4f5dd2e 100644
--- a/drivers/dma/nbpfaxi.c
+++ b/drivers/dma/nbpfaxi.c
@@ -731,10 +731,15 @@ static int __nbpf_desc_page_alloc(struct nbpf_channel 
*chan, gfp_t gfp)
 i < ARRAY_SIZE(dpage->ldesc);
 i++, ldesc++, hwdesc++) {
ldesc->hwdesc = hwdesc;
-   list_add_tail(>node, );
ldesc->hwdesc_dma_addr = dma_map_single(dchan->device->dev,
hwdesc, sizeof(*hwdesc), DMA_TO_DEVICE);
 
+   if (dma_mapping_error(dchan->device->dev,
+ ldesc->hwdesc_dma_addr)) {
+   goto unmap_err;
+   }
+   list_add_tail(>node, );
+
dev_dbg(dev, "%s(): mapped 0x%p to %pad\n", __func__,
hwdesc, >hwdesc_dma_addr);
}
@@ -754,6 +759,14 @@ static int __nbpf_desc_page_alloc(struct nbpf_channel 
*chan, gfp_t gfp)
list_add(>node, >desc_page);
 
return ARRAY_SIZE(dpage->desc);
+unmap_err:
+   list_for_each_entry(ldesc, , node) {
+   dma_unmap_single(dchan->device->dev,
+ldesc->hwdesc_dma_addr,
+sizeof(*ldesc->hwdesc),
+DMA_TO_DEVICE);
+   }
+   return -ENOMEM;
 }
 
 static void __nbpf_desc_put(struct nbpf_desc *desc)
-- 
2.1.4


/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


[GIT PULL]: CRIS changes for 4.9

2016-10-08 Thread Jesper Nilsson
Hi Linus,

Please pull for cris changes for 4.9.

The following changes since commit 7d1e042314619115153a0f6f06e4552c09a50e13:

  Merge tag 'usercopy-v4.8-rc8' of 
git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux (2016-09-20 17:11:19 
-0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris.git 
tags/cris-for-4.9

for you to fetch changes up to 2dc024e94578c53e2c579a48725c8fe2527f9d5e:

  cris: return of class_create should be considered (2016-09-23 16:06:00 +0200)


CRIS changes for 4.9


Andrea Gelmini (7):
  Fix typo
  Fix typo
  Fix typo
  Fix typo
  Fix typo
  Fix typo
  Fix typo

Dan Carpenter (1):
  CRIS v32: remove some double unlocks

Fabian Frederick (1):
  CRIS: defconfig: remove MTDRAM_ABS_POS

Jesper Nilsson (1):
  cris: intmem: fix device_initcall compile warning

Niklas Cassel (8):
  cris: intmem: fix pointer comparison compile warning
  cris: fasttimer: fix mixed declarations and code compile warning
  cris: irq: stop loop from accessing array out of bounds
  cris: add dev88_defconfig
  cris: cardbus: fix header include path
  cris: fix Kconfig mismatch when building with CONFIG_PCI
  cris: use generic io.h
  cris: v10: axisflashmap: remove unused ifdefs

Paul Gortmaker (1):
  cris: migrate exception table users off module.h and onto extable.h

yizhouz...@ict.ac.cn (1):
  cris: return of class_create should be considered

 arch/cris/Kconfig |   2 +-
 arch/cris/arch-v10/drivers/axisflashmap.c |  19 ---
 arch/cris/arch-v10/drivers/eeprom.c   |   2 +-
 arch/cris/arch-v10/lib/dram_init.S|   2 +-
 arch/cris/arch-v32/drivers/cryptocop.c|   2 +-
 arch/cris/arch-v32/drivers/pci/bios.c |   2 +-
 arch/cris/arch-v32/drivers/sync_serial.c  |   6 +
 arch/cris/arch-v32/kernel/fasttimer.c |  15 +-
 arch/cris/arch-v32/kernel/irq.c   |   3 +-
 arch/cris/arch-v32/mach-a3/dma.c  |   1 -
 arch/cris/arch-v32/mach-a3/dram_init.S|   2 +-
 arch/cris/arch-v32/mach-fs/dma.c  |   1 -
 arch/cris/arch-v32/mach-fs/dram_init.S|   2 +-
 arch/cris/arch-v32/mm/intmem.c|  13 +-
 arch/cris/configs/artpec_3_defconfig  |   1 -
 arch/cris/configs/dev88_defconfig |  48 ++
 arch/cris/configs/etrax-100lx_v2_defconfig|   1 -
 arch/cris/configs/etraxfs_defconfig   |   1 -
 arch/cris/include/arch-v32/arch/cryptocop.h   |   2 +-
 arch/cris/include/asm/io.h| 171 +-
 arch/cris/include/uapi/arch-v10/arch/sv_addr_ag.h |   2 +-
 arch/cris/mm/fault.c  |   2 +-
 22 files changed, 83 insertions(+), 217 deletions(-)
 create mode 100644 arch/cris/configs/dev88_defconfig

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


Re: arch/cris/arch-v32/mm/intmem.c:148:17: error: initialization from incompatible pointer type

2016-09-23 Thread Jesper Nilsson
Hi,

There should be some fixes in linux-next today for this.

/Jesper

On Thu, Sep 22, 2016 at 09:15:38PM +0800, kbuild test robot wrote:
> Hi Daniel,
> 
> FYI, the error/warning still remains.
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
> master
> head:   7d1e042314619115153a0f6f06e4552c09a50e13
> commit: ea8daa7b97842aab8507b5b5b1e3226cf2d514a6 kbuild: Add option to turn 
> incompatible pointer check into error
> date:   6 months ago
> config: cris-etraxfs_defconfig (attached as .config)
> compiler: cris-linux-gcc (GCC) 6.2.0
> reproduce:
> wget 
> https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
>  -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout ea8daa7b97842aab8507b5b5b1e3226cf2d514a6
> # save the attached .config to linux build tree
> make.cross ARCH=cris 
> 
> All errors (new ones prefixed by >>):
> 
>arch/cris/arch-v32/mm/intmem.c: In function 'crisv32_intmem_free':
>arch/cris/arch-v32/mm/intmem.c:116:14: warning: comparison of distinct 
> pointer types lacks a cast
>if ((prev != _allocations) &&
>  ^~
>arch/cris/arch-v32/mm/intmem.c:123:14: warning: comparison of distinct 
> pointer types lacks a cast
>if ((next != _allocations) &&
>  ^~
>In file included from include/linux/printk.h:5:0,
> from include/linux/kernel.h:13,
> from include/linux/list.h:8,
> from arch/cris/arch-v32/mm/intmem.c:7:
>arch/cris/arch-v32/mm/intmem.c: At top level:
> >> arch/cris/arch-v32/mm/intmem.c:148:17: error: initialization from 
> >> incompatible pointer type [-Werror=incompatible-pointer-types]
> device_initcall(crisv32_intmem_init);
> ^
>include/linux/init.h:184:58: note: in definition of macro 
> '__define_initcall'
>  __attribute__((__section__(".initcall" #id ".init"))) = fn; \
>  ^~
>arch/cris/arch-v32/mm/intmem.c:148:1: note: in expansion of macro 
> 'device_initcall'
> device_initcall(crisv32_intmem_init);
> ^~~
>cc1: some warnings being treated as errors
> 
> vim +148 arch/cris/arch-v32/mm/intmem.c
> 
> 108ecfbc Jesper Nilsson 2008-01-25  117   
> (prev->status == STATUS_FREE)) {
> 51533b61 Mikael Starvik 2005-07-27  118   
> prev->size += allocation->size;
> 51533b61 Mikael Starvik 2005-07-27  119   
> list_del(>entry);
> 51533b61 Mikael Starvik 2005-07-27  120   
> kfree(allocation);
> 51533b61 Mikael Starvik 2005-07-27  121   
> allocation = prev;
> 51533b61 Mikael Starvik 2005-07-27  122   }
> 108ecfbc Jesper Nilsson 2008-01-25 @123   if ((next != 
> _allocations) &&
> 108ecfbc Jesper Nilsson 2008-01-25  124   
> (next->status == STATUS_FREE)) {
> 51533b61 Mikael Starvik 2005-07-27  125   
> allocation->size += next->size;
> 51533b61 Mikael Starvik 2005-07-27  126   
> list_del(>entry);
> 51533b61 Mikael Starvik 2005-07-27  127   
> kfree(next);
> 51533b61 Mikael Starvik 2005-07-27  128   }
> 51533b61 Mikael Starvik 2005-07-27  129   
> preempt_enable();
> 51533b61 Mikael Starvik 2005-07-27  130   return;
> 51533b61 Mikael Starvik 2005-07-27  131   }
> 51533b61 Mikael Starvik 2005-07-27  132   }
> 51533b61 Mikael Starvik 2005-07-27  133   preempt_enable();
> 51533b61 Mikael Starvik 2005-07-27  134  }
> 51533b61 Mikael Starvik 2005-07-27  135  
> 51533b61 Mikael Starvik 2005-07-27  136  void* 
> crisv32_intmem_phys_to_virt(unsigned long addr)
> 51533b61 Mikael Starvik 2005-07-27  137  {
> 108ecfbc Jesper Nilsson 2008-01-25  138   return (void *)(addr - 
> (MEM_INTMEM_START + RESERVED_SIZE) +
> 51533b61 Mikael Starvik 2005-07-27  139   (unsigned 
> long)intmem_virtual);
> 51533b61 Mikael Starvik 2005-07-27  140  }
> 51533b61 Mikael Starvik 2005-07-27  141  
> 51533b61 Mikael Starvik 2005-07-27  142  unsigned long 
> crisv32_intmem_virt_to_phys(void* addr)
> 51533b61 Mikael Starvik 2005-07-27  143  {
> 51533b61 Mikael Starvik 2005-07-27  144   return (unsigned 
> long)((unsigned long )addr -
> 108ecfbc Jesper Nilsson 2008-01-2

Re: [PATCH] cris: migrate exception table users off module.h and onto extable.h

2016-09-23 Thread Jesper Nilsson
On Mon, Sep 19, 2016 at 05:56:54PM -0400, Paul Gortmaker wrote:
> This file was only including module.h for exception table related
> functions.  We've now separated that content out into its own file
> "extable.h" so now move over to that and avoid all the extra header
> content in module.h that we don't really need to compile this file.

Thanks, added to cris for-next.

> Cc: Mikael Starvik <star...@axis.com>
> Cc: Jesper Nilsson <jesper.nils...@axis.com>
> Cc: linux-cris-ker...@axis.com
> Signed-off-by: Paul Gortmaker <paul.gortma...@windriver.com>

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


Re: [PATCH] cris: Only build flash rescue image if CONFIG_ETRAX_AXISFLASHMAP is selected

2016-11-07 Thread Jesper Nilsson
On Sun, Oct 30, 2016 at 09:09:18AM -0700, Guenter Roeck wrote:
> If CONFIG_ETRAX_AXISFLASHMAP is not configured, the flash rescue image
> object file is empty. With recent versions of binutils, this results
> in the following build error.
> 
> cris-linux-objcopy: error:
>   the input file 'arch/cris/boot/rescue/rescue.o' has no sections
> 
> This is seen, for example, when trying to build cris:allnoconfig
> with recently generated toolchains.
> 
> Since it does not make sense to build a flash rescue image if there is
> no flash, only build it if CONFIG_ETRAX_AXISFLASHMAP is enabled.

Agreed, added to cris tree for 4.10.

> Reported-by: kbuild test robot <fengguang...@intel.com>
> Fixes: 66ab3a74c5ce ("CRIS: Merge machine dependent boot/compressed ..")
> Signed-off-by: Guenter Roeck <li...@roeck-us.net>

Thanks!

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


Re: [PATCH 3/3] serial: crisv10: fix invalid user-pointer check

2016-11-08 Thread Jesper Nilsson
On Tue, Nov 08, 2016 at 01:24:55PM +0100, Johan Hovold wrote:
> Drop invalid user-pointer check from TIOCGSERIAL handler.
> 
> A NULL-pointer can be valid in user space and copy_to_user() takes care
> of sanity checking.
> 
> Cc: Mikael Starvik <star...@axis.com>

Acked-by: Jesper Nilsson <jesper.nils...@axis.com>

> Cc: linux-cris-ker...@axis.com
> Signed-off-by: Johan Hovold <jo...@kernel.org>

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


[GIT PULL]: ARM ARTPEC changes for 4.10

2016-11-10 Thread Jesper Nilsson
Hi!

Please pull the below signed tag for a trio of minor changes
adding PCIe for the ARM ARTPEC SoC.

Thanks!

/Jesper

The following changes since commit bc33b0ca11e3df46a4fa7639ba488c9d4911:

  Linux 4.9-rc4 (2016-11-05 16:23:36 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/jesper/artpec.git 
tags/artpec-for-4.10

for you to fetch changes up to fa5541fc806771a108cd2a48245a229f1ba539ea:

  ARM: dts: artpec: add pcie support (2016-11-10 15:51:10 +0100)


ARTPEC changes for 4.10


Niklas Cassel (3):
  ARM: ARTPEC-6: add select MFD_SYSCON to MACH_ARTPEC6
  ARM: ARTPEC-6: add pcie related options
  ARM: dts: artpec: add pcie support

 arch/arm/boot/dts/artpec6-devboard.dts |  4 
 arch/arm/boot/dts/artpec6.dtsi | 29 -
 arch/arm/mach-artpec/Kconfig   |  3 +++
 3 files changed, 35 insertions(+), 1 deletion(-)

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


Re: [PATCH 1/2] mm: add locked parameter to get_user_pages()

2016-11-07 Thread Jesper Nilsson
On Mon, Oct 31, 2016 at 10:02:27AM +, Lorenzo Stoakes wrote:
> This patch adds an int *locked parameter to get_user_pages() to allow
> VM_FAULT_RETRY faulting behaviour similar to get_user_pages_[un]locked().
> 
> It additionally clears the way for get_user_pages_locked() to be removed as 
> its
> sole remaining useful characteristic was to allow for VM_FAULT_RETRY behaviour
> when faulting in pages.
> 
> It should not introduce any functional changes, however it does allow for
> subsequent changes to get_user_pages() callers to take advantage of
> VM_FAULT_RETRY.

For the cris-part:
Acked-by: Jesper Nilsson <jesper.nils...@axis.com>

> Signed-off-by: Lorenzo Stoakes <lstoa...@gmail.com>

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


Re: [PATCH] tty: serial: make crisv10 explicitly non-modular

2016-11-07 Thread Jesper Nilsson
On Mon, Oct 31, 2016 at 01:42:16PM -0400, Paul Gortmaker wrote:
> The Kconfig currently controlling compilation of this code is:
> 
> arch/cris/arch-v10/drivers/Kconfig:config ETRAX_SERIAL
> arch/cris/arch-v10/drivers/Kconfig: bool "Serial-port support"
> 
> ...meaning that it currently is not being built as a module by anyone.
> 
> Lets remove the couple traces of modular infrastructure use, so that
> when reading the driver there is no doubt it is builtin-only.
> 
> Since module_init translates to device_initcall in the non-modular
> case, the init ordering remains unchanged with this commit.

Agreed, put in the cris tree for 4.10.

> We don't replace module.h with init.h since the file already has that.
> 
> Cc: Mikael Starvik <star...@axis.com>
> Cc: Jesper Nilsson <jesper.nils...@axis.com>
> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org>
> Cc: Jiri Slaby <jsl...@suse.com>
> Cc: linux-cris-ker...@axis.com
> Cc: linux-ser...@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortma...@windriver.com>

Thanks!

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


Re: [PATCH 10/10] mm: replace access_process_vm() write parameter with gup_flags

2016-10-17 Thread Jesper Nilsson
On Thu, Oct 13, 2016 at 01:20:20AM +0100, Lorenzo Stoakes wrote:
> This patch removes the write parameter from access_process_vm() and replaces 
> it
> with a gup_flags parameter as use of this function previously _implied_
> FOLL_FORCE, whereas after this patch callers explicitly pass this flag.
> 
> We make this explicit as use of FOLL_FORCE can result in surprising behaviour
> (and hence bugs) within the mm subsystem.
> 
> Signed-off-by: Lorenzo Stoakes <lstoa...@gmail.com>
> ---
>  arch/cris/arch-v32/kernel/ptrace.c |  4 ++--

For the CRIS part:

Acked-by: Jesper Nilsson <jesper.nils...@axis.com>

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


Re: [PATCH 06/10] mm: replace get_user_pages() write/force parameters with gup_flags

2016-10-17 Thread Jesper Nilsson
On Thu, Oct 13, 2016 at 01:20:16AM +0100, Lorenzo Stoakes wrote:
> This patch removes the write and force parameters from get_user_pages() and
> replaces them with a gup_flags parameter to make the use of FOLL_FORCE 
> explicit
> in callers as use of this flag can result in surprising behaviour (and hence
> bugs) within the mm subsystem.
> 
> Signed-off-by: Lorenzo Stoakes <lstoa...@gmail.com>
> ---
>  arch/cris/arch-v32/drivers/cryptocop.c |  4 +---

For the CRIS part:

Acked-by: Jesper Nilsson <jesper.nils...@axis.com>

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


Re: [GIT PULL]: ARM ARTPEC changes for 4.10

2016-11-28 Thread Jesper Nilsson
On Mon, Nov 28, 2016 at 01:57:10PM +0100, Arnd Bergmann wrote:
> On Monday, November 28, 2016 1:33:31 PM CET Jesper Nilsson wrote:
> > > Hi Jesper and Niklas,
> > > 
> > > I just found the old pull request while going through my mail backlog.
> > > 
> > > A few things for you to remember for next time:
> > > 
> > > - please send pull requests "To: a...@kernel.org" so we know they
> > >   are destined for arm-soc
> > 
> > Ok, should we add that in the MAINTAINERS file so we can
> > get it automatically from get_maintainer?
> 
> No, we don't want to get every single patch that people submit to
> platform maintainers, only the consolidated pull requests that you
> send.

Right, sounds reasonable, will do.

>   Arnd

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


Re: [GIT PULL]: ARM ARTPEC changes for 4.10

2016-11-28 Thread Jesper Nilsson
On Sat, Nov 26, 2016 at 12:16:20AM +0100, Arnd Bergmann wrote:
> On Thursday, November 10, 2016 4:09:31 PM CET Jesper Nilsson wrote:
> > Please pull the below signed tag for a trio of minor changes
> > adding PCIe for the ARM ARTPEC SoC.
> > 
> > Thanks!
> > 
> > /Jesper
> > 
> > The following changes since commit bc33b0ca11e3df46a4fa7639ba488c9d4911:
> > 
> >   Linux 4.9-rc4 (2016-11-05 16:23:36 -0700)
> > 
> > are available in the git repository at:
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/jesper/artpec.git 
> > tags/artpec-for-4.10
> > 
> > for you to fetch changes up to fa5541fc806771a108cd2a48245a229f1ba539ea:
> > 
> >   ARM: dts: artpec: add pcie support (2016-11-10 15:51:10 +0100)
> > 
> > 
> > ARTPEC changes for 4.10
> > 
> > 
> > Niklas Cassel (3):
> >   ARM: ARTPEC-6: add select MFD_SYSCON to MACH_ARTPEC6
> >   ARM: ARTPEC-6: add pcie related options
> >   ARM: dts: artpec: add pcie support
> > 
> > 
> 
> Hi Jesper and Niklas,
> 
> I just found the old pull request while going through my mail backlog.
> 
> A few things for you to remember for next time:
> 
> - please send pull requests "To: a...@kernel.org" so we know they
>   are destined for arm-soc

Ok, should we add that in the MAINTAINERS file so we can
get it automatically from get_maintainer?

> - please split up changes to the platform code from dts changes,
>   defconfig changes and driver changes. Each of them gets sent
>   to Linus in a separate arm-soc branch, so we have to pull them
>   in separately too
> 
> - For the signed tag, please put in a cleartext description of
>   the branch, just like you describe each commit in its changelog
>   text. The tag comment becomes the merge commit text.

Ok, will do both in the future.

> - I've looked at the three patches individually and cherry-picked
>   the first into next/soc and the third into next/dt. The patch
>   "ARM: ARTPEC-6: add pcie related options" is no longer needed
>   after commit e13688f ("ARM: select PCI_DOMAINS config from
>   ARCH_MULTIPLATFORM"), so I dropped that.

Thanks!

>   Arnd

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


[GIT PULL] CRIS changes for 4.10

2016-12-12 Thread Jesper Nilsson
Hi Linus,

Please pull below for a trio of small cleanup patches.

Thanks!

The following changes since commit bc33b0ca11e3df46a4fa7639ba488c9d4911:

  Linux 4.9-rc4 (2016-11-05 16:23:36 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris.git 
tags/cris-for-4.10

for you to fetch changes up to 8f50f2a1b46a11a9a9fb46c5d8325dfc88281a76:

  cris: No need to append -O2 and $(LINUXINCLUDE) (2016-12-08 10:56:40 +0100)


Three patches for minor issues:

Guenter Roeck (1):
  cris: Only build flash rescue image if CONFIG_ETRAX_AXISFLASHMAP is 
selected

Paul Bolle (1):
  cris: No need to append -O2 and $(LINUXINCLUDE)

Paul Gortmaker (1):
  tty: serial: make crisv10 explicitly non-modular

 arch/cris/boot/compressed/Makefile |3 ---
 arch/cris/boot/rescue/Makefile |9 +++--
 drivers/tty/serial/crisv10.c   |6 ++
 3 files changed, 9 insertions(+), 9 deletions(-)


Guenter Roeck (1):
  cris: Only build flash rescue image if CONFIG_ETRAX_AXISFLASHMAP is 
selected

Paul Bolle (1):
  cris: No need to append -O2 and $(LINUXINCLUDE)

Paul Gortmaker (1):
  tty: serial: make crisv10 explicitly non-modular

 arch/cris/boot/compressed/Makefile |3 ---
 arch/cris/boot/rescue/Makefile |9 +++--
 drivers/tty/serial/crisv10.c   |6 ++
 3 files changed, 9 insertions(+), 9 deletions(-)

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


Re: [PATCH v2 0/7] uapi: export all headers under uapi directories

2017-01-11 Thread Jesper Nilsson
On Mon, Jan 09, 2017 at 12:33:58PM +0100, Arnd Bergmann wrote:
> On Friday, January 6, 2017 10:43:52 AM CET Nicolas Dichtel wrote:
> > Here is the v2 of this series. The first 5 patches are just cleanup: some
> > exported headers were still under a non-uapi directory.
> 
> Since this is meant as a cleanup, I commented on this to point out a cleaner
> way to do the same.
> 
> > The patch 6 was spotted by code review: there is no in-tree user of this
> > functionality.
> > The last patch remove the use of header-y. Now all files under an uapi
> > directory are exported.
> 
> Very nice!
> 
> > asm is a bit special, most of architectures export 
> > asm//include/uapi/asm
> > only, but there is two exceptions:
> >  - cris which exports arch/cris/include/uapi/arch-v[10|32];
> 
> This is interesting, though not your problem. Maybe someone who understands
> cris better can comment on this: How is the decision made about which of
> the arch/user.h headers gets used? I couldn't find that in the sources,
> but it appears to be based on kernel compile-time settings, which is
> wrong for user space header files that should be independent of the kernel
> config.

I believe it's since the CRISv10 and CRISv32 are very different beasts,
and that is selected via kernel config...

This part of the CRIS port has been transformed a couple of times from
the original layout without uapi, and there's still some legacy silliness,
where some files might have been exported but never used from userspace
except for some corner cases.

> >  - tile which exports arch/tile/include/uapi/arch.
> > Because I don't know if the output of 'make headers_install_all' can be 
> > changed,
> > I introduce subdir-y in Kbuild file. The headers_install_all target copies 
> > all
> > asm//include/uapi/asm to usr/include/asm- but
> > arch/cris/include/uapi/arch-v[10|32] and arch/tile/include/uapi/arch are not
> > prefixed (they are put asis in usr/include/). If it's acceptable to modify 
> > the
> > output of 'make headers_install_all' to export asm headers in
> > usr/include/asm-/asm, then I could remove this new subdir-y and 
> > exports
> > everything under arch//include/uapi/.
> 
> I don't know if anyone still uses "make headers_install_all", I suspect
> distros these days all use "make headers_install", so it probably
> doesn't matter much.
> 
> In case of cris, it should be easy enough to move all the contents of the
> uapi/arch-*/*.h headers into the respective uapi/asm/*.h headers, they
> only seem to be referenced from there.

This would seem to be a reasonable change.

> For tile, I suspect that would not work as the arch/*.h headers are
> apparently defined as interfaces for both user space and kernel.
> 
> > Note also that exported files for asm are a mix of files listed by:
> >  - include/uapi/asm-generic/Kbuild.asm;
> >  - arch/x86/include/uapi/asm/Kbuild;
> >  - arch/x86/include/asm/Kbuild.
> > This complicates a lot the processing (arch/x86/include/asm/Kbuild is also
> > used by scripts/Makefile.asm-generic).
> > 
> > This series has been tested with a 'make headers_install' on x86 and a
> > 'make headers_install_all'. I've checked the result of both commands.
> > 
> > This patch is built against linus tree. I don't know if it should be
> > made against antoher tree.
> 
> The series should probably get merged through the kbuild tree, but testing
> it on mainline is fine here.
> 
>   Arnd

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


[PATCH] net: phy: dp83848: Support ethernet pause frames

2016-12-02 Thread Jesper Nilsson
According to the documentation, the PHYs supported by this driver
can also support pause frames. Announce this to be so.
Tested with a TI83822I.

Signed-off-by: Jesper Nilsson <jesper.nils...@axis.com>
---
 drivers/net/phy/dp83848.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/phy/dp83848.c b/drivers/net/phy/dp83848.c
index 800b39f..6e4117f 100644
--- a/drivers/net/phy/dp83848.c
+++ b/drivers/net/phy/dp83848.c
@@ -88,7 +88,8 @@ MODULE_DEVICE_TABLE(mdio, dp83848_tbl);
.phy_id = _id,  \
.phy_id_mask= 0xfff0,   \
.name   = _name,\
-   .features   = PHY_BASIC_FEATURES,   \
+   .features   = (PHY_BASIC_FEATURES | \
+   SUPPORTED_Pause | SUPPORTED_Asym_Pause),\
.flags  = PHY_HAS_INTERRUPT,\
\
.soft_reset = genphy_soft_reset,\
-- 
2.1.4


/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


Re: [PATCH] net: phy: dp83848: Support ethernet pause frames

2016-12-02 Thread Jesper Nilsson
On Fri, Dec 02, 2016 at 08:35:23AM -0600, Andrew F. Davis wrote:
> On 12/02/2016 08:22 AM, Jesper Nilsson wrote:
> > According to the documentation, the PHYs supported by this driver
> > can also support pause frames. Announce this to be so.
> > Tested with a TI83822I.
> > 
> 
> Looks like all PHYs supported by this driver do, so:
> 
> Acked-by: Andrew F. Davis <a...@ti.com>
> 
> > Signed-off-by: Jesper Nilsson <jesper.nils...@axis.com>
> > ---
> >  drivers/net/phy/dp83848.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/net/phy/dp83848.c b/drivers/net/phy/dp83848.c
> > index 800b39f..6e4117f 100644
> > --- a/drivers/net/phy/dp83848.c
> > +++ b/drivers/net/phy/dp83848.c
> > @@ -88,7 +88,8 @@ MODULE_DEVICE_TABLE(mdio, dp83848_tbl);
> > .phy_id = _id,  \
> > .phy_id_mask= 0xfff0,   \
> > .name   = _name,\
> > -   .features   = PHY_BASIC_FEATURES,   \
> > +   .features   = (PHY_BASIC_FEATURES | \
> > +   SUPPORTED_Pause | SUPPORTED_Asym_Pause),\
> 
> Aligning these may look nicer though.

Agreed, will send a v2.

> > .flags  = PHY_HAS_INTERRUPT,        \
> >         \
> > .soft_reset = genphy_soft_reset,\
> > 

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


[PATCH v2] net: phy: dp83848: Support ethernet pause frames

2016-12-02 Thread Jesper Nilsson
According to the documentation, the PHYs supported by this driver
can also support pause frames. Announce this to be so.
Tested with a TI83822I.

Acked-by: Andrew F. Davis <a...@ti.com>
Signed-off-by: Jesper Nilsson <jesper.nils...@axis.com>
---
 drivers/net/phy/dp83848.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/phy/dp83848.c b/drivers/net/phy/dp83848.c
index 800b39f..320d0dc 100644
--- a/drivers/net/phy/dp83848.c
+++ b/drivers/net/phy/dp83848.c
@@ -88,7 +88,9 @@ MODULE_DEVICE_TABLE(mdio, dp83848_tbl);
.phy_id = _id,  \
.phy_id_mask= 0xfff0,   \
.name   = _name,\
-   .features   = PHY_BASIC_FEATURES,   \
+   .features   = (PHY_BASIC_FEATURES | \
+  SUPPORTED_Pause |\
+  SUPPORTED_Asym_Pause),   \
.flags  = PHY_HAS_INTERRUPT,\
\
.soft_reset = genphy_soft_reset,\
-- 
2.1.4


/^JN - Jesper Nilsson
-- 
       Jesper Nilsson -- jesper.nils...@axis.com


Re: [PATCH 11/17] cris: Use generic pci_mmap_resource_range()

2017-03-22 Thread Jesper Nilsson
On Wed, Mar 22, 2017 at 01:25:25PM +, David Woodhouse wrote:
> From: David Woodhouse <d...@amazon.co.uk>

Acked-by: Jesper Nilsson <jesper.nils...@axis.com>

> Signed-off-by: David Woodhouse <d...@amazon.co.uk>
> ---
>  arch/cris/arch-v32/drivers/pci/bios.c | 23 ---
>  arch/cris/include/asm/pci.h   |  1 +
>  2 files changed, 1 insertion(+), 23 deletions(-)
> 
> diff --git a/arch/cris/arch-v32/drivers/pci/bios.c 
> b/arch/cris/arch-v32/drivers/pci/bios.c
> index a589686d..394c2a73 100644
> --- a/arch/cris/arch-v32/drivers/pci/bios.c
> +++ b/arch/cris/arch-v32/drivers/pci/bios.c
> @@ -14,29 +14,6 @@ void pcibios_set_master(struct pci_dev *dev)
>   pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
>  }
>  
> -int pci_mmap_page_range(struct pci_dev *dev, int bar,
> - struct vm_area_struct *vma,
> - enum pci_mmap_state mmap_state, int write_combine)
> -{
> - unsigned long prot;
> -
> - /* Leave vm_pgoff as-is, the PCI space address is the physical
> -  * address on this platform.
> -  */
> - prot = pgprot_val(vma->vm_page_prot);
> - vma->vm_page_prot = __pgprot(prot);
> -
> - /* Write-combine setting is ignored, it is changed via the mtrr
> -  * interfaces on this platform.
> -  */
> - if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
> -  vma->vm_end - vma->vm_start,
> -  vma->vm_page_prot))
> - return -EAGAIN;
> -
> - return 0;
> -}
> -
>  resource_size_t
>  pcibios_align_resource(void *data, const struct resource *res,
>  resource_size_t size, resource_size_t align)
> diff --git a/arch/cris/include/asm/pci.h b/arch/cris/include/asm/pci.h
> index 65198cb..6e50533 100644
> --- a/arch/cris/include/asm/pci.h
> +++ b/arch/cris/include/asm/pci.h
> @@ -42,6 +42,7 @@ struct pci_dev;
>  #define PCI_DMA_BUS_IS_PHYS  (1)
>  
>  #define HAVE_PCI_MMAP
> +#define ARCH_GENERIC_PCI_MMAP_RESOURCE
>  
>  #endif /* __KERNEL__ */
>  
> -- 
> 2.9.3

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com


[PATCH 2/3] pinctrl: Add pincontrol driver for ARTPEC-6 SoC

2017-03-30 Thread Jesper Nilsson
Add pinctrl driver support for the Axis ARTPEC-6 SoC.
There are only some pins that actually have different
functions available, but all can control bias (pull-up/-down)
and drive strength.
Code originally written by Chris Paterson.

Signed-off-by: Jesper Nilsson <jesper.nils...@axis.com>
---
 MAINTAINERS   |1 +
 drivers/pinctrl/Kconfig   |   11 +
 drivers/pinctrl/Makefile  |1 +
 drivers/pinctrl/pinctrl-artpec6.c | 1279 +
 drivers/pinctrl/pinctrl-artpec6.h |  151 +
 5 files changed, 1443 insertions(+)
 create mode 100644 drivers/pinctrl/pinctrl-artpec6.c
 create mode 100644 drivers/pinctrl/pinctrl-artpec6.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 7563bd6..d2b2449 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1088,6 +1088,7 @@ L:linux-arm-ker...@axis.com
 F: arch/arm/mach-artpec
 F: arch/arm/boot/dts/artpec6*
 F: drivers/clk/axis
+F: drivers/pinctrl/pinctrl-artpec*
 F: Documentation/devicetree/bindings/pinctrl/axis,artpec6-pinctrl.txt
 
 ARM/ASPEED MACHINE SUPPORT
diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index 8f8c2af..37af5e3 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -41,6 +41,17 @@ config PINCTRL_ADI2
  future processors. This option is selected automatically when specific
  machine and arch are selected to build.
 
+config PINCTRL_ARTPEC6
+bool "Axis ARTPEC-6 pin controller driver"
+depends on MACH_ARTPEC6
+select PINMUX
+select GENERIC_PINCONF
+help
+  This is the driver for the Axis ARTPEC-6 pin controller. This driver
+  supports pin function multiplexing as well as pin bias and drive
+  strength configuration. Device tree integration instructions can be
+  found in 
Documentation/devicetree/bindings/pinctrl/axis,artpec6-pinctrl.txt
+
 config PINCTRL_AS3722
tristate "Pinctrl and GPIO driver for ams AS3722 PMIC"
depends on MFD_AS3722 && GPIOLIB
diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
index a251f43..193dbba 100644
--- a/drivers/pinctrl/Makefile
+++ b/drivers/pinctrl/Makefile
@@ -8,6 +8,7 @@ obj-$(CONFIG_PINCONF)   += pinconf.o
 obj-$(CONFIG_OF)   += devicetree.o
 obj-$(CONFIG_GENERIC_PINCONF)  += pinconf-generic.o
 obj-$(CONFIG_PINCTRL_ADI2) += pinctrl-adi2.o
+obj-$(CONFIG_PINCTRL_ARTPEC6)   += pinctrl-artpec6.o
 obj-$(CONFIG_PINCTRL_AS3722)   += pinctrl-as3722.o
 obj-$(CONFIG_PINCTRL_BF54x)+= pinctrl-adi2-bf54x.o
 obj-$(CONFIG_PINCTRL_BF60x)+= pinctrl-adi2-bf60x.o
diff --git a/drivers/pinctrl/pinctrl-artpec6.c 
b/drivers/pinctrl/pinctrl-artpec6.c
new file mode 100644
index 000..ff80c8a
--- /dev/null
+++ b/drivers/pinctrl/pinctrl-artpec6.c
@@ -0,0 +1,1279 @@
+/*
+ * Driver for the Axis ARTPEC-6 pin controller
+ *
+ * Author: Chris Paterson <chris.pater...@linux.pieboy.co.uk>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "core.h"
+#include "pinconf.h"
+#include "pinctrl-utils.h"
+#include "pinctrl-artpec6.h"
+
+struct artpec6_pmx {
+   struct device  *dev;
+   struct pinctrl_dev *pctl;
+   void __iomem   *base;
+   struct pinctrl_pin_desc *pins;
+   unsigned int   num_pins;
+   struct artpec6_pin_group *pin_groups;
+   unsigned int   num_pin_groups;
+   struct artpec6_pmx_func *functions;
+   unsigned int   num_functions;
+};
+
+struct artpec6_pin_group {
+   const char *name;
+   const unsigned int *pins;
+   const unsigned int num_pins;
+   const unsigned int *reg_offsets;
+   const unsigned int num_regs;
+   unsigned char  config;
+};
+
+struct artpec6_pmx_func {
+   const char *name;
+   const char * const *groups;
+   const unsigned int num_groups;
+};
+
+/* pins */
+static struct pinctrl_pin_desc artpec6_pins[] = {
+   PINCTRL_PIN(0, "GPIO0"),
+   PINCTRL_PIN(1, "GPIO1"),
+   PINCTRL_PIN(2, "GPIO2"),
+   PINCTRL_PIN(3, "GPIO3"),
+   PINCTRL_PIN(4, "GPIO4"),
+   PINCTRL_PIN(5, "GPIO5"),
+   PINCTRL_PIN(6, "GPIO6"),
+   PINCTRL_PIN(7, "GPIO7"),
+   PINCTRL_PIN(8, "GPIO8"),
+   PINCTRL_PIN(9, "GPIO9"),
+   PINCTRL_PIN(10, "GPIO10"),
+   PINCTRL_PIN(11, "GPIO11"),
+   PINCTRL_PIN(12, "GPIO12"),
+   PINCTRL_PIN(13, "GPIO13"),
+   PIN

<    1   2   3   4   5   6   7   >