On Wed, Sep 05, 2018 at 07:37:50PM -0500, Rob Herring wrote:
> On Wed, Sep 5, 2018 at 7:08 AM Guo Ren wrote:
> >
> > Signed-off-by: Guo Ren
> > ---
> > Documentation/devicetree/bindings/csky/cpus.txt | 70
> > +
> > 1 file cha
: 0xf020 – 0xff00 (238 MB)
Lowmem : 0x8000 – 0xc000 (1GB)
Lowmem is directly mapped by msa0 & msa1 reg, and we needn't setup
page-table for it.
Signed-off-by: Guo Ren
---
arch/csky/abiv1/inc/abi/ckmmu.h| 74
arch/csky/abiv1/inc/abi/pa
: 0xf020 – 0xff00 (238 MB)
Lowmem : 0x8000 – 0xc000 (1GB)
Lowmem is directly mapped by msa0 & msa1 reg, and we needn't setup
page-table for it.
Signed-off-by: Guo Ren
---
arch/csky/abiv1/inc/abi/ckmmu.h| 74
arch/csky/abiv1/inc/abi/pa
Signed-off-by: Guo Ren
---
arch/csky/abiv1/cacheflush.c | 50
arch/csky/abiv1/inc/abi/cacheflush.h | 41 +++
arch/csky/abiv1/inc/abi/tlb.h | 11 ++
arch/csky/abiv2/cacheflush.c | 54 +
arch/csky/abiv2/inc/abi/cacheflush.h | 38 ++
arch
Signed-off-by: Guo Ren
---
arch/csky/abiv1/cacheflush.c | 50
arch/csky/abiv1/inc/abi/cacheflush.h | 41 +++
arch/csky/abiv1/inc/abi/tlb.h | 11 ++
arch/csky/abiv2/cacheflush.c | 54 +
arch/csky/abiv2/inc/abi/cacheflush.h | 38 ++
arch
Signed-off-by: Guo Ren
---
.../interrupt-controller/csky,apb-intc.txt | 45 ++
1 file changed, 45 insertions(+)
create mode 100644
Documentation/devicetree/bindings/interrupt-controller/csky,apb-intc.txt
diff --git
a/Documentation/devicetree/bindings/interrupt
Signed-off-by: Guo Ren
---
.../interrupt-controller/csky,apb-intc.txt | 45 ++
1 file changed, 45 insertions(+)
create mode 100644
Documentation/devicetree/bindings/interrupt-controller/csky,apb-intc.txt
diff --git
a/Documentation/devicetree/bindings/interrupt
Changelog:
- Add License and Copyright
- Use timer-of framework
- Change name with upstream feedback
- Use clksource_mmio framework
Signed-off-by: Guo Ren
---
drivers/clocksource/timer-gx6605s.c | 150
1 file changed, 150 insertions(+)
create mode
Signed-off-by: Guo Ren
---
arch/csky/include/asm/irq.h | 10
arch/csky/include/asm/irqflags.h | 49
arch/csky/kernel/irq.c | 31 +
3 files changed, 90 insertions(+)
create mode 100644 arch/csky/include/asm
Signed-off-by: Guo Ren
---
arch/csky/abiv1/alignment.c | 331 +
arch/csky/abiv1/inc/abi/entry.h | 159
arch/csky/abiv2/inc/abi/entry.h | 157
arch/csky/include/asm/traps.h | 39
arch/csky/include/asm/unistd.h | 3
Signed-off-by: Guo Ren
---
arch/csky/abiv1/bswapdi.c| 18 ++
arch/csky/abiv1/bswapsi.c| 14 ++
arch/csky/abiv1/inc/abi/string.h | 13 ++
arch/csky/abiv1/memcpy.S | 344 +++
arch/csky/abiv1/memset.c | 38 +
arch/csky
Changelog:
- Add License and Copyright
- Use timer-of framework
- Change name with upstream feedback
- Use clksource_mmio framework
Signed-off-by: Guo Ren
---
drivers/clocksource/timer-gx6605s.c | 150
1 file changed, 150 insertions(+)
create mode
Signed-off-by: Guo Ren
---
arch/csky/include/asm/irq.h | 10
arch/csky/include/asm/irqflags.h | 49
arch/csky/kernel/irq.c | 31 +
3 files changed, 90 insertions(+)
create mode 100644 arch/csky/include/asm
Signed-off-by: Guo Ren
---
arch/csky/abiv1/alignment.c | 331 +
arch/csky/abiv1/inc/abi/entry.h | 159
arch/csky/abiv2/inc/abi/entry.h | 157
arch/csky/include/asm/traps.h | 39
arch/csky/include/asm/unistd.h | 3
Signed-off-by: Guo Ren
---
arch/csky/abiv1/bswapdi.c| 18 ++
arch/csky/abiv1/bswapsi.c| 14 ++
arch/csky/abiv1/inc/abi/string.h | 13 ++
arch/csky/abiv1/memcpy.S | 344 +++
arch/csky/abiv1/memset.c | 38 +
arch/csky
Signed-off-by: Guo Ren
---
arch/csky/abiv1/inc/abi/reg_ops.h | 26 +++
arch/csky/abiv1/inc/abi/regdef.h | 25 +++
arch/csky/abiv2/inc/abi/reg_ops.h | 17 ++
arch/csky/abiv2/inc/abi/regdef.h | 26 +++
arch/csky/boot/dts/qemu.dts| 77 +
arch/csky
Signed-off-by: Guo Ren
---
arch/csky/include/asm/syscall.h | 69 +
arch/csky/include/asm/syscalls.h| 14
arch/csky/include/uapi/asm/unistd.h | 10 ++
arch/csky/kernel/syscall.c | 63 +
arch/csky
Signed-off-by: Guo Ren
---
arch/csky/abiv1/inc/abi/reg_ops.h | 26 +++
arch/csky/abiv1/inc/abi/regdef.h | 25 +++
arch/csky/abiv2/inc/abi/reg_ops.h | 17 ++
arch/csky/abiv2/inc/abi/regdef.h | 26 +++
arch/csky/boot/dts/qemu.dts| 77 +
arch/csky
Signed-off-by: Guo Ren
---
arch/csky/include/asm/syscall.h | 69 +
arch/csky/include/asm/syscalls.h| 14
arch/csky/include/uapi/asm/unistd.h | 10 ++
arch/csky/kernel/syscall.c | 63 +
arch/csky
Signed-off-by: Guo Ren
---
arch/csky/include/asm/atomic.h | 215 +
arch/csky/include/asm/cmpxchg.h| 70
arch/csky/include/asm/spinlock.h | 286 +
arch/csky/include/asm/spinlock_types.h | 35
arch/csky
Signed-off-by: Guo Ren
---
arch/csky/include/asm/bug.h | 26 +++
arch/csky/include/uapi/asm/ptrace.h | 103
arch/csky/kernel/dumpstack.c| 64
arch/csky/kernel/ptrace.c | 317
4 files changed, 510 insertions
Signed-off-by: Guo Ren
---
arch/csky/include/asm/atomic.h | 215 +
arch/csky/include/asm/cmpxchg.h| 70
arch/csky/include/asm/spinlock.h | 286 +
arch/csky/include/asm/spinlock_types.h | 35
arch/csky
Signed-off-by: Guo Ren
---
arch/csky/include/asm/bug.h | 26 +++
arch/csky/include/uapi/asm/ptrace.h | 103
arch/csky/kernel/dumpstack.c| 64
arch/csky/kernel/ptrace.c | 317
4 files changed, 510 insertions
Signed-off-by: Guo Ren
---
arch/csky/include/asm/uaccess.h | 396
arch/csky/lib/usercopy.c| 271 +++
2 files changed, 667 insertions(+)
create mode 100644 arch/csky/include/asm/uaccess.h
create mode 100644 arch/csky/lib
Signed-off-by: Guo Ren
---
.../devicetree/bindings/timer/csky,mptimer.txt | 46 ++
1 file changed, 46 insertions(+)
create mode 100644 Documentation/devicetree/bindings/timer/csky,mptimer.txt
diff --git a/Documentation/devicetree/bindings/timer/csky,mptimer.txt
b
Signed-off-by: Guo Ren
---
arch/csky/include/asm/uaccess.h | 396
arch/csky/lib/usercopy.c| 271 +++
2 files changed, 667 insertions(+)
create mode 100644 arch/csky/include/asm/uaccess.h
create mode 100644 arch/csky/lib
Signed-off-by: Guo Ren
---
.../devicetree/bindings/timer/csky,mptimer.txt | 46 ++
1 file changed, 46 insertions(+)
create mode 100644 Documentation/devicetree/bindings/timer/csky,mptimer.txt
diff --git a/Documentation/devicetree/bindings/timer/csky,mptimer.txt
b
k Kconfig select.
590c7e6 csky: bugfix compile error with CONFIG_AUDIT
1989292 csky: revert some back with cleanup unistd.h
f1454fe csky: cleanup unistd.h
5d2985f csky: cleanup Kconfig and Makefile.
423d97e csky: cancel subdirectories
cae2af4 csky: use asm-generic/fcntl.h
Guo Ren (26):
csky: Build i
Signed-off-by: Guo Ren
---
arch/csky/include/asm/elf.h | 149
arch/csky/kernel/module.c | 82
2 files changed, 231 insertions(+)
create mode 100644 arch/csky/include/asm/elf.h
create mode 100644 arch/csky/kernel/module.c
Signed-off-by: Guo Ren
---
.../bindings/interrupt-controller/csky,mpintc.txt | 40 ++
1 file changed, 40 insertions(+)
create mode 100644
Documentation/devicetree/bindings/interrupt-controller/csky,mpintc.txt
diff --git
a/Documentation/devicetree/bindings/interrupt
Signed-off-by: Guo Ren
---
arch/csky/include/asm/elf.h | 149
arch/csky/kernel/module.c | 82
2 files changed, 231 insertions(+)
create mode 100644 arch/csky/include/asm/elf.h
create mode 100644 arch/csky/kernel/module.c
Signed-off-by: Guo Ren
---
.../bindings/interrupt-controller/csky,mpintc.txt | 40 ++
1 file changed, 40 insertions(+)
create mode 100644
Documentation/devicetree/bindings/interrupt-controller/csky,mpintc.txt
diff --git
a/Documentation/devicetree/bindings/interrupt
k Kconfig select.
590c7e6 csky: bugfix compile error with CONFIG_AUDIT
1989292 csky: revert some back with cleanup unistd.h
f1454fe csky: cleanup unistd.h
5d2985f csky: cleanup Kconfig and Makefile.
423d97e csky: cancel subdirectories
cae2af4 csky: use asm-generic/fcntl.h
Guo Ren (26):
csky: Build i
Signed-off-by: Guo Ren
---
.../bindings/timer/csky,gx6605s-timer.txt | 46 ++
1 file changed, 46 insertions(+)
create mode 100644
Documentation/devicetree/bindings/timer/csky,gx6605s-timer.txt
diff --git a/Documentation/devicetree/bindings/timer/csky,gx6605s
instead of leagcy.
- add set_handle_irq(), ref from openrisc & arm.
Signed-off-by: Guo Ren
---
drivers/irqchip/Makefile| 1 +
drivers/irqchip/irq-csky-apb-intc.c | 243
drivers/irqchip/irq-csky-mpintc.c | 191 +++
Signed-off-by: Guo Ren
---
drivers/clocksource/Kconfig | 15 +++
drivers/clocksource/Makefile | 2 ++
2 files changed, 17 insertions(+)
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index dec0dd8..6ff0a25 100644
--- a/drivers/clocksource/Kconfig
+++ b
Signed-off-by: Guo Ren
---
.../bindings/timer/csky,gx6605s-timer.txt | 46 ++
1 file changed, 46 insertions(+)
create mode 100644
Documentation/devicetree/bindings/timer/csky,gx6605s-timer.txt
diff --git a/Documentation/devicetree/bindings/timer/csky,gx6605s
instead of leagcy.
- add set_handle_irq(), ref from openrisc & arm.
Signed-off-by: Guo Ren
---
drivers/irqchip/Makefile| 1 +
drivers/irqchip/irq-csky-apb-intc.c | 243
drivers/irqchip/irq-csky-mpintc.c | 191 +++
Signed-off-by: Guo Ren
---
drivers/clocksource/Kconfig | 15 +++
drivers/clocksource/Makefile | 2 ++
2 files changed, 17 insertions(+)
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index dec0dd8..6ff0a25 100644
--- a/drivers/clocksource/Kconfig
+++ b
Signed-off-by: Guo Ren
---
arch/csky/abiv1/inc/abi/vdso.h | 17
arch/csky/abiv2/inc/abi/vdso.h | 24
arch/csky/include/asm/vdso.h | 12 ++
arch/csky/kernel/vdso.c| 88 ++
4 files changed, 141 insertions(+)
create mode
Signed-off-by: Guo Ren
---
arch/csky/abiv1/inc/abi/vdso.h | 17
arch/csky/abiv2/inc/abi/vdso.h | 24
arch/csky/include/asm/vdso.h | 12 ++
arch/csky/kernel/vdso.c| 88 ++
4 files changed, 141 insertions(+)
create mode
Signed-off-by: Guo Ren
---
Documentation/devicetree/bindings/csky/cpus.txt | 70 +
1 file changed, 70 insertions(+)
create mode 100644 Documentation/devicetree/bindings/csky/cpus.txt
diff --git a/Documentation/devicetree/bindings/csky/cpus.txt
b/Documentation
Signed-off-by: Guo Ren
---
arch/csky/Kconfig | 230 +
arch/csky/Kconfig.debug| 14 ++
arch/csky/Makefile | 93 +
arch/csky/abiv1/Makefile | 8 ++
arch/csky/abiv2/Makefile
Signed-off-by: Guo Ren
---
arch/csky/kernel/head.S| 78 +
arch/csky/kernel/setup.c | 150 +
arch/csky/kernel/vmlinux.lds.S | 64 ++
3 files changed, 292 insertions(+)
create mode 100644 arch/csky/kernel
Signed-off-by: Guo Ren
---
Documentation/devicetree/bindings/csky/cpus.txt | 70 +
1 file changed, 70 insertions(+)
create mode 100644 Documentation/devicetree/bindings/csky/cpus.txt
diff --git a/Documentation/devicetree/bindings/csky/cpus.txt
b/Documentation
Signed-off-by: Guo Ren
---
arch/csky/Kconfig | 230 +
arch/csky/Kconfig.debug| 14 ++
arch/csky/Makefile | 93 +
arch/csky/abiv1/Makefile | 8 ++
arch/csky/abiv2/Makefile
Signed-off-by: Guo Ren
---
arch/csky/kernel/head.S| 78 +
arch/csky/kernel/setup.c | 150 +
arch/csky/kernel/vmlinux.lds.S | 64 ++
3 files changed, 292 insertions(+)
create mode 100644 arch/csky/kernel
Signed-off-by: Guo Ren
---
arch/csky/abiv2/fpu.c | 281 +
arch/csky/abiv2/inc/abi/fpu.h | 66 ++
arch/csky/include/asm/mmu_context.h | 148 ++
arch/csky/include/asm/processor.h | 120 +++
arch/csky/include/asm
Signed-off-by: Guo Ren
---
arch/csky/configs/defconfig | 76 +
1 file changed, 76 insertions(+)
create mode 100644 arch/csky/configs/defconfig
diff --git a/arch/csky/configs/defconfig b/arch/csky/configs/defconfig
new file mode 100644
index 000
This timer is used by SMP system and use mfcr/mtcr instruction
to access the regs.
Changelog:
- Support csky mp timer alpha version.
- Just use low-counter with 32bit width as clocksource.
- Coding convention with upstream feed-back.
Signed-off-by: Guo Ren
---
drivers/clocksource
Signed-off-by: Guo Ren
---
arch/csky/include/asm/smp.h | 26 +
arch/csky/kernel/smp.c | 234
2 files changed, 260 insertions(+)
create mode 100644 arch/csky/include/asm/smp.h
create mode 100644 arch/csky/kernel/smp.c
diff --git a/arch
Signed-off-by: Guo Ren
---
arch/csky/configs/defconfig | 76 +
1 file changed, 76 insertions(+)
create mode 100644 arch/csky/configs/defconfig
diff --git a/arch/csky/configs/defconfig b/arch/csky/configs/defconfig
new file mode 100644
index 000
This timer is used by SMP system and use mfcr/mtcr instruction
to access the regs.
Changelog:
- Support csky mp timer alpha version.
- Just use low-counter with 32bit width as clocksource.
- Coding convention with upstream feed-back.
Signed-off-by: Guo Ren
---
drivers/clocksource
Signed-off-by: Guo Ren
---
arch/csky/include/asm/smp.h | 26 +
arch/csky/kernel/smp.c | 234
2 files changed, 260 insertions(+)
create mode 100644 arch/csky/include/asm/smp.h
create mode 100644 arch/csky/kernel/smp.c
diff --git a/arch
Signed-off-by: Guo Ren
---
arch/csky/abiv2/fpu.c | 281 +
arch/csky/abiv2/inc/abi/fpu.h | 66 ++
arch/csky/include/asm/mmu_context.h | 148 ++
arch/csky/include/asm/processor.h | 120 +++
arch/csky/include/asm
On Thu, Jul 12, 2018 at 10:04:10AM -0600, Sandra Loosemore wrote:
> On 07/12/2018 06:51 AM, Guo Ren wrote:
> >On Wed, Jul 11, 2018 at 10:51:33AM +0100, David Howells wrote:
> >>Can you say what the --target tuple should be so that I can add the arch to
> >>my
>
On Thu, Jul 12, 2018 at 10:04:10AM -0600, Sandra Loosemore wrote:
> On 07/12/2018 06:51 AM, Guo Ren wrote:
> >On Wed, Jul 11, 2018 at 10:51:33AM +0100, David Howells wrote:
> >>Can you say what the --target tuple should be so that I can add the arch to
> >>my
>
On Wed, Jul 11, 2018 at 10:51:33AM +0100, David Howells wrote:
> Can you say what the --target tuple should be so that I can add the arch to my
> collection of Fedora cross-binutils and cross-gcc tools built from upstream
> binutils and gcc sources?
Metor Graghics are helping us upstream gcc and
On Wed, Jul 11, 2018 at 10:51:33AM +0100, David Howells wrote:
> Can you say what the --target tuple should be so that I can add the arch to my
> collection of Fedora cross-binutils and cross-gcc tools built from upstream
> binutils and gcc sources?
Metor Graghics are helping us upstream gcc and
On Sat, Jul 07, 2018 at 10:10:24PM +0200, Andrea Parri wrote:
> On Sat, Jul 07, 2018 at 04:08:47PM +0800, Guo Ren wrote:
> > On Fri, Jul 06, 2018 at 02:17:16PM +0200, Peter Zijlstra wrote:
>
> > CPU0CPU1
> >
> > WRITE_ONCE(x, 1)
On Sat, Jul 07, 2018 at 10:10:24PM +0200, Andrea Parri wrote:
> On Sat, Jul 07, 2018 at 04:08:47PM +0800, Guo Ren wrote:
> > On Fri, Jul 06, 2018 at 02:17:16PM +0200, Peter Zijlstra wrote:
>
> > CPU0CPU1
> >
> > WRITE_ONCE(x, 1)
On Sat, Jul 07, 2018 at 09:54:37PM +0200, Andrea Parri wrote:
> Hi Guo,
>
> On Sat, Jul 07, 2018 at 03:42:10PM +0800, Guo Ren wrote:
> > On Fri, Jul 06, 2018 at 01:56:14PM +0200, Peter Zijlstra wrote:
> > > CPU0CPU1
> > >
> > >
On Sat, Jul 07, 2018 at 09:54:37PM +0200, Andrea Parri wrote:
> Hi Guo,
>
> On Sat, Jul 07, 2018 at 03:42:10PM +0800, Guo Ren wrote:
> > On Fri, Jul 06, 2018 at 01:56:14PM +0200, Peter Zijlstra wrote:
> > > CPU0CPU1
> > >
> > >
On Thu, Jul 05, 2018 at 07:40:25PM +0200, Peter Zijlstra wrote:
> > +#ifdef CONFIG_SMP
> > +#define mb() asm volatile ("sync.is":::"memory")
> > +#else
> > +#define mb() asm volatile ("sync":::"memory")
> > +#endif
>
> This is very suspect, please elaborate.
>
> What I would've
On Thu, Jul 05, 2018 at 07:40:25PM +0200, Peter Zijlstra wrote:
> > +#ifdef CONFIG_SMP
> > +#define mb() asm volatile ("sync.is":::"memory")
> > +#else
> > +#define mb() asm volatile ("sync":::"memory")
> > +#endif
>
> This is very suspect, please elaborate.
>
> What I would've
the smp_mb(); r = READ_ONCE(); with r = xchg() to
> again see why you need that first smp_mb()).
CPU0CPU1
WRITE_ONCE(x, 1)WRITE_ONCE(y, 1)
r0 = xchg(, 2)r1 = xchg(, 2)
must not allow: r0==0 && r1==0
So we must add a smp_mb between WRITE_ONCE() and xchg(), right?
Guo Ren
the smp_mb(); r = READ_ONCE(); with r = xchg() to
> again see why you need that first smp_mb()).
CPU0CPU1
WRITE_ONCE(x, 1)WRITE_ONCE(y, 1)
r0 = xchg(, 2)r1 = xchg(, 2)
must not allow: r0==0 && r1==0
So we must add a smp_mb between WRITE_ONCE() and xchg(), right?
Guo Ren
(x); WRITE_ONCE(y, 1);
> r2 = xchg(, 2); smp_store_release(, 1);
>
> must not allow: r1==1 && r2==0
CPU1 smp_store_release could be finished before WRITE_ONCE, so r1=1 &&
r2=0?
> > > The above implementation suggests LDEX implies a SYNC.IS, is this
> > > correct?
> > No, ldex doesn't imply a sync.is.
>
> Right, as per the spinlock emails, then your proposed primitives are
> incorrect.
Yes, approve.
Guo Ren
(x); WRITE_ONCE(y, 1);
> r2 = xchg(, 2); smp_store_release(, 1);
>
> must not allow: r1==1 && r2==0
CPU1 smp_store_release could be finished before WRITE_ONCE, so r1=1 &&
r2=0?
> > > The above implementation suggests LDEX implies a SYNC.IS, is this
> > > correct?
> > No, ldex doesn't imply a sync.is.
>
> Right, as per the spinlock emails, then your proposed primitives are
> incorrect.
Yes, approve.
Guo Ren
vailable.
>
> You probably also want a mapping from Linux logical CPU id to your
> physical CPU id, and a sanity check on this. See arm64 for an example.
Yes, you are right. Reg property could determine which bit of CPU in
cr<0, 29> could be booted.
Thx for the tips.
Guo Ren
vailable.
>
> You probably also want a mapping from Linux logical CPU id to your
> physical CPU id, and a sanity check on this. See arm64 for an example.
Yes, you are right. Reg property could determine which bit of CPU in
cr<0, 29> could be booted.
Thx for the tips.
Guo Ren
tch.
>
> If you need inspiration, look at:
>
arch/arm/include/asm/spinlock.h
>
> Or look at the current version of that file and ignore the LSE version.
>
> Note that unlock is a store half-word (u16), not having seen your arch
> manual yet I don't know if you even have that.
Nice tips, thank you very much.
Guo Ren
tch.
>
> If you need inspiration, look at:
>
arch/arm/include/asm/spinlock.h
>
> Or look at the current version of that file and ignore the LSE version.
>
> Note that unlock is a store half-word (u16), not having seen your arch
> manual yet I don't know if you even have that.
Nice tips, thank you very much.
Guo Ren
On Fri, Jul 06, 2018 at 02:05:32PM +0200, Peter Zijlstra wrote:
> On Fri, Jul 06, 2018 at 07:48:12PM +0800, Guo Ren wrote:
> > On Thu, Jul 05, 2018 at 08:00:08PM +0200, Peter Zijlstra wrote:
> > > On Mon, Jul 02, 2018 at 01:30:14AM +0800, Guo Ren wrote:
> > > >
On Fri, Jul 06, 2018 at 02:05:32PM +0200, Peter Zijlstra wrote:
> On Fri, Jul 06, 2018 at 07:48:12PM +0800, Guo Ren wrote:
> > On Thu, Jul 05, 2018 at 08:00:08PM +0200, Peter Zijlstra wrote:
> > > On Mon, Jul 02, 2018 at 01:30:14AM +0800, Guo Ren wrote:
> > > >
On Fri, Jul 06, 2018 at 11:39:32AM +0200, Peter Zijlstra wrote:
> On Fri, Jul 06, 2018 at 02:07:40PM +0800, Guo Ren wrote:
>
> > > Please explain those mb()'s... I'm thinking you meant to use smp_mb().
> > Yes, smp_mb(). Current smp_mb()() is the same: sync.is.
> >
On Fri, Jul 06, 2018 at 11:39:32AM +0200, Peter Zijlstra wrote:
> On Fri, Jul 06, 2018 at 02:07:40PM +0800, Guo Ren wrote:
>
> > > Please explain those mb()'s... I'm thinking you meant to use smp_mb().
> > Yes, smp_mb(). Current smp_mb()() is the same: sync.is.
> >
anism architectual for C-SKY SMP. There is
no another way in future and SOC vendor couldn't change it.
> You probably want to use an enable-method property to describe this.
No, thx.
Guo Ren
anism architectual for C-SKY SMP. There is
no another way in future and SOC vendor couldn't change it.
> You probably want to use an enable-method property to describe this.
No, thx.
Guo Ren
On Thu, Jul 05, 2018 at 08:00:08PM +0200, Peter Zijlstra wrote:
> On Mon, Jul 02, 2018 at 01:30:14AM +0800, Guo Ren wrote:
> > +#ifdef CONFIG_CPU_HAS_LDSTEX
> > +ENTRY(csky_cmpxchg)
> > + USPTOKSP
> > + mfcra3, epc
> > + INCTRAP a3
> > +
> >
On Thu, Jul 05, 2018 at 08:00:08PM +0200, Peter Zijlstra wrote:
> On Mon, Jul 02, 2018 at 01:30:14AM +0800, Guo Ren wrote:
> > +#ifdef CONFIG_CPU_HAS_LDSTEX
> > +ENTRY(csky_cmpxchg)
> > + USPTOKSP
> > + mfcra3, epc
> > + INCTRAP a3
> > +
> >
On Thu, Jul 05, 2018 at 07:59:02PM +0200, Peter Zijlstra wrote:
> On Mon, Jul 02, 2018 at 01:30:14AM +0800, Guo Ren wrote:
>
> > +static inline void arch_spin_lock(arch_spinlock_t *lock)
> > +{
> > + unsigned int *p = >lock;
> > + unsigned in
On Thu, Jul 05, 2018 at 07:59:02PM +0200, Peter Zijlstra wrote:
> On Mon, Jul 02, 2018 at 01:30:14AM +0800, Guo Ren wrote:
>
> > +static inline void arch_spin_lock(arch_spinlock_t *lock)
> > +{
> > + unsigned int *p = >lock;
> > + unsigned in
gt;");
> > + tmp |= 1 << cpu;
> > + mtcr("cr<29, 0>", tmp);
> > +
> > + while (!cpu_online(cpu));
> > +
> > + secondary_stack = 0;
> > +
> > + return 0;
> > +}
>
> I don't see a start address being setup here, so I assume that CPUs branch to
> a
> fixed address out-of-reset. Does that mean that the kernel has to be loaded at
> a particular physical address on a given platform?
No, not a fixed address. I put it arch/csky/kernel/traps.c:79-83
trap_init()
#ifdef CONFIG_SMP
mtcr("cr<28, 0>", virt_to_phys(vec_base));
VEC_INIT(VEC_RESET, (void *)virt_to_phys(_start_smp_secondary));
#endi
Guo Ren
gt;");
> > + tmp |= 1 << cpu;
> > + mtcr("cr<29, 0>", tmp);
> > +
> > + while (!cpu_online(cpu));
> > +
> > + secondary_stack = 0;
> > +
> > + return 0;
> > +}
>
> I don't see a start address being setup here, so I assume that CPUs branch to
> a
> fixed address out-of-reset. Does that mean that the kernel has to be loaded at
> a particular physical address on a given platform?
No, not a fixed address. I put it arch/csky/kernel/traps.c:79-83
trap_init()
#ifdef CONFIG_SMP
mtcr("cr<28, 0>", virt_to_phys(vec_base));
VEC_INIT(VEC_RESET, (void *)virt_to_phys(_start_smp_secondary));
#endi
Guo Ren
On Thu, Jul 05, 2018 at 07:50:59PM +0200, Peter Zijlstra wrote:
> On Mon, Jul 02, 2018 at 01:30:14AM +0800, Guo Ren wrote:
>
> > +#include
> > +
> > +#defi
On Thu, Jul 05, 2018 at 07:50:59PM +0200, Peter Zijlstra wrote:
> On Mon, Jul 02, 2018 at 01:30:14AM +0800, Guo Ren wrote:
>
> > +#include
> > +
> > +#defi
On Thu, Jul 05, 2018 at 08:05:03PM +0200, Peter Zijlstra wrote:
> On Mon, Jul 02, 2018 at 01:30:19AM +0800, Guo Ren wrote:
> > +static irqreturn_t handle_ipi(int irq, void *dev)
> > +{
> > + unsigned long *pending_ipis = _data[smp_processor_id()].bits;
>
On Thu, Jul 05, 2018 at 08:05:03PM +0200, Peter Zijlstra wrote:
> On Mon, Jul 02, 2018 at 01:30:19AM +0800, Guo Ren wrote:
> > +static irqreturn_t handle_ipi(int irq, void *dev)
> > +{
> > + unsigned long *pending_ipis = _data[smp_processor_id()].bits;
>
c ops is set.
Got it, add set_oneshot.
> > Thx, I'll modify it like this:
> > div = (timer_of_rate() / TIMER_FREQ) - 1;
>
> I wanted to be sure it wasn't the latter. In this case, you don't need
> parenthesis, so just add the spaces around the '/' operator.
Ok
Guo Ren
c ops is set.
Got it, add set_oneshot.
> > Thx, I'll modify it like this:
> > div = (timer_of_rate() / TIMER_FREQ) - 1;
>
> I wanted to be sure it wasn't the latter. In this case, you don't need
> parenthesis, so just add the spaces around the '/' operator.
Ok
Guo Ren
call_table.c:
>
> #define sys_fadvise64_64 csky_fadvise64_64
Thx for the tip :)
Guo Ren
call_table.c:
>
> #define sys_fadvise64_64 csky_fadvise64_64
Thx for the tip :)
Guo Ren
On Wed, Jul 04, 2018 at 04:35:43PM +0200, Thomas Gleixner wrote:
> On Wed, 4 Jul 2018, Guo Ren wrote:
> > On Tue, Jul 03, 2018 at 11:39:05AM +0200, Thomas Gleixner wrote:
> > > > +static inline u64 get_ccvr(void)
> > > > +{
> > > > +
On Wed, Jul 04, 2018 at 04:35:43PM +0200, Thomas Gleixner wrote:
> On Wed, 4 Jul 2018, Guo Ren wrote:
> > On Tue, Jul 03, 2018 at 11:39:05AM +0200, Thomas Gleixner wrote:
> > > > +static inline u64 get_ccvr(void)
> > > > +{
> > > > +
+
> > +static u64 notrace nc_sched_clock_read(void)
> > +{
> > + void __iomem *base;
> > +
> > + base = timer_of_base() + CLKSRC_OFFSET;
> > +
> > + return (u64) readl_relaxed(base + TIMER_VALUE);
> > +}
> > +
> > +static void nc_timer_set_div(void __iomem *base)
> > +{
> > + unsigned int div;
> > +
> > + div = timer_of_rate()/TIMER_FREQ - 1;
>
> space ' / '
>
> Is it
> (timer_of_rate() / TIMER_FREQ) - 1
> or
> timer_of_rate() / (TIMER_FREQ - 1)
>
> ?
Thx, I'll modify it like this:
div = (timer_of_rate() / TIMER_FREQ) - 1;
> > + clocksource_mmio_init(base + TIMER_VALUE, "nationalchip", TIMER_FREQ,
> > 200, 32,
> > + clocksource_mmio_readl_up);
>
> return code check ?
Ok, add return code check.
> > +TIMER_OF_DECLARE(nc_timer, "nationalchip,timer-v1", nc_timer_init);
>
> same comment than cksy timer.
Ok.
Guo Ren
+
> > +static u64 notrace nc_sched_clock_read(void)
> > +{
> > + void __iomem *base;
> > +
> > + base = timer_of_base() + CLKSRC_OFFSET;
> > +
> > + return (u64) readl_relaxed(base + TIMER_VALUE);
> > +}
> > +
> > +static void nc_timer_set_div(void __iomem *base)
> > +{
> > + unsigned int div;
> > +
> > + div = timer_of_rate()/TIMER_FREQ - 1;
>
> space ' / '
>
> Is it
> (timer_of_rate() / TIMER_FREQ) - 1
> or
> timer_of_rate() / (TIMER_FREQ - 1)
>
> ?
Thx, I'll modify it like this:
div = (timer_of_rate() / TIMER_FREQ) - 1;
> > + clocksource_mmio_init(base + TIMER_VALUE, "nationalchip", TIMER_FREQ,
> > 200, 32,
> > + clocksource_mmio_readl_up);
>
> return code check ?
Ok, add return code check.
> > +TIMER_OF_DECLARE(nc_timer, "nationalchip,timer-v1", nc_timer_init);
>
> same comment than cksy timer.
Ok.
Guo Ren
On Wed, Jul 04, 2018 at 08:43:29AM +0200, Thomas Gleixner wrote:
> > Do you mean merge irq-csky-v1.c irq-csky-v2.c irq-nationalchip.c into
> > one file eg: irq-csky.c?
>
> Yes, but only if there is enough code to share without creating an ifdef
> mess. But that looks doabl
On Wed, Jul 04, 2018 at 08:43:29AM +0200, Thomas Gleixner wrote:
> > Do you mean merge irq-csky-v1.c irq-csky-v2.c irq-nationalchip.c into
> > one file eg: irq-csky.c?
>
> Yes, but only if there is enough code to share without creating an ifdef
> mess. But that looks doabl
g_struct {
> > + unsigned long addr;
> > + unsigned long len;
> > + unsigned long prot;
> > + unsigned long flags;
> > + unsigned long fd;
> > + unsigned long offset;
> > +};
> > +
> > +SYSCALL_DEFINE1(mmap,
> > + struct mmap_arg_struct *, arg)
> > +{
> > + struct mmap_arg_struct a;
> > +
> > + if (copy_from_user(, arg, sizeof(a)))
> > + return -EINVAL;
> > +
> > + if (unlikely(a.offset & ~PAGE_MASK))
> > + return -EINVAL;
> > +
> > + return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd,
> > a.offset >> PAGE_SHIFT);
> > +}
>
> This can be removed since there is mmap2()
Ok.
Guo Ren
1001 - 1100 of 1253 matches
Mail list logo