[PATCH v2 2/2] Documentation: dt-bindings: pci: altera: Add altr,pcie-root-port-2.0

2018-12-31 Thread Ley Foon Tan
Add support for altr,pcie-root-port-2.0. Signed-off-by: Ley Foon Tan --- .../devicetree/bindings/pci/altera-pcie.txt|4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/Documentation/devicetree/bindings/pci/altera-pcie.txt b/Documentation/devicetree/bindings/pci

Re: [PATCH v2 0/2] Add Stratix10 PCIe Root Port support

2019-01-01 Thread Ley Foon Tan
On Mon, 2018-12-31 at 10:15 -0600, Bjorn Helgaas wrote: > On Mon, Dec 31, 2018 at 04:24:51PM +0800, Ley Foon Tan wrote: > > > > Add PCIe Root Port support for Stratix10 device and also update > "Stratix10" is a big step better than "StratixXX" because a web &

Re: [PATCH v2 1/2] pci: altera: Add Stratix10 PCIe support

2019-01-01 Thread Ley Foon Tan
;   2a7275a3d867 PCI: altera: Fix TLP_CFG_DW0 for TLP write > > One of these is not like the others. Okay, will change it. > > On Mon, Dec 31, 2018 at 04:24:52PM +0800, Ley Foon Tan wrote: > ... > > > > +struct altera_pcie_data { > > + int (*tlp_read_pkt)(struc

[PATCH v3 0/2] Add Stratix 10 PCIe Root Port support

2019-01-01 Thread Ley Foon Tan
ers to NULL/zero. - Rename *_funcs to *_data. - Update comment and fix coding style warning from checkpatch.pl. - Rename StratixXX to stratix10. History: [v1]: https://lkml.org/lkml/2018/12/26/68 [v2]: https://lkml.org/lkml/2018/12/31/46 Ley Foon Tan (2): PCI: altera: Add Stratix 10 PCIe s

[PATCH v3 1/2] PCI: altera: Add Stratix 10 PCIe support

2019-01-01 Thread Ley Foon Tan
Add PCIe Root Port support for Stratix 10 device. Main differences: - HIP interface to access Root Port configuration register. - TLP programming flow: - One REG0 register - Don't need to check alignment Signed-off-by: Ley Foon Tan --- drivers/pci/controller/Kconfig |

[PATCH v3 2/2] dt-bindings: PCI: altera: Add altr,pcie-root-port-2.0

2019-01-01 Thread Ley Foon Tan
Add support for altr,pcie-root-port-2.0. Signed-off-by: Ley Foon Tan --- .../devicetree/bindings/pci/altera-pcie.txt|4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/Documentation/devicetree/bindings/pci/altera-pcie.txt b/Documentation/devicetree/bindings/pci

[PATCH 1/2] pci: altera: Add StratixXX PCIe support

2018-12-26 Thread Ley Foon Tan
Add PCIe rootport support for StratixXX device. Main differences: - HIP interface - TLP programming flow Signed-off-by: Ley Foon Tan --- drivers/pci/controller/Kconfig |2 +- drivers/pci/controller/pcie-altera.c | 228 +++--- 2 files changed, 209

[PATCH 2/2] Documentation: dt-bindings: pci: altera: Add altr,pcie-root-port-2.0

2018-12-26 Thread Ley Foon Tan
Add support for altr,pcie-root-port-2.0. Signed-off-by: Ley Foon Tan --- .../devicetree/bindings/pci/altera-pcie.txt|4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) mode change 100644 => 100755 Documentation/devicetree/bindings/pci/altera-pcie.txt diff --gi

[PATCH 0/2] Add StratixXX PCIe Rootport support

2018-12-26 Thread Ley Foon Tan
Add PCIe rootport support for StratixXX device family and also update device tree binding documentation. Ley Foon Tan (2): pci: altera: Add StratixXX PCIe support Documentation: dt-bindings: pci: altera: Add altr,pcie-root-port-2.0 .../devicetree/bindings/pci/altera-pcie.txt|4

Re: [PATCH 1/2] pci: altera: Add StratixXX PCIe support

2018-12-30 Thread Ley Foon Tan
On Fri, 2018-12-28 at 21:12 -0600, Bjorn Helgaas wrote: > Run "git log --oneline drivers/pci/controller" and make your subject > line > match in style, phrasing, and capitalization. > > On Thu, Dec 27, 2018 at 01:09:45AM +0800, Ley Foon Tan wrote: > > > > Ad

[GIT PULL] arch/nios2 for v3.19-rc1

2014-12-09 Thread Ley Foon Tan
handling of irq_of_parse_and_map Ley Foon Tan (33): asm-generic: add generic futex for !CONFIG_SMP nios2: Assembly macros and definitions nios2: Kernel booting and initialization nios2: Exception handling nios2: Traps exception handling nios2: Memory management

[GIT PULL] arch/nios2 for v3.19

2014-12-09 Thread Ley Foon Tan
handling of irq_of_parse_and_map Ley Foon Tan (33): asm-generic: add generic futex for !CONFIG_SMP nios2: Assembly macros and definitions nios2: Kernel booting and initialization nios2: Exception handling nios2: Traps exception handling nios2: Memory management

Re: [PATCH v2] mailbox: Add Altera mailbox driver

2015-01-06 Thread Ley Foon Tan
On Mon, Dec 22, 2014 at 5:44 PM, Ley Foon Tan wrote: > The Altera mailbox allows for interprocessor communication. It supports > only one channel and work as either sender or receiver. > > Signed-off-by: Ley Foon Tan > > --- > v2: > Resolved comment from Dinh and Su

Re: [PATCH 26/38] nios2: drop _PAGE_FILE and pte_file()-related helpers

2014-12-25 Thread Ley Foon Tan
On Thu, Dec 25, 2014 at 8:30 PM, Tobias Klauser wrote: > On 2014-12-24 at 13:22:34 +0100, Kirill A. Shutemov > wrote: >> We've replaced remap_file_pages(2) implementation with emulation. >> Nobody creates non-linear mapping anymore. >> >> Signed-off-by: Kiri

Re: [PATCH] nios2: Use preempt_schedule_irq

2014-12-30 Thread Ley Foon Tan
;: > arch/nios2/kernel/entry.S:374: undefined reference to `PREEMPT_ACTIVE' > > Cc: Thomas Gleixner > Signed-off-by: Tobias Klauser > --- Acked-by: Ley Foon Tan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord.

[GIT PULL] arch/nios2 fixes for 3.19-rc3

2014-12-30 Thread Ley Foon Tan
Hi Linus, There are 2 arch/nios2 fixes for 3.19. Please consider pulling. Happy new year. Regards Ley Foon The following changes since commit b7392d2247cfe6771f95d256374f1a8e6a6f48d6: Linux 3.19-rc2 (2014-12-28 16:49:37 -0800) are available in the git repository at: git://git.rocketboar

[GIT PULL] arch/nios2 update for 4.1-rc1

2015-04-24 Thread Ley Foon Tan
Ley Foon Tan (3): nios2: remove end address checking for initda nios2: rework trap handler nios2: rework cache arch/nios2/include/asm/Kbuild| 1 - arch/nios2/include/asm/shmparam.h| 21 +++ arch/nios2/include/uapi/asm/ptrace.h | 2 + arch/nios2/kernel

Re: [PATCH v5 1/3] PCI: altera: Add Stratix 10 PCIe support

2019-02-27 Thread Ley Foon Tan
On Wed, 2019-02-27 at 17:38 +, Lorenzo Pieralisi wrote: > On Tue, Feb 26, 2019 at 05:15:46PM +0800, Ley Foon Tan wrote: > > > > Add PCIe Root Port support for Stratix 10 device. > > > > Main differences compare with PCIe Root Port IP on Cyclone V > > and

[PATCH v6 1/3] PCI: altera: Add Stratix 10 PCIe support

2019-02-27 Thread Ley Foon Tan
: Ley Foon Tan --- drivers/pci/controller/pcie-altera.c | 264 --- 1 file changed, 240 insertions(+), 24 deletions(-) diff --git a/drivers/pci/controller/pcie-altera.c b/drivers/pci/controller/pcie-altera.c index 7d05e51205b3..c57fd7f4e848 100644 --- a/drivers/pci/controller

[PATCH v6 0/3] Add Stratix 10 PCIe Root Port support

2019-02-27 Thread Ley Foon Tan
2019/1/2/16 [v4]: https://lkml.org/lkml/2019/2/14/58 [v5]: https://lkml.org/lkml/2019/2/26/200 Ley Foon Tan (3): PCI: altera: Add Stratix 10 PCIe support PCI: altera: Enable driver on ARM64 dt-bindings: PCI: altera: Add altr,pcie-root-port-2.0 .../devicetree/bindings/pci/altera-pcie.txt | 4

[PATCH v6 3/3] dt-bindings: PCI: altera: Add altr,pcie-root-port-2.0

2019-02-27 Thread Ley Foon Tan
Add support for altr,pcie-root-port-2.0. Signed-off-by: Ley Foon Tan Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/pci/altera-pcie.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/pci/altera-pcie.txt b/Documentation

[PATCH v6 2/3] PCI: altera: Enable driver on ARM64

2019-02-27 Thread Ley Foon Tan
Enable PCIE_ALTERA on ARM64 platform. Signed-off-by: Ley Foon Tan --- drivers/pci/controller/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig index 6671946dbf66..6012f3059acd 100644 --- a/drivers/pci

Re: [PATCH v6 1/3] PCI: altera: Add Stratix 10 PCIe support

2019-02-28 Thread Ley Foon Tan
On Thu, 2019-02-28 at 10:56 +, Lorenzo Pieralisi wrote: > On Thu, Feb 28, 2019 at 06:52:50PM +0800, Ley Foon Tan wrote: > > [...] > > > > > +static int s10_tlp_read_packet(struct altera_pcie *pcie, u32 > > *value) > > +{ > > + int i; > > +

Re: [PATCH 10/14] nios2: define syscall_get_arch()

2019-02-28 Thread Ley Foon Tan
o extend the generic > ptrace API with PTRACE_GET_SYSCALL_INFO request. > > Acked-by: Paul Moore > Cc: Elvira Khabirova > Cc: Eugene Syromyatnikov > Cc: Ley Foon Tan > Cc: Oleg Nesterov > Cc: Andy Lutomirski > Cc: nios2-...@lists.rocketboards.org > Cc: linux-

[PATCH] PCI: altera-msi: Allow building as module

2019-04-23 Thread Ley Foon Tan
Altera MSI IP is a soft IP and is only available after FPGA image is programmed. Make driver modulable to support use case FPGA image is programmed after kernel is booted. User proram FPGA image in kernel then only load MSI driver module. Signed-off-by: Ley Foon Tan --- drivers/pci/controller

[PATCH] PCI: altera: Allow building as module

2019-04-23 Thread Ley Foon Tan
Altera PCIe Rootport IP is a soft IP and is only available after FPGA image is programmed. Make driver modulable to support use case FPGA image is programmed after kernel is booted. User proram FPGA image in kernel then only load PCIe driver module. Signed-off-by: Ley Foon Tan --- drivers/pci

Re: [PATCH v4 1/3] PCI: altera: Add Stratix 10 PCIe support

2019-02-25 Thread Ley Foon Tan
On Mon, Feb 25, 2019 at 5:35 PM Ley Foon Tan wrote: > > On Tue, 2019-02-19 at 16:23 +, Lorenzo Pieralisi wrote: > > On Thu, Feb 14, 2019 at 11:20:36PM +0800, Ley Foon Tan wrote: > > > > > > Add PCIe Root Port support for Stratix 10 device. > > > >

[PATCH v5 0/3] Add Stratix 10 PCIe Root Port support

2019-02-26 Thread Ley Foon Tan
StratixXX to stratix10. History: [v1]: https://lkml.org/lkml/2018/12/26/68 [v2]: https://lkml.org/lkml/2018/12/31/46 [v3]: https://lkml.org/lkml/2019/1/2/16 [v4]: https://lkml.org/lkml/2019/2/14/58 Ley Foon Tan (3): PCI: altera: Add Stratix 10 PCIe support PCI: altera: Enable driver o

[PATCH v5 1/3] PCI: altera: Add Stratix 10 PCIe support

2019-02-26 Thread Ley Foon Tan
: Ley Foon Tan --- drivers/pci/controller/pcie-altera.c | 266 --- 1 file changed, 242 insertions(+), 24 deletions(-) diff --git a/drivers/pci/controller/pcie-altera.c b/drivers/pci/controller/pcie-altera.c index 7d05e51205b3..b3c05f2f309b 100644 --- a/drivers/pci/controller

[PATCH v5 3/3] dt-bindings: PCI: altera: Add altr,pcie-root-port-2.0

2019-02-26 Thread Ley Foon Tan
Add support for altr,pcie-root-port-2.0. Signed-off-by: Ley Foon Tan Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/pci/altera-pcie.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/pci/altera-pcie.txt b/Documentation

[PATCH v5 2/3] PCI: altera: Enable driver on ARM64

2019-02-26 Thread Ley Foon Tan
Enable PCIE_ALTERA on ARM64 platform. Signed-off-by: Ley Foon Tan --- drivers/pci/controller/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig index 6671946dbf66..6012f3059acd 100644 --- a/drivers/pci

Re: [PATCH v2 20/29] nios2: Cpuinfo handling

2014-07-17 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 5:47 PM, Arnd Bergmann wrote: > On Tuesday 15 July 2014 16:45:47 Ley Foon Tan wrote: >> +static void *cpuinfo_start(struct seq_file *m, loff_t *pos) >> +{ >> + unsigned long i = *pos; >> + >> + return i < num_possi

Re: [PATCH v2 21/29] nios2: Futex operations

2014-07-17 Thread Ley Foon Tan
On Thu, Jul 17, 2014 at 7:07 PM, Arnd Bergmann wrote: > The get_user/put_user functions really need to be annotated might_fault(), > because that's what they do. > > The whole point of get_user() is to access an unchecked user space > pointer, which can do a number of things based on what the poi

Re: [PATCH v2 12/29] nios2: Interrupt handling

2014-07-17 Thread Ley Foon Tan
On Thu, Jul 17, 2014 at 9:58 PM, Thomas Gleixner wrote: > On Thu, 17 Jul 2014, Ley Foon Tan wrote: > >> On Tue, Jul 15, 2014 at 5:51 PM, Thomas Gleixner wrote: >> > On Tue, 15 Jul 2014, Ley Foon Tan wrote: >> >> +static void chip_unmask(struct irq_data

Re: [PATCH v2 21/29] nios2: Futex operations

2014-07-20 Thread Ley Foon Tan
On Fri, Jul 18, 2014 at 5:55 PM, Arnd Bergmann wrote: > On Friday 18 July 2014 11:42:34 Thomas Gleixner wrote: >> On Fri, 18 Jul 2014, Arnd Bergmann wrote: >> > On Friday 18 July 2014 14:07:42 Ley Foon Tan wrote: >> > > On Thu, Jul 17, 2014 at 7:07 PM, Arnd

Re: [PATCH v2 19/29] nios2: Time keeping

2014-07-21 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 5:45 PM, Arnd Bergmann wrote: > On Tuesday 15 July 2014 16:45:46 Ley Foon Tan wrote: >> + >> +static inline void __delay(unsigned long loops) >> +{ >> + int dummy; >> + >> + __asm__ __volatile__( >> +

Re: [PATCH v2 21/29] nios2: Futex operations

2014-07-21 Thread Ley Foon Tan
On Mon, Jul 21, 2014 at 4:01 PM, Arnd Bergmann wrote: >> >> Okay, I will copy m68k implementation to asm-generic/futex.h. >> Do you prefer this as separate patch submission or this can be part of >> nios2 patchset? > > I think it's better for everybody if you include it in your nios2 > patchset,

Re: [PATCH v2 19/29] nios2: Time keeping

2014-07-21 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 6:00 PM, Thomas Gleixner wrote: >> + count = >> + readw(timer_membase + ALTERA_TIMER_SNAPH_REG) << 16 | >> + readw(timer_membase + ALTERA_TIMER_SNAPL_REG); > > So you're serious about having a new architecture with a timer > implementation which

Re: [PATCH v2 19/29] nios2: Time keeping

2014-07-21 Thread Ley Foon Tan
On Mon, Jul 21, 2014 at 6:51 PM, Arnd Bergmann wrote: > On Monday 21 July 2014 18:07:02 Ley Foon Tan wrote: >> > >> >> +#ifndef _ASM_NIOS2_TIMEX_H >> >> +#define _ASM_NIOS2_TIMEX_H >> >> + >> >> +/* Supply dummy tick-rate. Real value wi

Re: [PATCH v2 15/29] nios2: System calls handling

2014-07-21 Thread Ley Foon Tan
On Fri, Jul 18, 2014 at 8:56 PM, James Hogan wrote: > Hi, > > On 15/07/14 09:45, Ley Foon Tan wrote: >> This patch adds support for system calls from userspaces. It uses the >> asm-generic/unistd.h definitions with architecture spcific syscall. The >> sys_call_table

Re: [PATCH 04/28] nios2: Exception handling

2014-04-22 Thread Ley Foon Tan
On Tue, Apr 22, 2014 at 8:33 PM, Arnd Bergmann wrote: > On Friday 18 April 2014, Ley Foon Tan wrote: >> +static const struct file_operations misalign_fops = { >> + .open = proc_misaligned_open, >> + .read = seq_read, >> +

Re: [PATCH 20/28] nios2: Time keeping

2014-04-22 Thread Ley Foon Tan
On Tue, Apr 22, 2014 at 9:44 PM, Arnd Bergmann wrote: > On Friday 18 April 2014, Ley Foon Tan wrote: >> +static inline unsigned long read_timersnapshot(void) >> +{ >> + unsigned long count; >> + >> + outw(0, timer_membase + ALTERA_T

Re: [PATCH 19/28] nios2: Device tree support

2014-04-22 Thread Ley Foon Tan
On Tue, Apr 22, 2014 at 9:42 PM, Arnd Bergmann wrote: > On Friday 18 April 2014, Ley Foon Tan wrote: >> diff --git a/arch/nios2/boot/dts/3c120_devboard.dts >> b/arch/nios2/boot/dts/3c120_devboard.dts >> +/dts-v1/; >> + >> +/ { >> + model = "ALTR,q

Re: [PATCH 23/28] nios2: Nios2 registers

2014-04-23 Thread Ley Foon Tan
Hi Tobias On Tue, Apr 22, 2014 at 8:39 PM, Tobias Klauser wrote: > On 2014-04-18 at 14:27:06 +0200, Ley Foon Tan wrote: >> + >> +/* estatus register bits */ >> +#define ESTATUS_EPIE (1 << 0)/* processor interrupt enable */ >> +#define ESTATUS_

Re: [PATCH 28/28] Documentation: Add documentation for Nios2 architecture

2014-04-23 Thread Ley Foon Tan
On Tue, Apr 22, 2014 at 8:28 PM, Tobias Klauser wrote: >> +What is Nios II? >> + >> +Nios II is a 32-bit embedded-processor architecture designed specifically >> for the >> +Altera family of FPGAs. In order to support Linux system, Nios II needs to >> configure > > Minor nit: 'I

Re: [PATCH 19/28] nios2: Device tree support

2014-04-23 Thread Ley Foon Tan
On Wed, Apr 23, 2014 at 3:35 PM, Arnd Bergmann wrote: >> > for Altera. >> Yes, the vendor prefix should be changed to lower case. FYI, this dts >> file is generated by our dts generator tool called sopc2dts. >> Our tool already aware of this requirement, but haven't support this yet. >> I can edi

Re: [PATCH 05/28] nios2: Traps exception handling

2014-04-23 Thread Ley Foon Tan
On Tue, Apr 22, 2014 at 10:28 PM, Ezequiel Garcia wrote: > Hello Ley Foon, > > On Apr 19, Ley Foon Tan wrote: >> + >> +#ifndef CONFIG_ALIGNMENT_TRAP >> +/* Alignment exception handler */ >> +asmlinkage void handle_unaligned_c(struct pt_regs *fp, int cause)

Re: [PATCH 07/28] nios2: I/O Mapping

2014-04-23 Thread Ley Foon Tan
On Tue, Apr 22, 2014 at 9:59 PM, Arnd Bergmann wrote: > On Friday 18 April 2014, Ley Foon Tan wrote: > >> + >> +#include >> + >> +#define IO_SPACE_LIMIT 0x > > Please use 0x here, this should work for almost any PCI bus. Ah, CONFIG_PCI

Re: [PATCH 04/28] nios2: Exception handling

2014-04-23 Thread Ley Foon Tan
On Wed, Apr 23, 2014 at 8:23 PM, Arnd Bergmann wrote: >> >> We really shouldn't be doing new architecture specific procfs files >> >> any more. I suggest you drop this one for now, and add back the >> >> functionality using perf or ftrace at a later point. >> > >> > Okay, will remove this. >> >>

Re: [PATCH 08/28] nios2: MMU Fault handling

2014-04-23 Thread Ley Foon Tan
On Tue, Apr 22, 2014 at 10:30 PM, Ezequiel Garcia wrote: > Hello Ley Foon, > > On Apr 18, Ley Foon Tan wrote: >> + >> +bad_area_nosemaphore: >> + /* User mode accesses just cause a SIGSEGV */ >> + if (user_mode(regs)) { > > I found that it's u

Re: [PATCH 17/28] nios2: Signal handling support

2014-04-24 Thread Ley Foon Tan
On Sun, Apr 20, 2014 at 3:29 AM, Richard Weinberger wrote: >> + >> + /* Default to using normal stack. */ >> + usp = regs->sp; >> + >> + /* This is the X/Open sanctioned signal stack switching. */ >> + if ((ka->sa.sa_flags & SA_ONSTACK) && (current->sas_ss_sp != 0)) { >>

Re: [PATCH 17/28] nios2: Signal handling support

2014-04-24 Thread Ley Foon Tan
On Thu, Apr 24, 2014 at 6:01 PM, Ley Foon Tan wrote: > On Sun, Apr 20, 2014 at 3:29 AM, Richard Weinberger > wrote: > >>> + >>> + /* Default to using normal stack. */ >>> + usp = regs->sp; >>> + >>> + /* This is the X/O

Re: [PATCH 17/28] nios2: Signal handling support

2014-04-24 Thread Ley Foon Tan
On Thu, Apr 24, 2014 at 6:17 PM, Richard Weinberger wrote: >>> Okay. >>> >> I just noticed that sigsp() have struct ksignal argument. We can use >> sigsp() for nios2 because it doesn't have struct ksignal. >> >> unsigned long sigsp(unsigned long sp, struct ksignal *ksig); > > Did you at look at t

Re: [PATCH 17/28] nios2: Signal handling support

2014-04-24 Thread Ley Foon Tan
On Thu, Apr 24, 2014 at 6:39 PM, Richard Weinberger wrote: > Am 24.04.2014 12:29, schrieb Ley Foon Tan: >> On Thu, Apr 24, 2014 at 6:17 PM, Richard Weinberger wrote: >> >>>>> Okay. >>>>> >>>> I just noticed that sigsp() have struct ksign

Re: [PATCH 07/28] nios2: I/O Mapping

2014-04-24 Thread Ley Foon Tan
On Thu, Apr 24, 2014 at 3:43 PM, Arnd Bergmann wrote: > On Thursday 24 April 2014 14:02:47 Ley Foon Tan wrote: >> >> +#define IO_SPACE_LIMIT 0x >> > >> > Please use 0x here, this should work for almost any PCI bus. >> Ah, CONFIG_PCI is not enab

Re: [PATCH 08/28] nios2: MMU Fault handling

2014-04-24 Thread Ley Foon Tan
On Thu, Apr 24, 2014 at 11:22 PM, Ezequiel Garcia wrote: >> > I found that it's useful to add some printing here, just as ARM >> > does. I carry this patch on my kernel: >> > >> > + printk(KERN_INFO "%s: unhandled page fault (%d) at >> > 0x%08lx, cause %ld\n", >> > +

Re: [PATCH 16/28] nios2: System calls handling

2014-04-24 Thread Ley Foon Tan
On Tue, Apr 22, 2014 at 8:30 PM, Arnd Bergmann wrote: > On Friday 18 April 2014, Ley Foon Tan wrote: > >> + >> + #define sys_mmap2 sys_mmap_pgoff >> + > > You use sys_mmap_pgoff here, but > >> +asmlinkage long sys_mmap(unsigned long addr, unsigned long len,

Re: [PATCH v2 13/29] nios2: DMA mapping API

2014-07-29 Thread Ley Foon Tan
On Thu, Jul 24, 2014 at 8:05 PM, Arnd Bergmann wrote: >> I have spent some times look at other architectures and below is what >> I found. Please correct me if I am wrong, especially >> for_device():DMA_FROM_DEVICE. >> >> _for_cpu(): >> case DMA_BIDIRECTIONAL: >> case DMA_FROM_DEVICE: >> /* i

Re: [PATCH v2 05/29] nios2: Memory management

2014-07-29 Thread Ley Foon Tan
On Mon, Jul 28, 2014 at 10:59 PM, Geert Uytterhoeven wrote: > On Tue, Jul 15, 2014 at 10:45 AM, Ley Foon Tan wrote: >> --- /dev/null >> +++ b/arch/nios2/include/asm/mmu.h >> @@ -0,0 +1,18 @@ >> +/* >> + * Copyright (C) 2010 Tobias Klauser >> + * Cop

Re: [PATCH v2 05/29] nios2: Memory management

2014-07-30 Thread Ley Foon Tan
On Wed, Jul 30, 2014 at 5:01 PM, Tobias Klauser wrote: > On 2014-07-15 at 10:45:32 +0200, Ley Foon Tan wrote: >> This patch contains the initialisation of the memory blocks, MMU >> attributes and the memory map. >> >> Signed-off-by: Ley Foon Tan >> --- >>

Re: [PATCH v2 05/29] nios2: Memory management

2014-07-30 Thread Ley Foon Tan
On Wed, Jul 30, 2014 at 4:57 PM, Tobias Klauser wrote: >> >> Any chance you can use mmu.h from asm-generic instead? >> >> It uses a struct with a single "unsigned long end_brk" member (unless >> >> CONFIG_BINFMT_ELF_FDPIC is defined). >> > From asm-generic/mmu.h, it is for nommu implementations.

Re: [PATCH v2 02/29] nios2: Kernel booting and initialization

2014-07-30 Thread Ley Foon Tan
On Wed, Jul 30, 2014 at 5:12 PM, Tobias Klauser wrote: >> +/* >> + * Stack layout in 'ret_from_exception': >> + * >> + * This allows access to the syscall arguments in registers r4-r8 >> + * >> + *0(sp) - r8 >> + *4(sp) - r9 >> + *8(sp) - r10 >> + *C(sp) - r11 >> + * 10(sp) - r12

Re: [PATCH v3 26/29] nios2: ptrace support

2014-09-17 Thread Ley Foon Tan
On Tue, Sep 16, 2014 at 5:43 PM, Tobias Klauser wrote: > > This could be simplified to: > > long arch_ptrace(struct task_struct *child, long request, unsigned long addr, > unsigned long data) > { > return ptrace_request(child, request, addr, data); > } Okay, will change th

Re: [PATCH v3 01/29] asm-generic: add generic futex for !CONFIG_SMP

2014-09-24 Thread Ley Foon Tan
On Tue, Sep 23, 2014 at 6:40 PM, Arnd Bergmann wrote: > On Tuesday 23 September 2014 18:20:08 LF.Tan wrote: >> Hi Arnd >> >> Are you okay with this generic futex in asm-generic? >> > > Yes, this looks good. Remind me again who need this, would it make > sense to merge this through an architecture-

Re: [PATCH v3 01/29] asm-generic: add generic futex for !CONFIG_SMP

2014-09-24 Thread Ley Foon Tan
On Wed, Sep 24, 2014 at 5:47 AM, Thomas Gleixner wrote: > On Tue, 23 Sep 2014, LF.Tan wrote: >> On Mon, Sep 8, 2014 at 5:22 PM, Ley Foon Tan wrote: >> > Follow m68k futex implementation for !CONFIG_SMP. > > Great. Follow arch/random implementation blindly and c

Re: [PATCH v3 01/29] asm-generic: add generic futex for !CONFIG_SMP

2014-09-24 Thread Ley Foon Tan
On Wed, Sep 24, 2014 at 6:40 PM, Arnd Bergmann wrote: > On Wednesday 24 September 2014 18:18:50 Ley Foon Tan wrote: >> On Tue, Sep 23, 2014 at 6:40 PM, Arnd Bergmann wrote: >> > On Tuesday 23 September 2014 18:20:08 LF.Tan wrote: >> >> Hi Arnd >> >> >

Re: [PATCH v3 01/29] asm-generic: add generic futex for !CONFIG_SMP

2014-09-25 Thread Ley Foon Tan
On Wed, Sep 24, 2014 at 7:10 PM, Arnd Bergmann wrote: > Please add my 'Acked-by: Arnd Bergmann ' to this patch > once Thomas is ok with it. I think we had concluded already that it > was correct when we talked about it last time, but he doesn't seem > convinced yet so I want to wait for his reply

Re: [PATCH v3 01/29] asm-generic: add generic futex for !CONFIG_SMP

2014-09-25 Thread Ley Foon Tan
On Thu, Sep 25, 2014 at 6:54 PM, Arnd Bergmann wrote: > On Thursday 25 September 2014 16:33:33 Ley Foon Tan wrote: >> There are 4 patches that touching code outside of arch/nios2, >> including this patch. >> Do we have maintainers for common files for patch #15, #27 and #28

Re: [PATCH v3 28/29] Documentation: Add documentation for Nios2 architecture

2014-09-25 Thread Ley Foon Tan
On Mon, Sep 8, 2014 at 5:22 PM, Ley Foon Tan wrote: > Signed-off-by: Ley Foon Tan > --- > Documentation/nios2/README | 23 +++ > 1 file changed, 23 insertions(+) > create mode 100644 Documentation/nios2/README > > diff --git a/Documentation/nios2/R

Re: [PATCH v3 01/29] asm-generic: add generic futex for !CONFIG_SMP

2014-09-26 Thread Ley Foon Tan
On Fri, Sep 26, 2014 at 2:41 PM, Geert Uytterhoeven wrote: > On Fri, Sep 26, 2014 at 4:22 AM, Ley Foon Tan wrote: >>> Randy Dunlap is the maintainer listed for >>> Documentation, and I see you already have linux-...@vger.kernel.org >>> on Cc here. Please make su

Re: [PATCH v3 28/29] Documentation: Add documentation for Nios2 architecture

2014-09-26 Thread Ley Foon Tan
On Fri, Sep 26, 2014 at 10:27 AM, Ley Foon Tan wrote: > On Mon, Sep 8, 2014 at 5:22 PM, Ley Foon Tan wrote: >> Signed-off-by: Ley Foon Tan >> --- >> Documentation/nios2/README | 23 +++ >> 1 file changed, 23 insertions(+) >> create mode

Re: [PATCH 14/28] nios2: DMA mapping API

2014-04-25 Thread Ley Foon Tan
On Tue, Apr 22, 2014 at 9:52 PM, Arnd Bergmann wrote: > On Friday 18 April 2014, Ley Foon Tan wrote: > >> +static inline int dma_supported(struct device *dev, u64 mask) >> +{ >> + /* we fall back to GFP_DMA when the mask isn't all 1s, >> + * so we can&#

Re: [PATCH 14/28] nios2: DMA mapping API

2014-04-25 Thread Ley Foon Tan
On Fri, Apr 25, 2014 at 6:33 PM, Arnd Bergmann wrote: > On Friday 25 April 2014 18:13:31 Ley Foon Tan wrote: >> Actually, nios2 doesn't have DMA master with 0x00ff mask. I will >> change it to return 1, same as some other architectures >> implementation. >> An

Re: [PATCH 25/28] nios2: ptrace support

2014-04-27 Thread Ley Foon Tan
On Sat, Apr 26, 2014 at 7:52 AM, Pedro Alves wrote: > Does this support PTRACE_GETREGSET / PTRACE_SETREGSET ? > > IMO, the kernel shouldn't accept ports without those anymore. > > And IMHO, we shouldn't even allow new ports having PTRACE_GETREGS. > > http://sourceware.org/ml/archer/2010-q3/msg0019

Re: [PATCH 07/28] nios2: I/O Mapping

2014-05-02 Thread Ley Foon Tan
On Thu, Apr 24, 2014 at 2:02 PM, Ley Foon Tan wrote: > On Tue, Apr 22, 2014 at 9:59 PM, Arnd Bergmann wrote: >> On Friday 18 April 2014, Ley Foon Tan wrote: >> >>> + >>> +#include >>> + >>> +#define IO_SPACE_LIMIT 0x >> >>

[PATCH 00/25] Change time_t and clock_t to 64 bit

2014-05-13 Thread Ley Foon Tan
tested on ARM. These patches are also available on this branch: git://git.rocketboards.org/linux-socfpga-next.git 64bit_time [1] https://lkml.org/lkml/2012/11/14/358 [2] https://lkml.org/lkml/2014/4/18/216 Ley Foon Tan (25): asm-generic: Change time_t and clock_t to 64 bit arc: Add 32 bit time_t

[PATCH 01/25] asm-generic: Change time_t and clock_t to 64 bit

2014-05-13 Thread Ley Foon Tan
Use 64 bit time_t and clock_t as default. 32 bit users can provide an override to define these as "long" if needed. Signed-off-by: Ley Foon Tan --- include/uapi/asm-generic/posix_types.h | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/include/uapi/a

[PATCH 03/25] arm: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/arm/include/uapi/asm/posix_types.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/include/uapi/asm/posix_types.h b/arch/arm/include/uapi/asm/posix_types.h index d2de9cb..2f8e30f

[PATCH 06/25] c6x: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/c6x/include/asm/Kbuild | 1 - arch/c6x/include/uapi/asm/Kbuild| 1 + arch/c6x/include/uapi/asm/posix_types.h | 17 + 3 files changed, 18 insertions(+), 1 deletion

[PATCH 04/25] avr32: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/avr32/include/uapi/asm/posix_types.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/avr32/include/uapi/asm/posix_types.h b/arch/avr32/include/uapi/asm/posix_types.h index 5b813a8

[PATCH 10/25] m32r: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/m32r/include/uapi/asm/posix_types.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/m32r/include/uapi/asm/posix_types.h b/arch/m32r/include/uapi/asm/posix_types.h index 236de26..77cf049

[PATCH 09/25] hexagon: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/hexagon/include/asm/Kbuild | 1 - arch/hexagon/include/uapi/asm/Kbuild| 1 + arch/hexagon/include/uapi/asm/posix_types.h | 17 + 3 files changed, 18 insertions

[PATCH 11/25] m68k: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/m68k/include/uapi/asm/posix_types.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/m68k/include/uapi/asm/posix_types.h b/arch/m68k/include/uapi/asm/posix_types.h index cf4dbf7..01e39fe

[PATCH 13/25] microblaze: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/microblaze/include/uapi/asm/posix_types.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/microblaze/include/uapi/asm/posix_types.h b/arch/microblaze/include/uapi/asm/posix_types.h

[PATCH 12/25] metag: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/metag/include/asm/Kbuild | 1 - arch/metag/include/uapi/asm/Kbuild| 1 + arch/metag/include/uapi/asm/posix_types.h | 17 + 3 files changed, 18 insertions(+), 1

[PATCH 14/25] mips: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/mips/include/uapi/asm/posix_types.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/mips/include/uapi/asm/posix_types.h b/arch/mips/include/uapi/asm/posix_types.h index fa03ec3..e9ca921

[PATCH 16/25] openrisc: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/openrisc/include/asm/Kbuild | 1 - arch/openrisc/include/uapi/asm/Kbuild| 1 + arch/openrisc/include/uapi/asm/posix_types.h | 17 + 3 files changed, 18 insertions

[PATCH 21/25] sh: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/sh/include/uapi/asm/posix_types_32.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/sh/include/uapi/asm/posix_types_32.h b/arch/sh/include/uapi/asm/posix_types_32.h index ba0bdc4

[PATCH 15/25] mn10300: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/mn10300/include/uapi/asm/posix_types.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/mn10300/include/uapi/asm/posix_types.h b/arch/mn10300/include/uapi/asm/posix_types.h index d31eeea

[PATCH 19/25] s390: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/s390/include/uapi/asm/posix_types.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/s390/include/uapi/asm/posix_types.h b/arch/s390/include/uapi/asm/posix_types.h index bf2a2ad..95729a3

[PATCH 22/25] sparc: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/sparc/include/uapi/asm/posix_types.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/sparc/include/uapi/asm/posix_types.h b/arch/sparc/include/uapi/asm/posix_types.h index 156220e

[PATCH 23/25] unicore32: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/unicore32/include/asm/Kbuild | 1 - arch/unicore32/include/uapi/asm/Kbuild| 1 + arch/unicore32/include/uapi/asm/posix_types.h | 17 + 3 files changed, 18

[PATCH 25/25] xtense: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/xtensa/include/uapi/asm/posix_types.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/xtensa/include/uapi/asm/posix_types.h b/arch/xtensa/include/uapi/asm/posix_types.h index 6e96be0

[PATCH 07/25] cris: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/cris/include/uapi/asm/posix_types.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/cris/include/uapi/asm/posix_types.h b/arch/cris/include/uapi/asm/posix_types.h index 0f22e6a..334499a

[PATCH 20/25] score: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/score/include/uapi/asm/posix_types.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/score/include/uapi/asm/posix_types.h b/arch/score/include/uapi/asm/posix_types.h index b88acf8

[PATCH 17/25] parisc: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/parisc/include/uapi/asm/posix_types.h | 8 1 file changed, 8 insertions(+) diff --git a/arch/parisc/include/uapi/asm/posix_types.h b/arch/parisc/include/uapi/asm/posix_types.h index b934425

[PATCH 08/25] frv: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/frv/include/uapi/asm/posix_types.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/frv/include/uapi/asm/posix_types.h b/arch/frv/include/uapi/asm/posix_types.h index fe512af..0a837e6

[PATCH 05/25] blackfin: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/blackfin/include/uapi/asm/posix_types.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/blackfin/include/uapi/asm/posix_types.h b/arch/blackfin/include/uapi/asm/posix_types.h index

[PATCH 02/25] arc: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/arc/include/asm/Kbuild | 1 - arch/arc/include/uapi/asm/Kbuild| 1 + arch/arc/include/uapi/asm/posix_types.h | 17 + 3 files changed, 18 insertions(+), 1 deletion

Re: [PATCH 00/25] Change time_t and clock_t to 64 bit

2014-05-13 Thread Ley Foon Tan
On Tue, May 13, 2014 at 5:10 PM, Geert Uytterhoeven wrote: > Hi, > > On Tue, May 13, 2014 at 10:57 AM, Ley Foon Tan wrote: >> This patchset change default time_t and clock_t to 64 bit in >> include/uapi/asm-generic/posix_types.h. The existing 32 bit architectures >>

<    1   2   3   4   5   6   7   >