Commit graph

128 commits

Author SHA1 Message Date
Max Filippov 3de00482b0 xtensa: minimize use of PLATFORM_DEFAULT_MEM_{ADDR,SIZE}
Now that the kernel load address and KSEG physical base address have
their own Kconfig symbols PLATFORM_DEFAULT_MEM seems redundant. It makes
little sense to use it in MMU configurations instead of KSEG_PADDR.
In noMMU configurations there's no explicit KSEG, so it's still useful
for the early cache initialization and definition of ARCH_PFN_OFFSET,
which affects mem_map size.

- limit it to noMMU; MMU variants have XCHAL_KSEG_PADDR and
  XCHAL_KSEG_SIZE;
- don't use it to define TASK_SIZE or MAX_LOW_PFN: first doesn't make
  any difference in noMMU, second is meaningless as there's no high
  memory;
- don't add default physical memory region: memory layout should come
  from the DT, bootloader tags, or memmap= command line parameter.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2016-07-24 06:33:59 +03:00
Max Filippov a9f2fc628e xtensa: cleanup MMU setup and kernel layout macros
Make kernel load address explicit, independent of the selected MMU
configuration and configurable from Kconfig. Do not restrict it to the
first 512MB of the physical address space.

Cleanup kernel memory layout macros:

- rename VECBASE_RESET_VADDR to VECBASE_VADDR, XC_VADDR to VECTOR_VADDR;
- drop VIRTUAL_MEMORY_ADDRESS and LOAD_MEMORY_ADDRESS;
- introduce PHYS_OFFSET and use it in __va and __pa definitions;
- synchronize MMU/noMMU vectors, drop unused NMI vector;
- replace hardcoded vectors offset of 0x3000 with Kconfig symbol.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2016-07-24 06:33:58 +03:00
Max Filippov d39af90265 xtensa: add alternative kernel memory layouts
MMUv3 is able to support low memory bigger than 128MB.
Implement 256MB and 512MB KSEG layouts:

- add Kconfig selector for KSEG layout;
- add KSEG base address, size and alignment definitions to
  arch/xtensa/include/asm/kmem_layout.h;
- use new definitions in TLB initialization;
- add build time memory map consistency checks.

See Documentation/xtensa/mmu.txt for the details of new memory layouts.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2016-07-24 06:33:58 +03:00
Jiri Slaby 5f56a5dfdb exit_thread: remove empty bodies
Define HAVE_EXIT_THREAD for archs which want to do something in
exit_thread. For others, let's define exit_thread as an empty inline.

This is a cleanup before we change the prototype of exit_thread to
accept a task parameter.

[akpm@linux-foundation.org: fix mips]
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Chen Liqin <liqin.linux@gmail.com>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: David Howells <dhowells@redhat.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
Cc: Ley Foon Tan <lftan@altera.com>
Cc: Mark Salter <msalter@redhat.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Rich Felker <dalias@libc.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Richard Kuo <rkuo@codeaurora.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Steven Miao <realmz6@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-05-20 17:58:30 -07:00
Linus Walleij e944b10ab0 xtensa: remove ARCH_WANT_OPTIONAL_GPIOLIB
This symbols is not needed to get access to selecting the
GPIOLIB anymore: any arch can select GPIOLIB.

Cc: Michael Büsch <m@bues.ch>
Cc: Chris Zankel <chris@zankel.net>
Cc: linux-xtensa@linux-xtensa.org
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26 13:59:33 +02:00
Linus Torvalds fffad3e1b3 Xtensa improvements for 4.6:
- control whether perf IRQ is treated as NMI from Kconfig;
 - implement ioremap for regions outside KIO segment;
 - fix ISS serial port behaviour when EOF is reached;
 - fix preemption in {clear,copy}_user_highpage;
 - fix endianness issues for XTFPGA devices, big-endian cores are now
   fully functional;
 - clean up debug infrastructure and add support for hardware breakpoints
   and watchpoints.
 - add processor configurations for Three Core HiFi-2 MX and HiFi3 cpus
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJW7lSZAAoJEI9vqH3mFV2sSV4QAI6P5huzOPT6OugN+nnI7REh
 Hu6+64F3pNmrtVa2AdApAPjJm9eCeDpFRDI7QC7VArFJFTvYQiu3Ejp3/197cr8s
 gUvh9BFSnsqbwtzFXXpwDfSzLVcd6hPKWfTw7r2THotVbkba0JZvErMNwTryvCtY
 3W1tVJmBi/6W2LBVkEbJHneguC1tQ6e8+poNDrcYIvxIdRnWGSWNW0xjUtCPX5pB
 HmEb5K8a/UWMxrZ8ZReGCsKKfXdIlFpQj23Xt/9IfxoR5UmWna1/BuarlhA0063y
 QT8kXv54koIhC08Tn55yaUvK8tcUGqr/3x3VXL8n//0QRdI9weT8ouoqodJ80MmW
 AgFm1A0MzJRrm1gdtB6pusgCqalXoKfOuxI7EhazTdBBAcHEdp6+j3t0k73FxPjq
 ZXXFpZjGleYaKMqBSU80a/uW/DRELyvPorowJPUN9hGrvXtYx2cPYzbUI3uCJKHb
 6lfCe72igM/0LSpbKCysTUNE2gjYESELrmEePSsaNpYbjhzKIoB86+SVpjgekucC
 Hpo8PCyoggTaxCgPapd4zJVLStF7UHAX0fnrFQkDCn4bA1iULQCXS4gI1ie1DKBY
 imKW26bGPjaZKIT5GTJYiUeff5MBj9SHkq1OdhySJaEz1tJXQFeO3HNd87mKeGUB
 8PJXDh0ryXtcXA5ygGOc
 =jcKN
 -----END PGP SIGNATURE-----

Merge tag 'xtensa-next-20160320' of git://github.com/czankel/xtensa-linux

Pull Xtensa updates from Chris Zankel:
 "Xtensa improvements for 4.6:

   - control whether perf IRQ is treated as NMI from Kconfig
   - implement ioremap for regions outside KIO segment
   - fix ISS serial port behaviour when EOF is reached
   - fix preemption in {clear,copy}_user_highpage
   - fix endianness issues for XTFPGA devices, big-endian cores are now
     fully functional
   - clean up debug infrastructure and add support for hardware
     breakpoints and watchpoints
   - add processor configurations for Three Core HiFi-2 MX and HiFi3
     cpus"

* tag 'xtensa-next-20160320' of git://github.com/czankel/xtensa-linux:
  xtensa: add test_kc705_hifi variant
  xtensa: add Three Core HiFi-2 MX Variant.
  xtensa: support hardware breakpoints/watchpoints
  xtensa: use context structure for debug exceptions
  xtensa: remove remaining non-functional KGDB bits
  xtensa: clear all DBREAKC registers on start
  xtensa: xtfpga: fix earlycon endianness
  xtensa: xtfpga: fix i2c controller register width and endianness
  xtensa: xtfpga: fix ethernet controller endianness
  xtensa: xtfpga: fix serial port register width and endianness
  xtensa: define CONFIG_CPU_{BIG,LITTLE}_ENDIAN
  xtensa: fix preemption in {clear,copy}_user_highpage
  xtensa: ISS: don't hang if stdin EOF is reached
  xtensa: support ioremap for memory outside KIO region
  xtensa: use XTENSA_INT_LEVEL macro in asm/timex.h
  xtensa: make fake NMI configurable
2016-03-20 12:22:07 -07:00
Max Filippov c91e02bd97 xtensa: support hardware breakpoints/watchpoints
Use perf framework to manage hardware instruction and data breakpoints.
Add two new ptrace calls: PTRACE_GETHBPREGS and PTRACE_SETHBPREGS to
query and set instruction and data breakpoints.
Address bit 0 choose instruction (0) or data (1) break register, bits
31..1 are the register number.
Both calls transfer two 32-bit words: address (0) and control (1).
Instruction breakpoint contorl word is 0 to clear breakpoint, 1 to set.
Data breakpoint control word bit 31 is 'trigger on store', bit 30 is
'trigger on load, bits 29..0 are length. Length 0 is used to clear a
breakpoint. To set a breakpoint length must be a power of 2 in the range
1..64 and the address must be length-aligned.

Introduce new thread_info flag: TIF_DB_DISABLED. Set it if debug
exception is raised by the kernel code accessing watched userspace
address and disable corresponding data breakpoint. On exit to userspace
check that flag and, if set, restore all data breakpoints.

Handle debug exceptions raised with PS.EXCM set. This may happen when
window overflow/underflow handler or fast exception handler hits data
breakpoint, in which case save and disable all data breakpoints,
single-step faulting instruction and restore data breakpoints.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2016-03-11 08:53:32 +00:00
Bjorn Helgaas e7e127e3c7 PCI: Include pci/hotplug Kconfig directly from pci/Kconfig
Include pci/hotplug/Kconfig directly from pci/Kconfig, so arches don't
have to source both pci/Kconfig and pci/hotplug/Kconfig.

Note that this effectively adds pci/hotplug/Kconfig to the following
arches, because they already sourced drivers/pci/Kconfig but they
previously did not source drivers/pci/hotplug/Kconfig:

  alpha
  arm
  avr32
  frv
  m68k
  microblaze
  mn10300
  sparc
  unicore32

Inspired-by-patch-from: Bogicevic Sasa <brutallesale@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2016-03-08 15:10:48 -06:00
Christoph Hellwig e1c7e32453 dma-mapping: always provide the dma_map_ops based implementation
Move the generic implementation to <linux/dma-mapping.h> now that all
architectures support it and remove the HAVE_DMA_ATTR Kconfig symbol now
that everyone supports them.

[valentinrothberg@gmail.com: remove leftovers in Kconfig]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
Cc: Chris Metcalf <cmetcalf@ezchip.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Helge Deller <deller@gmx.de>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
Cc: Ley Foon Tan <lftan@altera.com>
Cc: Mark Salter <msalter@redhat.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Steven Miao <realmz6@gmail.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Joerg Roedel <jroedel@suse.de>
Cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-01-20 17:09:18 -08:00
Max Filippov e462919413 xtensa: make fake NMI configurable
Do not always use fake NMI when safe, provide Kconfig option instead.
Print a warning if fake NMI is chosen in unsafe configuration, but allow
it, because it may work if the user knows that interrupts with
priorities at or above PMM IRQ are not used. Add a check to NMI handler
that BUGs if any of these IRQs fire.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2016-01-11 17:31:55 +03:00
Max Filippov a9df9338c1 xtensa: add FORCE_MAX_ZONEORDER to Kconfig
Make maximal memory allocation order configurable, so that drivers could
allocate huge buffers when they need to.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2015-11-03 17:19:37 +03:00
Max Filippov d951ba21b9 xtensa: nommu: select HAVE_FUTEX_CMPXCHG
Not having HAVE_FUTEX_CMPXCHG makes futex_detect_cmpxchg probe
cmpxchg_futex_value_locked with NULL address. It's not guaranteed to
fault without MMU, instead it locks up on Xtensa when there's no RAM at
address 0.

Select HAVE_FUTEX_CMPXCHG in noMMU Xtensa configurations.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2015-11-02 18:03:07 +03:00
Max Filippov d9eb3cb248 xtensa: nommu: fix default memory start address
RAM starts at 0x60000000 on noMMU cores, not at 0x40000000. Fix the
default.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2015-11-02 18:03:05 +03:00
Max Filippov 9bd46da45e xtensa: implement counting and sampling perf events
Xtensa Performance Monitor Module has up to 8 32 bit wide performance
counters. Each counter may be enabled independently and can count any
single type of hardware performance events. Event counting may be enabled
and disabled globally (per PMM).
Each counter has status register with bits indicating if the counter has
been overflown and may be programmed to raise profiling IRQ on overflow.
This IRQ is used to rewind counters and allow for counting more than 2^32
samples for counting events and to report samples for sampling events.

For more details see Tensilica Debug User's Guide, chapter 8
"Performance monitor module".

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2015-08-17 07:33:30 +03:00
Max Filippov db8165f5d9 xtensa: select PERF_USE_VMALLOC for cache-aliasing configurations
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2015-08-17 07:32:51 +03:00
Max Filippov de7c1c7862 xtensa: clean up Kconfig dependencies for custom cores
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2015-08-17 07:32:46 +03:00
Max Filippov c75959a6da xtensa: reimplement DMA API using common helpers
- keep existing functionality: don't handle attributes, don't support
  high memory;
- implement scatterlist primitives (map/unmap/sync);
- enable DMA API debug.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2015-08-17 07:31:00 +03:00
Linus Torvalds cb8a4deaf9 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial tree updates from Jiri Kosina:
 "As usual, mostly comment, kerneldoc and printk() fixes"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial:
  lpfc: Grammar s/an negative/a negative/
  ARM: lib/lib1funcs.S: fix typo s/substractions/subtractions/
  cx25821: cx25821-medusa-reg.h: fix 0x0x prefix
  lib: crc-itu-t.[ch] fix 0x0x prefix in integer constants
  rapidio: Fix kerneldoc and comment
  qla4xxx: Fix printk() in qla4_83xx_read_reset_template() and qla4_83xx_pre_loopback_config()
  treewide: Kconfig: fix wording / spelling
  usb/serial: fix grammar in Kconfig help text for FTDI_SIO
  megaraid_sas: fix kerneldoc
  netfilter: ebtables: fix comment grammar
  drm/radeon: fix comment
  isdn: fix grammar in comment
  ARM: KVM: fix comment
2015-06-23 14:08:54 -07:00
Masanari Iida 769a12a9c7 treewide: Kconfig: fix wording / spelling
This patch fix spelling typos in Kconfig.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2015-05-26 15:17:35 +02:00
Max Filippov 4949009eb8 xtensa: xtfpga: fix hardware lockup caused by LCD driver
LCD driver is always built for the XTFPGA platform, but its base address
is not configurable, and is wrong for ML605/KC705. Its initialization
locks up KC705 board hardware.

Make the whole driver optional, and its base address and bus width
configurable. Implement 4-bit bus access method.

Cc: stable@vger.kernel.org
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2015-02-27 07:55:29 +03:00
Chris Zankel 2cb54e8493 Xtensa improvements for 3.19:
- fix permissions for kmapped pages so that copy_to_user_page works with
   them;
 - add power management menu to Kconfig to allow use of runtime PM.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUi7VsAAoJEFH5zJH4P6BEpS8P/jsHzgGyaCmvr8MI+I6wImIt
 orEhkxOYQS4aBAi/azupTPYbu8r2I8+yscWtFxBnvJok3rT2yMtSJZFLUhur0nG4
 DQwQduMeHbzSC4ADqJBalfaOfpcwz/GQoM6IPVZEEW6h4vzCvUm0O1Wq5Z1Thbg2
 skMmVFIX2+YTwUrEKMEqbl1JevNzNH53t/tlTgiXOMkZWwL1R4ToRsFHv9zpIJ1m
 Srm0BWAXAM+h1vx1Pv2vwmTcgPj3MdBccsla/HAybeQraqThdlgAz9Cnk5T5AdWE
 6rLy9mw+LiT1kXnbl4Z526NBzvkf+5+xYiGqI3UwohhFEChq74PBPQnZlpZ2AGlG
 dI/i9CoV0uQgU3rRDvS9NNFXXW59objKIu8f2Od5pS4kgV+mPjKePVTJbchXIf5n
 MC7Dq2GcM8jK4/Q32aHNxDi9jM3jukd7pJHbyxOo0g1SpmSEnNSJ+CcOV5ft6nLB
 xIohvVXg8Om976Xbl6eRii7lNdCZm8j7mDNMl37lwaqitIgZmlGeRhAyYCnjC1Pl
 mxtORfQbGfUHw/o8TlhyINBNQdpLr0CRTL4HCrMyiDDQ0mJH3bMBKuSk7y0Qe8DG
 aJ8Om29CKvawr3irehNRsZiSfoqiPG6F/GzfFxfgSut/AKAMI25kMSoGZCjBMhHn
 76+jWe4WzygZCAUWzmsl
 =9vUt
 -----END PGP SIGNATURE-----

Merge tag 'xtensa-for-next-20141213' of git://github.com/jcmvbkbc/linux-xtensa into for_next

Xtensa improvements for 3.19:

- fix permissions for kmapped pages so that copy_to_user_page works with
  them;
- add power management menu to Kconfig to allow use of runtime PM.
2014-12-15 20:10:39 -08:00
Max Filippov e00d8b2f44 xtensa: add power management menu to Kconfig
This allows using runtime power management feature on Xtensa.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-12-09 03:22:51 +03:00
Daniel Glöckner 4006e565e1 xtensa: remove s6000 variant and s6105 platform
The Stretch s6000 family support has been merged into mainline 5 years
ago. There appear to be no users of this code since nobody complained
that there is a merge error preventing compilation.

Apart from the s6105 IP camera reference design there are no s6000 devices
known to ever have run Linux and as the chips are out of production there
probably never will be. The successor s7000 no longer uses an Xtensa core
for the OS.

Let's remove the code until someone is found who actually needs it.

Signed-off-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-10-21 13:29:01 +04:00
Max Filippov 3932b9ca55 xtensa: make PLATFORM_DEFAULT_MEM parameters configurable
This allows using xtfpga platform with both MMU and noMMU cores.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-10-21 13:28:59 +04:00
Max Filippov 2eabc1800d xtensa: nommu: set up cache and atomctl in initialize_mmu
initialize_mmu sets up atomctl SR which is needed for s32c1i to function
correctly even in noMMU configurations. It's also a good place to set up
caching attributes of physical memory.

Allow enabling INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX in noMMU
configurations for setting up atomctl and cache attributes.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-10-21 13:28:56 +04:00
Max Filippov 61e47e9b53 xtensa: xtfpga: only select ethoc when ethernet is available
Otherwise we get the following build warning:
    (XTENSA_PLATFORM_XTFPGA) selects ETHOC which has unmet direct
    dependencies (NETDEVICES && ETHERNET && HAS_IOMEM && HAS_DMA)

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-10-06 03:23:53 +04:00
Max Filippov 7a0684cdbd xtensa: ISS: add BLOCK dependency to BLK_DEV_SIMDISK
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-10-06 03:23:51 +04:00
Max Filippov 9184289c97 xtensa: deprecate fast_xtensa and fast_spill_registers syscalls
These syscalls are not used by userspace tools for some time now, and
they have issues when called with invalid arguments. It's not worth
changing signal delivery mechanism as we don't expect any new users for
these syscalls. Let's keep them for backwards compatibility under #ifdef,
disabled by default.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-08-14 11:59:33 +04:00
Max Filippov ad4a96b418 xtensa: remove orphan MATH_EMULATION symbol
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-08-14 11:59:12 +04:00
Max Filippov 4964527da8 xtensa: select HAVE_IDE only on platforms that may have it
HAVE_IDE is not a property of architecture but of a platform, and neither
ISS or XTFPGA support it.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-08-14 11:59:11 +04:00
Max Filippov 920f8a3965 xtensa: sort 'select' statements in Kconfig
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-08-14 11:59:10 +04:00
Max Filippov 8a9de05954 xtensa: make MMU-related configuration options depend on MMU
MMUv3 and HIGHMEM support are available only on configurations with MMU,
don't show them otherwise.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-08-14 11:59:09 +04:00
Max Filippov 420ae95184 xtensa: simplify addition of new core variants
Instead of adding new Kconfig options and Makefile rules for each new
core variant provide XTENSA_VARIANT_CUSTOM variant and record variant
name in the XTENSA_VARIANT_NAME variable. Adding new core variant now
means providing directory structure under arch/xtensa/variant and
specifying correct name in kernel configuration.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-08-14 11:59:08 +04:00
Linus Torvalds 03787ff6f9 Xtensa patchset for v3.15.
Fixes allmodconfig, allnoconfig builds
 Adds highmem support
 Enables build-time exception table sorting.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJTZ7iuAAoJEI9vqH3mFV2snKYP/AqEdj9JtWxg0MfB+mllOBmu
 nyhBW/AuVnsymy+WkOomJkxrUFAK+XTMfiOs45tdiW1dN2uJXIJ388C9pKLKtf6K
 vWzetOE6PbVusHuOQp6G+/jpjMwFZWeVvfWZ/DuvayjrAf281UENAD/4Wlmzakgw
 Qu/Qx+iQHfseMj/WdQ6N4C+zH0fjqpI6LwKkrWQ4x51tB7H9fMq9qS49BJ7WlxNg
 s+BQ44Qc71a5YZVwuH2mk8UqWRgCLYao+Ptp2z+buRmyz04kXvNWeVAHw2oSdeTr
 ug4pPPlSAdcid5fWhFOgmkvCSs1pw+fdi7honUQHmpGZRiwUdXHctlzgf4OUZjnX
 bsGeQ/klAmni8Ufgu0Ue+WIg7hvJUoE+AY7qp+Q32d0ln09FA89fitlb9WTT9zdq
 Y+6q7C/QPSqEoGe8GaLrE2o7tWqOlQ4Gd8ukbhwLNK3nInluT4PJkuknD+0s0Gmx
 Dc6+YXrUxMu+w0QoQ1aHrMVoAg4V3EtG7pFav3vW8jwhRaLO0hwEBlDPcQsAdoTt
 250FYwL3TQoKRr3+j3OfjJBuQ61PfkEPjPfqJL5htkVQ2nZKsmyGnyWUs15ZbAiT
 bxT5CLrEH7rgvM1mL86TJqEu0IEYkaEnkCMHS7EYWRL7bRRHRRkNO8HmEJIwtWa0
 0Io96EHboIFq3J+kWTnn
 =mD84
 -----END PGP SIGNATURE-----

Merge tag 'xtensa-next-20140503' of git://github.com/czankel/xtensa-linux

Pull Xtensa fixes from Chris Zankel:
 - Fixes allmodconfig, allnoconfig builds
 - Adds highmem support
 - Enables build-time exception table sorting.

* tag 'xtensa-next-20140503' of git://github.com/czankel/xtensa-linux:
  xtensa: ISS: don't depend on CONFIG_TTY
  xtensa: xt2000: drop redundant sysmem initialization
  xtensa: add support for KC705
  xtensa: xtfpga: introduce SoC I/O bus
  xtensa: add HIGHMEM support
  xtensa: optimize local_flush_tlb_kernel_range
  xtensa: dump sysmem from the bootmem_init
  xtensa: handle memmap kernel option
  xtensa: keep sysmem banks ordered in mem_reserve
  xtensa: keep sysmem banks ordered in add_sysmem_bank
  xtensa: split bootparam and kernel meminfo
  xtensa: enable sorting extable at build time
  xtensa: export __{invalidate,flush}_dcache_range
  xtensa: Export __invalidate_icache_range
2014-05-05 15:36:59 -07:00
Max Filippov 55b441be5c xtensa: ISS: don't depend on CONFIG_TTY
Build console support only when CONFIG_TTY is selected.
This restores ISS as the default platform for allnoconfig builds.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
2014-05-05 09:04:10 -07:00
Uwe Kleine-König ce816fa88c Kconfig: rename HAS_IOPORT to HAS_IOPORT_MAP
If the renamed symbol is defined lib/iomap.c implements ioport_map and
ioport_unmap and currently (nearly) all platforms define the port
accessor functions outb/inb and friend unconditionally.  So
HAS_IOPORT_MAP is the better name for this.

Consequently NO_IOPORT is renamed to NO_IOPORT_MAP.

The motivation for this change is to reintroduce a symbol HAS_IOPORT
that signals if outb/int et al are available.  I will address that at
least one merge window later though to keep surprises to a minimum and
catch new introductions of (HAS|NO)_IOPORT.

The changes in this commit were done using:

	$ git grep -l -E '(NO|HAS)_IOPORT' | xargs perl -p -i -e 's/\b((?:CONFIG_)?(?:NO|HAS)_IOPORT)\b/$1_MAP/'

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-04-07 16:36:11 -07:00
Max Filippov 6555910065 xtensa: add HIGHMEM support
Introduce fixmap area just below the vmalloc region. Use it for atomic
mapping of high memory pages.
High memory on cores with cache aliasing is not supported and is still
to be implemented. Fail build for such configurations for now.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-04-06 21:29:21 +04:00
Max Filippov 25df8198f4 xtensa: enable sorting extable at build time
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Acked-by: David Daney <ddaney.cavm@gmail.com>
2014-04-02 01:35:50 +04:00
Max Filippov bda8932d23 xtensa: support common clock framework
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-02-21 21:33:42 +04:00
Paul Bolle 4e3b4df839 xtensa: no need to select USE_GENERIC_SMP_HELPERS
Commit f615136c06 ("xtensa: add SMP support") added "select
USE_GENERIC_SMP_HELPERS". But the Kconfig symbol USE_GENERIC_SMP_HELPERS
was already removed in v3.13, so that select is a nop. Drop it.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-02-21 21:33:41 +04:00
Max Filippov 8e9356c614 xtensa: fsf: drop nonexistent GPIO32 support
The toolchain for xtensa FSF core never supported GPIO32, drop it on the
linux side too.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
2014-02-21 21:33:40 +04:00
Linus Torvalds 9b83d851a2 Xtensa patchset for 3.14-rc1
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJS4dWNAAoJEI9vqH3mFV2sargP/RCdVvdJm3TxYcNYoKAw6kTs
 wn1AWQ1vnu77YIoG2YamWytakahvB5v4Elm5UbHc49eCIFb/+wJpvxLNKbAtY0EP
 bRllFETalWnPnZO0R0tTvEikpDfzM7/OGYCjuOmTeyata6/KOxVsusTjvar28NPA
 gVp9BwHKZyk5NORkvW3RBRbfga9slUXqbg4rPhD3gFxLpe8aGuO6T6HazBfRadQM
 pI0zq2VE59LSEyuZrreHiq5EYvmp+eBFR8bJhQp1lnpKc4lMJm5JKYPY+jlPPtu0
 bPYLexjb42Gz2KbDtqLqTnd6GEPj50RS15tr9BTX9n3uCd0sIBO46K5FXVy+ALxr
 DXbyU6R1miZ01Il0A2IuC2j1cVdXb7nSytP35lLRQ9WCXua4HwQO0LL9KPAf9N0X
 WKlNPEkOr9XR9lO/1JcYVZgsygF/hHGgImf5AEfTVdtWpAj3bhMBhqFuKo0/h6vr
 7PwQCTaiL2Hks+d8YS2VyrQy3DMg48MbYmfdriJQFKKzhdyHEhvlnawP5uoIVfAC
 s43cvj6EsbUdRULf5qKDupQFJpM15qpmYiLizHFIfUTiTQGI0WMaA76rZMqZ2AsQ
 z0q2edzUV8nBQFdR74eKKPF1QJyXihiaXzug+SZqPdvXKfjPrF+5eZ7/EvuaEBZy
 qS7PIt5nkTeZ4stP/SWV
 =JT1d
 -----END PGP SIGNATURE-----

Merge tag 'xtensa-next-20140123' of git://github.com/czankel/xtensa-linux

Pull Xtensa patches from Chris Zankel:
 "The major changes are adding support for SMP for Xtensa, fixing and
  cleaning up the ISS (simulator) network driver, and better support for
  device trees"

* tag 'xtensa-next-20140123' of git://github.com/czankel/xtensa-linux: (40 commits)
  xtensa: implement ndelay
  xtensa: clean up udelay
  xtensa: enable HAVE_PERF_EVENTS
  xtensa: remap io area defined in device tree
  xtensa: support default device tree buses
  xtensa: initialize device tree clock sources
  xtensa: xtfpga: fix definitions of platform devices
  xtensa: standardize devicetree cpu compatible strings
  xtensa: avoid duplicate of IO range definitions
  xtensa: fix ATOMCTL register documentation
  xtensa: Enable irqs after cpu is set online
  xtensa: ISS: raise network polling rate to 10 times/sec
  xtensa: remove unused XTENSA_ISS_NETWORK Kconfig parameter
  xtensa: ISS: avoid simple_strtoul usage
  xtensa: Switch to sched_clock_register()
  xtensa: implement CPU hotplug
  xtensa: add SMP support
  xtensa: add MX irqchip
  xtensa: clear timer IRQ unconditionally in its handler
  xtensa: clean up do_interrupt/do_IRQ
  ...
2014-01-25 10:49:30 -08:00
Baruch Siach a6f3eefad8 xtensa: enable HAVE_PERF_EVENTS
This allows the perf tool to monitor kernel tracepoint events.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-01-15 00:27:03 +04:00
Michael Opdenacker fa72e6bbad xtensa: remove unused XTENSA_ISS_NETWORK Kconfig parameter
This removes the XTENSA_ISS_NETWORK Kconfig parameter,
which was no longer used anywhere in the source code
and Makefiles.

Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-01-14 23:57:02 +04:00
Max Filippov 49b424feda xtensa: implement CPU hotplug
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
2014-01-14 10:19:59 -08:00
Max Filippov f615136c06 xtensa: add SMP support
This is largely based on SMP code from the xtensa-2.6.29-smp tree by
Piet Delaney, Marc Gauthier, Joe Taylor, Christian Zankel (and possibly
other Tensilica folks).

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
2014-01-14 10:19:58 -08:00
Max Filippov 496543c4f1 xtensa: enable HAVE_IRQ_TIME_ACCOUNTING
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
2014-01-14 10:19:54 -08:00
Baruch Siach a1a2bdec47 gpio: xtensa: depend on HAVE_XTENSA_GPIO32
Prevent build failure when the selected variant does not support GPIO32.

Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2014-01-07 18:58:19 +01:00
Martin Schwidefsky 0244ad004a Remove GENERIC_HARDIRQ config option
After the last architecture switched to generic hard irqs the config
options HAVE_GENERIC_HARDIRQS & GENERIC_HARDIRQS and the related code
for !CONFIG_GENERIC_HARDIRQS can be removed.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-09-13 15:09:52 +02:00
Max Filippov 478ba61afc xtensa: add static function tracer support
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
2013-07-08 01:18:57 -07:00