Skip to content

Commit

Permalink
Merge tag 'csky-for-linus-5.0-rc1' of git://github.com/c-sky/csky-linux
Browse files Browse the repository at this point in the history
Pull arch/csky bug fixes from Guo Ren:
 "Here are some fixup patches for 5.0-rc1:

   - fix compile error with pte_alloc

   - fix handle_irq_perbit break irq flow

   - fix CACHEV1 store instruction fast retire

   - fix module relocation error with 807 & 860

   - add csky kernel features to documentation"

* tag 'csky-for-linus-5.0-rc1' of git://github.com/c-sky/csky-linux:
  irqchip/csky: fixup handle_irq_perbit break irq
  csky: fixup compile error with pte_alloc
  csky: fixup CACHEV1 store instruction fast retire
  csky: fixup relocation error with 807 & 860
  Documentation/features: Add csky kernel features
  • Loading branch information
torvalds committed Jan 9, 2019
2 parents a88cc8d + 56752b2 commit 4064e47
Show file tree
Hide file tree
Showing 45 changed files with 148 additions and 76 deletions.
1 change: 1 addition & 0 deletions Documentation/features/core/cBPF-JIT/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | TODO |
| arm64: | TODO |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/core/eBPF-JIT/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | TODO |
| csky: | ok |
| h8300: | TODO |
| hexagon: | ok |
| ia64: | ok |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/core/jump-labels/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/core/tracehook/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | ok |
| csky: | ok |
| h8300: | TODO |
| hexagon: | ok |
| ia64: | ok |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/debug/KASAN/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | TODO |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/debug/kgdb/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | ok |
| hexagon: | ok |
| ia64: | TODO |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | TODO |
| arm64: | TODO |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/debug/kprobes/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | ok |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/debug/kretprobes/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | ok |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/debug/optprobes/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | TODO |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/debug/uprobes/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | TODO |
| arm64: | TODO |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/io/dma-contiguous/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | TODO |
| csky: | ok |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | TODO |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/locking/lockdep/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | ok |
| ia64: | TODO |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | TODO |
| arm64: | ok |
| c6x: | TODO |
| csky: | ok |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | TODO |
| arm64: | TODO |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | ok |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/perf/kprobes-event/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | ok |
| ia64: | TODO |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/perf/perf-regs/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | .. |
| arm64: | ok |
| c6x: | .. |
| csky: | .. |
| h8300: | .. |
| hexagon: | .. |
| ia64: | TODO |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/time/clockevents/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | ok |
| csky: | ok |
| h8300: | ok |
| hexagon: | ok |
| ia64: | TODO |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/time/irq-time-acct/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | .. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | TODO |
| arm64: | ok |
| c6x: | ok |
| csky: | ok |
| h8300: | ok |
| hexagon: | ok |
| ia64: | ok |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/time/virt-cpuacct/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | ok |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/vm/ELF-ASLR/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/vm/PG_uncached/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | TODO |
| arm64: | TODO |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | ok |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/vm/THP/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | .. |
| csky: | .. |
| h8300: | .. |
| hexagon: | .. |
| ia64: | TODO |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/vm/TLB/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | TODO |
| arm64: | TODO |
| c6x: | .. |
| csky: | TODO |
| h8300: | .. |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/vm/huge-vmap/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | TODO |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/vm/ioremap_prot/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | TODO |
| arm64: | TODO |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/vm/numa-memblock/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | .. |
| arm64: | ok |
| c6x: | .. |
| csky: | .. |
| h8300: | .. |
| hexagon: | .. |
| ia64: | ok |
Expand Down
1 change: 1 addition & 0 deletions Documentation/features/vm/pte_special/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| arm: | ok |
| arm64: | ok |
| c6x: | TODO |
| csky: | TODO |
| h8300: | TODO |
| hexagon: | TODO |
| ia64: | TODO |
Expand Down
25 changes: 25 additions & 0 deletions arch/csky/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,31 @@ extern void iounmap(void *addr);
extern int remap_area_pages(unsigned long address, phys_addr_t phys_addr,
size_t size, unsigned long flags);

/*
* I/O memory access primitives. Reads are ordered relative to any
* following Normal memory access. Writes are ordered relative to any prior
* Normal memory access.
*
* For CACHEV1 (807, 810), store instruction could fast retire, so we need
* another mb() to prevent st fast retire.
*
* For CACHEV2 (860), store instruction with PAGE_ATTR_NO_BUFFERABLE won't
* fast retire.
*/
#define readb(c) ({ u8 __v = readb_relaxed(c); rmb(); __v; })
#define readw(c) ({ u16 __v = readw_relaxed(c); rmb(); __v; })
#define readl(c) ({ u32 __v = readl_relaxed(c); rmb(); __v; })

#ifdef CONFIG_CPU_HAS_CACHEV2
#define writeb(v,c) ({ wmb(); writeb_relaxed((v),(c)); })
#define writew(v,c) ({ wmb(); writew_relaxed((v),(c)); })
#define writel(v,c) ({ wmb(); writel_relaxed((v),(c)); })
#else
#define writeb(v,c) ({ wmb(); writeb_relaxed((v),(c)); mb(); })
#define writew(v,c) ({ wmb(); writew_relaxed((v),(c)); mb(); })
#define writel(v,c) ({ wmb(); writel_relaxed((v),(c)); mb(); })
#endif

#define ioremap_nocache(phy, sz) ioremap(phy, sz)
#define ioremap_wc ioremap_nocache
#define ioremap_wt ioremap_nocache
Expand Down
Loading

0 comments on commit 4064e47

Please sign in to comment.