forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 ...
- Loading branch information
Showing
113 changed files
with
12,726 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5359,6 +5359,12 @@ F: fs/qnx4/ | |
F: include/linux/qnx4_fs.h | ||
F: include/linux/qnxtypes.h | ||
|
||
QUALCOMM HEXAGON ARCHITECTURE | ||
M: Richard Kuo <[email protected]> | ||
L: [email protected] | ||
S: Supported | ||
F: arch/hexagon/ | ||
|
||
RADOS BLOCK DEVICE (RBD) | ||
F: include/linux/qnxtypes.h | ||
M: Yehuda Sadeh <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,220 @@ | ||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
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 |
Oops, something went wrong.