Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c87d5d59 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge Qualcom Hexagon architecture

This is the fifth version of the patchset (with one tiny whitespace fix)
to the Linux kernel to support the Qualcomm Hexagon architecture.

Between now and the next pull requests, Richard Kuo should have his key
signed, etc., and should be back on kernel.org.  In the meantime, this
got merged as a emailed patch-series.

* Hexagon: (36 commits)
  Add extra arch overrides to asm-generic/checksum.h
  Hexagon: Add self to MAINTAINERS
  Hexagon: Add basic stacktrace functionality for Hexagon architecture.
  Hexagon: Add configuration and makefiles for the Hexagon architecture.
  Hexagon: Comet platform support
  Hexagon: kgdb support files
  Hexagon: Add page-fault support.
  Hexagon: Add page table header files & etc.
  Hexagon: Add ioremap support
  Hexagon: Provide DMA implementation
  Hexagon: Implement basic TLB management routines for Hexagon.
  Hexagon: Implement basic cache-flush support
  Hexagon: Provide basic implementation and/or stubs for I/O routines.
  Hexagon: Add user access functions
  Hexagon: Add locking types and functions
  Hexagon: Add SMP support
  Hexagon: Provide basic debugging and system trap support.
  Hexagon: Add ptrace support
  Hexagon: Add time and timer functions
  Hexagon: Add interrupts
  ...
parents 094803e0 4e29198e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -5359,6 +5359,12 @@ F: fs/qnx4/
F:	include/linux/qnx4_fs.h
F:	include/linux/qnxtypes.h

QUALCOMM HEXAGON ARCHITECTURE
M:	Richard Kuo <rkuo@codeaurora.org>
L:	linux-hexagon@vger.kernel.org
S:	Supported
F:	arch/hexagon/

RADOS BLOCK DEVICE (RBD)
F:	include/linux/qnxtypes.h
M:	Yehuda Sadeh <yehuda@hq.newdream.net>

arch/hexagon/Kconfig

0 → 100644
+220 −0
Original line number Diff line number Diff line
# Hexagon configuration
comment "Linux Kernel Configuration for Hexagon"

config HEXAGON
	def_bool y
	select HAVE_OPROFILE
	select USE_GENERIC_SMP_HELPERS if SMP
	# Other pending projects/to-do items.
	# select HAVE_REGS_AND_STACK_ACCESS_API
	# select HAVE_HW_BREAKPOINT if PERF_EVENTS
	# select ARCH_HAS_CPU_IDLE_WAIT
	# select ARCH_WANT_OPTIONAL_GPIOLIB
	# select ARCH_REQUIRE_GPIOLIB
	# select HAVE_CLK
	# select IRQ_PER_CPU
	select HAVE_IRQ_WORK
	# select GENERIC_PENDING_IRQ if SMP
	select GENERIC_ATOMIC64
	select HAVE_PERF_EVENTS
	select HAVE_GENERIC_HARDIRQS
	select GENERIC_HARDIRQS_NO__DO_IRQ
	select GENERIC_HARDIRQS_NO_DEPRECATED
	# GENERIC_ALLOCATOR is used by dma_alloc_coherent()
	select GENERIC_ALLOCATOR
	select GENERIC_IRQ_SHOW
	select HAVE_ARCH_KGDB
	select HAVE_ARCH_TRACEHOOK
	select NO_IOPORT
	# mostly generic routines, with some accelerated ones
	---help---
	  Qualcomm Hexagon is a processor architecture designed for high
	  performance and low power across a wide variety of applications.

config HEXAGON_ARCH_V1
	bool

config HEXAGON_ARCH_V2
	bool

config HEXAGON_ARCH_V3
	bool

config HEXAGON_ARCH_V4
	bool

config FRAME_POINTER
	def_bool y

config LOCKDEP_SUPPORT
	def_bool y

config PCI
	def_bool n

config EARLY_PRINTK
	def_bool y

config KTIME_SCALAR
	def_bool y

config MMU
	def_bool y

config TRACE_IRQFLAGS_SUPPORT
	def_bool y

config GENERIC_CSUM
	def_bool y

#
# Use the generic interrupt handling code in kernel/irq/:
#
config GENERIC_IRQ_PROBE
	def_bool y

config GENERIC_IOMAP
	def_bool y

#config ZONE_DMA
#	bool
#	default y

config HAS_DMA
	bool
	select HAVE_DMA_ATTRS
	default y

config NEED_SG_DMA_LENGTH
	def_bool y

config RWSEM_GENERIC_SPINLOCK
	def_bool n

config RWSEM_XCHGADD_ALGORITHM
	def_bool y

config GENERIC_FIND_NEXT_BIT
	def_bool y

config GENERIC_HWEIGHT
	def_bool y

config GENERIC_TIME
	def_bool y

config GENERIC_CLOCKEVENTS
	def_bool y

config GENERIC_CLOCKEVENTS_BROADCAST
	def_bool y

config STACKTRACE_SUPPORT
	def_bool y
	select STACKTRACE

config GENERIC_BUG
	def_bool y
	depends on BUG

config BUG
	def_bool y

menu "Machine selection"

choice
	prompt "System type"
	default HEXAGON_ARCH_V2

config HEXAGON_COMET
	bool "Comet Board"
	select HEXAGON_ARCH_V2
	---help---
	  Support for the Comet platform.

endchoice

config HEXAGON_VM
	def_bool y

config CMDLINE
	string "Default kernel command string"
	default ""
	help
	  On some platforms, there is currently no way for the boot loader
	  to pass arguments to the kernel. For these, you should supply some
	  command-line options at build time by entering them here.  At a
	  minimum, you should specify the memory size and the root device
	  (e.g., mem=64M root=/dev/nfs).

config HEXAGON_ANGEL_TRAPS
	bool "Use Angel Traps"
	default n
	---help---
	  Enable angel debug traps (for printk's).

config SMP
	bool "Multi-Processing support"
	---help---
	  Enables SMP support in the kernel.  If unsure, say "Y"

config NR_CPUS
	int "Maximum number of CPUs" if SMP
	range 2 6 if SMP
	default "1" if !SMP
	default "6" if SMP
	---help---
	  This allows you to specify the maximum number of CPUs which this
	  kernel will support.  The maximum supported value is 6 and the
	  minimum value which makes sense is 2.

	  This is purely to save memory - each supported CPU adds
	  approximately eight kilobytes to the kernel image.

choice
	prompt "Kernel page size"
	default PAGE_SIZE_4KB
	---help---
	  Changes the default page size; use with caution.

config PAGE_SIZE_4KB
	bool "4KB"

config PAGE_SIZE_16KB
	bool "16KB"

config PAGE_SIZE_64KB
	bool "64KB"

config PAGE_SIZE_256KB
	bool "256KB"

endchoice

source "mm/Kconfig"

source "kernel/Kconfig.hz"
source "kernel/time/Kconfig"

config GENERIC_GPIO
	bool "Generic GPIO support"
	default n

endmenu

source "init/Kconfig"
source "drivers/Kconfig"
source "fs/Kconfig"

menu "Executable File Formats"
source "fs/Kconfig.binfmt"
endmenu

source "net/Kconfig"
source "security/Kconfig"
source "crypto/Kconfig"
source "lib/Kconfig"

menu "Kernel hacking"
source "lib/Kconfig.debug"
endmenu

arch/hexagon/Makefile

0 → 100644
+58 −0
Original line number Diff line number Diff line
#  Makefile for the Hexagon arch

KBUILD_DEFCONFIG = comet_defconfig

# Do not use GP-relative jumps
KBUILD_CFLAGS += -G0
LDFLAGS_vmlinux += -G0

# Do not use single-byte enums; these will overflow.
KBUILD_CFLAGS += -fno-short-enums

# Modules must use either long-calls, or use pic/plt.
# Use long-calls for now, it's easier.  And faster.
# CFLAGS_MODULE += -fPIC
# LDFLAGS_MODULE += -shared
CFLAGS_MODULE += -mlong-calls

cflags-$(CONFIG_HEXAGON_ARCH_V1) += $(call cc-option,-mv1)
cflags-$(CONFIG_HEXAGON_ARCH_V2) += $(call cc-option,-mv2)
cflags-$(CONFIG_HEXAGON_ARCH_V3) += $(call cc-option,-mv3)
cflags-$(CONFIG_HEXAGON_ARCH_V4) += $(call cc-option,-mv4)

aflags-$(CONFIG_HEXAGON_ARCH_V1) += $(call cc-option,-mv1)
aflags-$(CONFIG_HEXAGON_ARCH_V2) += $(call cc-option,-mv2)
aflags-$(CONFIG_HEXAGON_ARCH_V3) += $(call cc-option,-mv3)
aflags-$(CONFIG_HEXAGON_ARCH_V4) += $(call cc-option,-mv4)

ldflags-$(CONFIG_HEXAGON_ARCH_V1) += $(call cc-option,-mv1)
ldflags-$(CONFIG_HEXAGON_ARCH_V2) += $(call cc-option,-mv2)
ldflags-$(CONFIG_HEXAGON_ARCH_V3) += $(call cc-option,-mv3)
ldflags-$(CONFIG_HEXAGON_ARCH_V4) += $(call cc-option,-mv4)

KBUILD_CFLAGS += $(cflags-y)
KBUILD_AFLAGS += $(aflags-y)

#  no KBUILD_LDFLAGS?
LDFLAGS += $(ldflags-y)

# Thread-info register will be r19.  This value is not configureable;
# it is hard-coded in several files.
TIR_NAME := r19
KBUILD_CFLAGS += -ffixed-$(TIR_NAME) -DTHREADINFO_REG=$(TIR_NAME) -D__linux__
KBUILD_AFLAGS += -DTHREADINFO_REG=$(TIR_NAME)

LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
libs-y += $(LIBGCC)

head-y := arch/hexagon/kernel/head.o \
	arch/hexagon/kernel/init_task.o

core-y += arch/hexagon/kernel/ \
	arch/hexagon/mm/ \
	arch/hexagon/lib/

#	arch/hexagon/platform/common/
#
#core-$(CONFIG_HEXAGON_COMET)		+= arch/hexagon/platform/comet/
#machine-$(CONFIG_HEXAGON_COMET)		:= comet
+85 −0
Original line number Diff line number Diff line
CONFIG_SMP=y
CONFIG_DEFAULT_MMAP_MIN_ADDR=0
CONFIG_HZ_100=y
CONFIG_EXPERIMENTAL=y
CONFIG_CROSS_COMPILE="hexagon-"
CONFIG_LOCALVERSION="-smp"
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
CONFIG_TASKSTATS=y
CONFIG_TASK_DELAY_ACCT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=18
CONFIG_BLK_DEV_INITRD=y
CONFIG_EMBEDDED=y
# CONFIG_VM_EVENT_COUNTERS is not set
# CONFIG_BLK_DEV_BSG is not set
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
# CONFIG_STANDALONE is not set
CONFIG_CONNECTOR=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_NBD=y
CONFIG_NETDEVICES=y
CONFIG_MII=y
CONFIG_PHYLIB=y
CONFIG_NET_ETHERNET=y
# CONFIG_NETDEV_1000 is not set
# CONFIG_NETDEV_10000 is not set
# CONFIG_INPUT_MOUSEDEV is not set
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set
# CONFIG_SERIO is not set
# CONFIG_CONSOLE_TRANSLATIONS is not set
CONFIG_LEGACY_PTY_COUNT=64
# CONFIG_DEVKMEM is not set
# CONFIG_HW_RANDOM is not set
CONFIG_SPI=y
CONFIG_SPI_DEBUG=y
CONFIG_SPI_BITBANG=y
# CONFIG_HWMON is not set
# CONFIG_VGA_CONSOLE is not set
# CONFIG_HID_SUPPORT is not set
# CONFIG_USB_SUPPORT is not set
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
CONFIG_EXT3_FS=y
# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
CONFIG_QUOTA=y
CONFIG_PROC_KCORE=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
# CONFIG_MISC_FILESYSTEMS is not set
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_INET=y
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set
# CONFIG_INET_LRO is not set
# CONFIG_INET_DIAG is not set
# CONFIG_IPV6 is not set
CONFIG_CRYPTO_MD5=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
# CONFIG_CRYPTO_HW is not set
CONFIG_CRC_CCITT=y
CONFIG_CRC16=y
CONFIG_CRC_T10DIF=y
CONFIG_LIBCRC32C=y
CONFIG_FRAME_WARN=0
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_FS=y
# CONFIG_SCHED_DEBUG is not set
CONFIG_DEBUG_INFO=y
+58 −0
Original line number Diff line number Diff line
include include/asm-generic/Kbuild.asm

header-y += registers.h
header-y += ucontext.h
header-y += user.h

generic-y += auxvec.h
generic-y += bug.h
generic-y += bugs.h
generic-y += cpumask.h
generic-y += cputime.h
generic-y += current.h
generic-y += device.h
generic-y += div64.h
generic-y += emergency-restart.h
generic-y += errno.h
generic-y += fb.h
generic-y += fcntl.h
generic-y += ftrace.h
generic-y += hardirq.h
generic-y += hw_irq.h
generic-y += ioctl.h
generic-y += ioctls.h
generic-y += iomap.h
generic-y += ipcbuf.h
generic-y += ipc.h
generic-y += irq_regs.h
generic-y += kdebug.h
generic-y += kmap_types.h
generic-y += local64.h
generic-y += local.h
generic-y += local.h
generic-y += mman.h
generic-y += msgbuf.h
generic-y += pci.h
generic-y += percpu.h
generic-y += poll.h
generic-y += posix_types.h
generic-y += resource.h
generic-y += rwsem.h
generic-y += scatterlist.h
generic-y += sections.h
generic-y += segment.h
generic-y += sembuf.h
generic-y += shmbuf.h
generic-y += shmparam.h
generic-y += siginfo.h
generic-y += socket.h
generic-y += sockios.h
generic-y += statfs.h
generic-y += stat.h
generic-y += termbits.h
generic-y += termios.h
generic-y += topology.h
generic-y += types.h
generic-y += ucontext.h
generic-y += unaligned.h
generic-y += xor.h
Loading