1. 22 Nov, 2018 5 commits
  2. 06 Nov, 2018 9 commits
    • YueHaibing's avatar
      nds32: Remove duplicated include from pm.c · 4f014a41
      YueHaibing authored
      Remove duplicated include.
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Acked-by: default avatarPavel Machek <pavel@ucw.cz>
      Acked-by: default avatarGreentime Hu <greentime@andestech.com>
      Signed-off-by: default avatarGreentime Hu <greentime@andestech.com>
      4f014a41
    • Nick Hu's avatar
      nds32: Power management for nds32 · 7938e631
      Nick Hu authored
      There are three sleep states in nds32:
      	suspend to idle,
      	suspend to standby,
      	suspend to ram
      
      In suspend to ram, we use the 'standby' instruction to emulate
      power management device to hang the system util wakeup source
      send wakeup events to break the loop.
      
      First, we push the general purpose registers and system registers
      to stack. Second, we translate stack pointer to physical address
      and store to memory to save the stack pointer. Third, after write
      back and invalid the cache we hang in 'standby' intruction.
      When wakeup source trigger wake up events, the loop will be break
      and resume the system.
      Signed-off-by: default avatarNick Hu <nickhu@andestech.com>
      Acked-by: default avatarPavel Machek <pavel@ucw.cz>
      Acked-by: default avatarGreentime Hu <greentime@andestech.com>
      Signed-off-by: default avatarGreentime Hu <greentime@andestech.com>
      7938e631
    • Nickhu's avatar
      nds32: Add document for NDS32 PMU. · cf26edd8
      Nickhu authored
      The document for how to add NDS32 PMU
      in devicetree.
      Signed-off-by: default avatarNickhu <nickhu@andestech.com>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Acked-by: default avatarGreentime Hu <greentime@andestech.com>
      Signed-off-by: default avatarGreentime Hu <greentime@andestech.com>
      cf26edd8
    • Nickhu's avatar
      nds32: Add perf call-graph support. · c8b34461
      Nickhu authored
      The perf call-graph option can trace the callchain
      between functions. This commit add the perf callchain
      for nds32. There are kerenl callchain and user callchain.
      The kerenl callchain can trace the function in kernel
      space. There are two type for user callchain. One for the
      'optimize for size' config is set, and another one for the
      config is not set. The difference between two types is that
      the index of frame-pointer in user stack is not the same.
      
      For example:
      	With optimize for size:
      		User Stack:
      			---------
      			|   lp	|
      			---------
      			|	gp	|
      			---------
      			|	fp	|
      
      	Without optimize for size:
      		User Stack:
      		1. non-leaf function:
      			---------
      			|	lp	|
      			---------
      			|	fp	|
      
      		2. leaf	function:
      			---------
      			|	fp	|
      Signed-off-by: default avatarNickhu <nickhu@andestech.com>
      Acked-by: default avatarGreentime Hu <greentime@andestech.com>
      Signed-off-by: default avatarGreentime Hu <greentime@andestech.com>
      c8b34461
    • Nickhu's avatar
      nds32: Perf porting · ebd09753
      Nickhu authored
      This is the commit that porting the perf for nds32.
      
      1.Raw event:
      	The raw events start with 'r'.
      		Usage:
      			perf stat -e rXYZ ./app
      			X: the index of performance counter.
      			YZ: the index(convert to hexdecimal) of events
      
      		Example:
      			'perf stat -e r101 ./app' means the counter 1 will count the instruction
      		event.
      
      		The index of counter and events can be found in
      		"Andes System Privilege Architecture Version 3 Manual".
      
      Or you can perform the 'perf list' to find the symbolic name of raw events.
      
      2.Perf mmap2:
      
      	Fix unexpected perf mmap2() page fault
      
      	When the mmap2() called by perf application,
      	you will encounter such condition:"failed to write."
      	With return value -EFAULT
      
      	This is due to the page fault caused by "reading" buffer
      	from the mapped legal address region to write to the descriptor.
      	The page_fault handler will get a VM_FAULT_SIGBUS return value,
      	which should not happens here.(Due to this is a read request.)
      
      	You can refer to kernel/events/core.c:perf_mmap_fault(...)
      	If "(vmf->pgoff && (vmf->flags & FAULT_FLAG_WRITE))" is evaluated
      	as true, you will get VM_FAULT_SIGBUS as return value.
      
      	However, this is not an write request. The flags which indicated
      	why the page fault happens is wrong.
      
      	Furthermore, NDS32 SPAv3 is not able to detect it is read or write.
      	It only know  either it is instruction fetch or data access.
      
      	Therefore, by removing the wrong flag assignment(actually, the hardware
      	is not able to show the reason), we can fix this bug.
      
      3.Perf multiple events map to same counter.
      
      	When there are multiple events map to the same counter, the counter
      	counts inaccurately. This is because each counter only counts one event
      	in the same time.
      	So when there are multiple events map to same counter, they have to take
      	turns in each context.
      
      	There are two solution:
      	1. Print the error message when multiple events map to the same counter.
      	But print the error message would let the program hang in loop. The ltp
      	(linux test program) would be failed when the program hang in loop.
      
      	2. Don't print the error message, the ltp would pass. But the user need to
      	have the knowledge that don't count the events which map to the same
      	counter, or the user will get the inaccurate results.
      
      	We choose method 2 for the solution
      Signed-off-by: default avatarNickhu <nickhu@andestech.com>
      Acked-by: default avatarGreentime Hu <greentime@andestech.com>
      Signed-off-by: default avatarGreentime Hu <greentime@andestech.com>
      ebd09753
    • Nickhu's avatar
      nds32: Fix bug in bitfield.h · 9aaafac8
      Nickhu authored
      There two bitfield bug for perfomance counter
      in bitfield.h:
      
      	PFM_CTL_offSEL1		21 --> 16
      	PFM_CTL_offSEL2		27 --> 22
      
      This commit fix it.
      Signed-off-by: default avatarNickhu <nickhu@andestech.com>
      Acked-by: default avatarGreentime Hu <greentime@andestech.com>
      Signed-off-by: default avatarGreentime Hu <greentime@andestech.com>
      9aaafac8
    • Nickhu's avatar
      nds32: Fix gcc 8.0 compiler option incompatible. · 4c3d6174
      Nickhu authored
      When the kernel configs of ftrace and frame pointer options are
      choosed, the compiler option of kernel will incompatible.
      	Error message:
      		nds32le-linux-gcc: error: -pg and -fomit-frame-pointer are incompatible
      Signed-off-by: default avatarNickhu <nickhu@andestech.com>
      Signed-off-by: default avatarZong Li <zong@andestech.com>
      Acked-by: default avatarGreentime Hu <greentime@andestech.com>
      Signed-off-by: default avatarGreentime Hu <greentime@andestech.com>
      4c3d6174
    • Zong Li's avatar
      nds32: Fill all TLB entries with kernel image mapping · 8730c178
      Zong Li authored
      We use earlycon replace with early_printk and doesn't use
      early_io_map() to create UART mapping. It is not necessary
      to reserve the one way in TLB for now.
      
      It didn't make sense if use direct-mapped and reserve one
      way at the same time. It allow the direct-mapped now.
      Signed-off-by: default avatarZong Li <zong@andestech.com>
      Signed-off-by: default avatarGreentime Hu <greentime@andestech.com>
      8730c178
    • Zong Li's avatar
      nds32: Remove the redundant assignment · 2e95c4d6
      Zong Li authored
      For early version, the value of r2 register was used to display
      a character on UART when error occurred. Remove these r2 assignments
      because we no longer show the character.
      Signed-off-by: default avatarZong Li <zong@andestech.com>
      Signed-off-by: default avatarGreentime Hu <greentime@andestech.com>
      2e95c4d6
  3. 04 Nov, 2018 9 commits
    • Linus Torvalds's avatar
      Linux 4.20-rc1 · 65102238
      Linus Torvalds authored
      65102238
    • Linus Torvalds's avatar
      Merge tag 'tags/upstream-4.20-rc1' of git://git.infradead.org/linux-ubifs · 42bd06e9
      Linus Torvalds authored
      Pull UBIFS updates from Richard Weinberger:
      
       - Full filesystem authentication feature, UBIFS is now able to have the
         whole filesystem structure authenticated plus user data encrypted and
         authenticated.
      
       - Minor cleanups
      
      * tag 'tags/upstream-4.20-rc1' of git://git.infradead.org/linux-ubifs: (26 commits)
        ubifs: Remove unneeded semicolon
        Documentation: ubifs: Add authentication whitepaper
        ubifs: Enable authentication support
        ubifs: Do not update inode size in-place in authenticated mode
        ubifs: Add hashes and HMACs to default filesystem
        ubifs: authentication: Authenticate super block node
        ubifs: Create hash for default LPT
        ubfis: authentication: Authenticate master node
        ubifs: authentication: Authenticate LPT
        ubifs: Authenticate replayed journal
        ubifs: Add auth nodes to garbage collector journal head
        ubifs: Add authentication nodes to journal
        ubifs: authentication: Add hashes to index nodes
        ubifs: Add hashes to the tree node cache
        ubifs: Create functions to embed a HMAC in a node
        ubifs: Add helper functions for authentication support
        ubifs: Add separate functions to init/crc a node
        ubifs: Format changes for authentication support
        ubifs: Store read superblock node
        ubifs: Drop write_node
        ...
      42bd06e9
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-4.20-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 4710e789
      Linus Torvalds authored
      Pull NFS client bugfixes from Trond Myklebust:
       "Highlights include:
      
        Bugfix:
         - Fix build issues on architectures that don't provide 64-bit cmpxchg
      
        Cleanups:
         - Fix a spelling mistake"
      
      * tag 'nfs-for-4.20-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFS: fix spelling mistake, EACCESS -> EACCES
        SUNRPC: Use atomic(64)_t for seq_send(64)
      4710e789
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 35e74524
      Linus Torvalds authored
      Pull more timer updates from Thomas Gleixner:
       "A set of commits for the new C-SKY architecture timers"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        dt-bindings: timer: gx6605s SOC timer
        clocksource/drivers/c-sky: Add gx6605s SOC system timer
        dt-bindings: timer: C-SKY Multi-processor timer
        clocksource/drivers/c-sky: Add C-SKY SMP timer
      35e74524
    • Linus Torvalds's avatar
      Merge tag 'ntb-4.20' of git://github.com/jonmason/ntb · 04578e84
      Linus Torvalds authored
      Pull NTB updates from Jon Mason:
       "Fairly minor changes and bug fixes:
      
        NTB IDT thermal changes and hook into hwmon, ntb_netdev clean-up of
        private struct, and a few bug fixes"
      
      * tag 'ntb-4.20' of git://github.com/jonmason/ntb:
        ntb: idt: Alter the driver info comments
        ntb: idt: Discard temperature sensor IRQ handler
        ntb: idt: Add basic hwmon sysfs interface
        ntb: idt: Alter temperature read method
        ntb_netdev: Simplify remove with client device drvdata
        NTB: transport: Try harder to alloc an aligned MW buffer
        ntb: ntb_transport: Mark expected switch fall-throughs
        ntb: idt: Set PCIe bus address to BARLIMITx
        NTB: ntb_hw_idt: replace IS_ERR_OR_NULL with regular NULL checks
        ntb: intel: fix return value for ndev_vec_mask()
        ntb_netdev: fix sleep time mismatch
      04578e84
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 71e56028
      Linus Torvalds authored
      Pull scheduler fixes from Ingo Molnar:
       "A memory (under-)allocation fix and a comment fix"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/topology: Fix off by one bug
        sched/rt: Update comment in pick_next_task_rt()
      71e56028
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 601a8807
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "A number of fixes and some late updates:
      
         - make in_compat_syscall() behavior on x86-32 similar to other
           platforms, this touches a number of generic files but is not
           intended to impact non-x86 platforms.
      
         - objtool fixes
      
         - PAT preemption fix
      
         - paravirt fixes/cleanups
      
         - cpufeatures updates for new instructions
      
         - earlyprintk quirk
      
         - make microcode version in sysfs world-readable (it is already
           world-readable in procfs)
      
         - minor cleanups and fixes"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        compat: Cleanup in_compat_syscall() callers
        x86/compat: Adjust in_compat_syscall() to generic code under !COMPAT
        objtool: Support GCC 9 cold subfunction naming scheme
        x86/numa_emulation: Fix uniform-split numa emulation
        x86/paravirt: Remove unused _paravirt_ident_32
        x86/mm/pat: Disable preemption around __flush_tlb_all()
        x86/paravirt: Remove GPL from pv_ops export
        x86/traps: Use format string with panic() call
        x86: Clean up 'sizeof x' => 'sizeof(x)'
        x86/cpufeatures: Enumerate MOVDIR64B instruction
        x86/cpufeatures: Enumerate MOVDIRI instruction
        x86/earlyprintk: Add a force option for pciserial device
        objtool: Support per-function rodata sections
        x86/microcode: Make revision and processor flags world-readable
      601a8807
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 01897f3e
      Linus Torvalds authored
      Pull perf updates and fixes from Ingo Molnar:
       "These are almost all tooling updates: 'perf top', 'perf trace' and
        'perf script' fixes and updates, an UAPI header sync with the merge
        window versions, license marker updates, much improved Sparc support
        from David Miller, and a number of fixes"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (66 commits)
        perf intel-pt/bts: Calculate cpumode for synthesized samples
        perf intel-pt: Insert callchain context into synthesized callchains
        perf tools: Don't clone maps from parent when synthesizing forks
        perf top: Start display thread earlier
        tools headers uapi: Update linux/if_link.h header copy
        tools headers uapi: Update linux/netlink.h header copy
        tools headers: Sync the various kvm.h header copies
        tools include uapi: Update linux/mmap.h copy
        perf trace beauty: Use the mmap flags table generated from headers
        perf beauty: Wire up the mmap flags table generator to the Makefile
        perf beauty: Add a generator for MAP_ mmap's flag constants
        tools include uapi: Update asound.h copy
        tools arch uapi: Update asm-generic/unistd.h and arm64 unistd.h copies
        tools include uapi: Update linux/fs.h copy
        perf callchain: Honour the ordering of PERF_CONTEXT_{USER,KERNEL,etc}
        perf cs-etm: Correct CPU mode for samples
        perf unwind: Take pgoff into account when reporting elf to libdwfl
        perf top: Do not use overwrite mode by default
        perf top: Allow disabling the overwrite mode
        perf trace: Beautify mount's first pathname arg
        ...
      01897f3e
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e9ebc215
      Linus Torvalds authored
      Pull irq fixes from Ingo Molnar:
       "An irqchip driver fix and a memory (over-)allocation fix"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/irq-mvebu-sei: Fix a NULL vs IS_ERR() bug in probe function
        irq/matrix: Fix memory overallocation
      e9ebc215
  4. 03 Nov, 2018 17 commits