Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm

Pull ARM updates from Russell King:

- add arch/arm/Kbuild from Masahiro Yamada.

- simplify act_mm macro, since it contains an open-coded
get_thread_info.

- VFP updates for Clang from Stefan Agner.

- Fix unwinder for Clang from Nathan Huckleberry.

- Remove unused it8152 PCI host controller, used by the removed cm-x2xx
platforms from Mike Rapoport.

- Further explanation of __range_ok().

- Remove kimage_voffset that isn't used anymore from Marc Zyngier.

- Drop ancient Thumb-2 workaround for old binutils from Ard Biesheuvel.

- Documentation cleanup for mach-* from Pete Zaitcev.

* tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
ARM: 8996/1: Documentation/Clean up the description of mach-<class>
ARM: 8995/1: drop Thumb-2 workaround for ancient binutils
ARM: 8994/1: mm: drop kimage_voffset which was only used by KVM
ARM: uaccess: add further explanation of __range_ok()
ARM: 8993/1: remove it8152 PCI controller driver
ARM: 8992/1: Fix unwind_frame for clang-built kernels
ARM: 8991/1: use VFP assembler mnemonics if available
ARM: 8990/1: use VFP assembler mnemonics in register load/store macros
ARM: 8989/1: use .fpu assembler directives instead of assembler arguments
ARM: 8982/1: mm: Simplify act_mm macro
ARM: 8981/1: add arch/arm/Kbuild

+116 -576
+2 -4
Documentation/arm/arm.rst
··· 184 184 We group machine (or platform) support code into machine classes. A 185 185 class typically based around one or more system on a chip devices, and 186 186 acts as a natural container around the actual implementations. These 187 - classes are given directories - arch/arm/mach-<class> and 188 - arch/arm/mach-<class> - which contain the source files to/include/mach 189 - support the machine class. This directories also contain any machine 190 - specific supporting code. 187 + classes are given directories - arch/arm/mach-<class> - which contain 188 + the source files and include/mach/ to support the machine class. 191 189 192 190 For example, the SA1100 class is based upon the SA1100 and SA1110 SoC 193 191 devices, and contains the code to support the way the on-board and off-
+11
arch/arm/Kbuild
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + obj-$(CONFIG_FPE_NWFPE) += nwfpe/ 3 + # Put arch/arm/fastfpe/ to use this. 4 + obj-$(CONFIG_FPE_FASTFPE) += $(patsubst $(srctree)/$(src)/%,%,$(wildcard $(srctree)/$(src)/fastfpe/)) 5 + obj-$(CONFIG_VFP) += vfp/ 6 + obj-$(CONFIG_XEN) += xen/ 7 + obj-$(CONFIG_VDSO) += vdso/ 8 + obj-y += kernel/ mm/ common/ 9 + obj-y += probes/ 10 + obj-y += net/ 11 + obj-y += crypto/
+2 -37
arch/arm/Kconfig
··· 1150 1150 help 1151 1151 Enable PCI on the BSE nanoEngine board. 1152 1152 1153 - config PCI_HOST_ITE8152 1154 - bool 1155 - depends on PCI && MACH_ARMCORE 1156 - default y 1157 - select DMABOUNCE 1158 - 1159 1153 config ARM_ERRATA_814220 1160 1154 bool "ARM errata: Cache maintenance by set/way operations can execute out of order" 1161 1155 depends on CPU_V7 ··· 1423 1429 Thumb-2 mode. 1424 1430 1425 1431 If unsure, say N. 1426 - 1427 - config THUMB2_AVOID_R_ARM_THM_JUMP11 1428 - bool "Work around buggy Thumb-2 short branch relocations in gas" 1429 - depends on THUMB2_KERNEL && MODULES 1430 - default y 1431 - help 1432 - Various binutils versions can resolve Thumb-2 branches to 1433 - locally-defined, preemptible global symbols as short-range "b.n" 1434 - branch instructions. 1435 - 1436 - This is a problem, because there's no guarantee the final 1437 - destination of the symbol, or any candidate locations for a 1438 - trampoline, are within range of the branch. For this reason, the 1439 - kernel does not support fixing up the R_ARM_THM_JUMP11 (102) 1440 - relocation in modules at all, and it makes little sense to add 1441 - support. 1442 - 1443 - The symptom is that the kernel fails with an "unsupported 1444 - relocation" error when loading some modules. 1445 - 1446 - Until fixed tools are available, passing 1447 - -fno-optimize-sibling-calls to gcc should prevent gcc generating 1448 - code which hits this problem, at the cost of a bit of extra runtime 1449 - stack usage in some cases. 1450 - 1451 - The problem is described in more detail at: 1452 - https://bugs.launchpad.net/binutils-linaro/+bug/725126 1453 - 1454 - Only Thumb-2 kernels are affected. 1455 - 1456 - Unless you are sure your tools don't have this problem, say Y. 1457 1432 1458 1433 config ARM_PATCH_IDIV 1459 1434 bool "Runtime patch udiv/sdiv instructions into __aeabi_{u}idiv()" ··· 2062 2099 if CRYPTO 2063 2100 source "arch/arm/crypto/Kconfig" 2064 2101 endif 2102 + 2103 + source "arch/arm/Kconfig.assembler"
+6
arch/arm/Kconfig.assembler
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + 3 + config AS_VFP_VMRS_FPINST 4 + def_bool $(as-instr,.fpu vfpv2\nvmrs r0$(comma)FPINST) 5 + help 6 + Supported by binutils >= 2.24 and LLVM integrated assembler.
+1 -15
arch/arm/Makefile
··· 123 123 ifeq ($(CONFIG_THUMB2_KERNEL),y) 124 124 CFLAGS_ISA :=-mthumb -Wa,-mimplicit-it=always $(AFLAGS_NOWARN) 125 125 AFLAGS_ISA :=$(CFLAGS_ISA) -Wa$(comma)-mthumb 126 - # Work around buggy relocation from gas if requested: 127 - ifeq ($(CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11),y) 128 - KBUILD_CFLAGS_MODULE +=-fno-optimize-sibling-calls 129 - endif 130 126 else 131 127 CFLAGS_ISA :=$(call cc-option,-marm,) $(AFLAGS_NOWARN) 132 128 AFLAGS_ISA :=$(CFLAGS_ISA) ··· 272 276 273 277 export TEXT_OFFSET GZFLAGS MMUEXT 274 278 275 - core-$(CONFIG_FPE_NWFPE) += arch/arm/nwfpe/ 276 - # Put arch/arm/fastfpe/ to use this. 277 - core-$(CONFIG_FPE_FASTFPE) += $(patsubst $(srctree)/%,%,$(wildcard $(srctree)/arch/arm/fastfpe/)) 278 - core-$(CONFIG_VFP) += arch/arm/vfp/ 279 - core-$(CONFIG_XEN) += arch/arm/xen/ 280 - core-$(CONFIG_VDSO) += arch/arm/vdso/ 281 - 279 + core-y += arch/arm/ 282 280 # If we have a machine-specific directory, then include it in the build. 283 - core-y += arch/arm/kernel/ arch/arm/mm/ arch/arm/common/ 284 - core-y += arch/arm/probes/ 285 - core-y += arch/arm/net/ 286 - core-y += arch/arm/crypto/ 287 281 core-y += $(machdirs) $(platdirs) 288 282 289 283 # For cleaning
-1
arch/arm/common/Makefile
··· 12 12 obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o 13 13 obj-$(CONFIG_SHARP_SCOOP) += scoop.o 14 14 obj-$(CONFIG_CPU_V7) += secure_cntvoff.o 15 - obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o 16 15 obj-$(CONFIG_MCPM) += mcpm_head.o mcpm_entry.o mcpm_platsmp.o vlock.o 17 16 CFLAGS_REMOVE_mcpm_entry.o = -pg 18 17 AFLAGS_mcpm_head.o := -march=armv7-a
-352
arch/arm/common/it8152.c
··· 1 - // SPDX-License-Identifier: GPL-2.0-only 2 - /* 3 - * linux/arch/arm/common/it8152.c 4 - * 5 - * Copyright Compulab Ltd, 2002-2007 6 - * Mike Rapoport <mike@compulab.co.il> 7 - * 8 - * The DMA bouncing part is taken from arch/arm/mach-ixp4xx/common-pci.c 9 - * (see this file for respective copyrights) 10 - * 11 - * Thanks to Guennadi Liakhovetski <gl@dsa-ac.de> for IRQ enumberation 12 - * and demux code. 13 - */ 14 - 15 - #include <linux/sched.h> 16 - #include <linux/kernel.h> 17 - #include <linux/pci.h> 18 - #include <linux/ptrace.h> 19 - #include <linux/interrupt.h> 20 - #include <linux/mm.h> 21 - #include <linux/init.h> 22 - #include <linux/ioport.h> 23 - #include <linux/irq.h> 24 - #include <linux/io.h> 25 - #include <linux/export.h> 26 - 27 - #include <asm/mach/pci.h> 28 - #include <asm/hardware/it8152.h> 29 - 30 - #define MAX_SLOTS 21 31 - 32 - static void it8152_mask_irq(struct irq_data *d) 33 - { 34 - unsigned int irq = d->irq; 35 - 36 - if (irq >= IT8152_LD_IRQ(0)) { 37 - __raw_writel((__raw_readl(IT8152_INTC_LDCNIMR) | 38 - (1 << (irq - IT8152_LD_IRQ(0)))), 39 - IT8152_INTC_LDCNIMR); 40 - } else if (irq >= IT8152_LP_IRQ(0)) { 41 - __raw_writel((__raw_readl(IT8152_INTC_LPCNIMR) | 42 - (1 << (irq - IT8152_LP_IRQ(0)))), 43 - IT8152_INTC_LPCNIMR); 44 - } else if (irq >= IT8152_PD_IRQ(0)) { 45 - __raw_writel((__raw_readl(IT8152_INTC_PDCNIMR) | 46 - (1 << (irq - IT8152_PD_IRQ(0)))), 47 - IT8152_INTC_PDCNIMR); 48 - } 49 - } 50 - 51 - static void it8152_unmask_irq(struct irq_data *d) 52 - { 53 - unsigned int irq = d->irq; 54 - 55 - if (irq >= IT8152_LD_IRQ(0)) { 56 - __raw_writel((__raw_readl(IT8152_INTC_LDCNIMR) & 57 - ~(1 << (irq - IT8152_LD_IRQ(0)))), 58 - IT8152_INTC_LDCNIMR); 59 - } else if (irq >= IT8152_LP_IRQ(0)) { 60 - __raw_writel((__raw_readl(IT8152_INTC_LPCNIMR) & 61 - ~(1 << (irq - IT8152_LP_IRQ(0)))), 62 - IT8152_INTC_LPCNIMR); 63 - } else if (irq >= IT8152_PD_IRQ(0)) { 64 - __raw_writel((__raw_readl(IT8152_INTC_PDCNIMR) & 65 - ~(1 << (irq - IT8152_PD_IRQ(0)))), 66 - IT8152_INTC_PDCNIMR); 67 - } 68 - } 69 - 70 - static struct irq_chip it8152_irq_chip = { 71 - .name = "it8152", 72 - .irq_ack = it8152_mask_irq, 73 - .irq_mask = it8152_mask_irq, 74 - .irq_unmask = it8152_unmask_irq, 75 - }; 76 - 77 - void it8152_init_irq(void) 78 - { 79 - int irq; 80 - 81 - __raw_writel((0xffff), IT8152_INTC_PDCNIMR); 82 - __raw_writel((0), IT8152_INTC_PDCNIRR); 83 - __raw_writel((0xffff), IT8152_INTC_LPCNIMR); 84 - __raw_writel((0), IT8152_INTC_LPCNIRR); 85 - __raw_writel((0xffff), IT8152_INTC_LDCNIMR); 86 - __raw_writel((0), IT8152_INTC_LDCNIRR); 87 - 88 - for (irq = IT8152_IRQ(0); irq <= IT8152_LAST_IRQ; irq++) { 89 - irq_set_chip_and_handler(irq, &it8152_irq_chip, 90 - handle_level_irq); 91 - irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE); 92 - } 93 - } 94 - 95 - void it8152_irq_demux(struct irq_desc *desc) 96 - { 97 - int bits_pd, bits_lp, bits_ld; 98 - int i; 99 - 100 - while (1) { 101 - /* Read all */ 102 - bits_pd = __raw_readl(IT8152_INTC_PDCNIRR); 103 - bits_lp = __raw_readl(IT8152_INTC_LPCNIRR); 104 - bits_ld = __raw_readl(IT8152_INTC_LDCNIRR); 105 - 106 - /* Ack */ 107 - __raw_writel((~bits_pd), IT8152_INTC_PDCNIRR); 108 - __raw_writel((~bits_lp), IT8152_INTC_LPCNIRR); 109 - __raw_writel((~bits_ld), IT8152_INTC_LDCNIRR); 110 - 111 - if (!(bits_ld | bits_lp | bits_pd)) { 112 - /* Re-read to guarantee, that there was a moment of 113 - time, when they all three were 0. */ 114 - bits_pd = __raw_readl(IT8152_INTC_PDCNIRR); 115 - bits_lp = __raw_readl(IT8152_INTC_LPCNIRR); 116 - bits_ld = __raw_readl(IT8152_INTC_LDCNIRR); 117 - if (!(bits_ld | bits_lp | bits_pd)) 118 - return; 119 - } 120 - 121 - bits_pd &= ((1 << IT8152_PD_IRQ_COUNT) - 1); 122 - while (bits_pd) { 123 - i = __ffs(bits_pd); 124 - generic_handle_irq(IT8152_PD_IRQ(i)); 125 - bits_pd &= ~(1 << i); 126 - } 127 - 128 - bits_lp &= ((1 << IT8152_LP_IRQ_COUNT) - 1); 129 - while (bits_lp) { 130 - i = __ffs(bits_lp); 131 - generic_handle_irq(IT8152_LP_IRQ(i)); 132 - bits_lp &= ~(1 << i); 133 - } 134 - 135 - bits_ld &= ((1 << IT8152_LD_IRQ_COUNT) - 1); 136 - while (bits_ld) { 137 - i = __ffs(bits_ld); 138 - generic_handle_irq(IT8152_LD_IRQ(i)); 139 - bits_ld &= ~(1 << i); 140 - } 141 - } 142 - } 143 - 144 - /* mapping for on-chip devices */ 145 - int __init it8152_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 146 - { 147 - if ((dev->vendor == PCI_VENDOR_ID_ITE) && 148 - (dev->device == PCI_DEVICE_ID_ITE_8152)) { 149 - if ((dev->class >> 8) == PCI_CLASS_MULTIMEDIA_AUDIO) 150 - return IT8152_AUDIO_INT; 151 - if ((dev->class >> 8) == PCI_CLASS_SERIAL_USB) 152 - return IT8152_USB_INT; 153 - if ((dev->class >> 8) == PCI_CLASS_SYSTEM_DMA) 154 - return IT8152_CDMA_INT; 155 - } 156 - 157 - return 0; 158 - } 159 - 160 - static unsigned long it8152_pci_dev_base_address(struct pci_bus *bus, 161 - unsigned int devfn) 162 - { 163 - unsigned long addr = 0; 164 - 165 - if (bus->number == 0) { 166 - if (devfn < PCI_DEVFN(MAX_SLOTS, 0)) 167 - addr = (devfn << 8); 168 - } else 169 - addr = (bus->number << 16) | (devfn << 8); 170 - 171 - return addr; 172 - } 173 - 174 - static int it8152_pci_read_config(struct pci_bus *bus, 175 - unsigned int devfn, int where, 176 - int size, u32 *value) 177 - { 178 - unsigned long addr = it8152_pci_dev_base_address(bus, devfn); 179 - u32 v; 180 - int shift; 181 - 182 - shift = (where & 3); 183 - 184 - __raw_writel((addr + where), IT8152_PCI_CFG_ADDR); 185 - v = (__raw_readl(IT8152_PCI_CFG_DATA) >> (8 * (shift))); 186 - 187 - *value = v; 188 - 189 - return PCIBIOS_SUCCESSFUL; 190 - } 191 - 192 - static int it8152_pci_write_config(struct pci_bus *bus, 193 - unsigned int devfn, int where, 194 - int size, u32 value) 195 - { 196 - unsigned long addr = it8152_pci_dev_base_address(bus, devfn); 197 - u32 v, vtemp, mask = 0; 198 - int shift; 199 - 200 - if (size == 1) 201 - mask = 0xff; 202 - if (size == 2) 203 - mask = 0xffff; 204 - 205 - shift = (where & 3); 206 - 207 - __raw_writel((addr + where), IT8152_PCI_CFG_ADDR); 208 - vtemp = __raw_readl(IT8152_PCI_CFG_DATA); 209 - 210 - if (mask) 211 - vtemp &= ~(mask << (8 * shift)); 212 - else 213 - vtemp = 0; 214 - 215 - v = (value << (8 * shift)); 216 - __raw_writel((addr + where), IT8152_PCI_CFG_ADDR); 217 - __raw_writel((v | vtemp), IT8152_PCI_CFG_DATA); 218 - 219 - return PCIBIOS_SUCCESSFUL; 220 - } 221 - 222 - struct pci_ops it8152_ops = { 223 - .read = it8152_pci_read_config, 224 - .write = it8152_pci_write_config, 225 - }; 226 - 227 - static struct resource it8152_io = { 228 - .name = "IT8152 PCI I/O region", 229 - .flags = IORESOURCE_IO, 230 - }; 231 - 232 - static struct resource it8152_mem = { 233 - .name = "IT8152 PCI memory region", 234 - .start = 0x10000000, 235 - .end = 0x13e00000, 236 - .flags = IORESOURCE_MEM, 237 - }; 238 - 239 - /* 240 - * The following functions are needed for DMA bouncing. 241 - * ITE8152 chip can address up to 64MByte, so all the devices 242 - * connected to ITE8152 (PCI and USB) should have limited DMA window 243 - */ 244 - static int it8152_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size) 245 - { 246 - dev_dbg(dev, "%s: dma_addr %08x, size %08x\n", 247 - __func__, dma_addr, size); 248 - return (dma_addr + size - PHYS_OFFSET) >= SZ_64M; 249 - } 250 - 251 - /* 252 - * Setup DMA mask to 64MB on devices connected to ITE8152. Ignore all 253 - * other devices. 254 - */ 255 - static int it8152_pci_platform_notify(struct device *dev) 256 - { 257 - if (dev_is_pci(dev)) { 258 - if (dev->dma_mask) 259 - *dev->dma_mask = (SZ_64M - 1) | PHYS_OFFSET; 260 - dev->coherent_dma_mask = (SZ_64M - 1) | PHYS_OFFSET; 261 - dmabounce_register_dev(dev, 2048, 4096, it8152_needs_bounce); 262 - } 263 - return 0; 264 - } 265 - 266 - static int it8152_pci_platform_notify_remove(struct device *dev) 267 - { 268 - if (dev_is_pci(dev)) 269 - dmabounce_unregister_dev(dev); 270 - 271 - return 0; 272 - } 273 - 274 - int dma_set_coherent_mask(struct device *dev, u64 mask) 275 - { 276 - if (mask >= PHYS_OFFSET + SZ_64M - 1) 277 - return 0; 278 - 279 - return -EIO; 280 - } 281 - 282 - int __init it8152_pci_setup(int nr, struct pci_sys_data *sys) 283 - { 284 - /* 285 - * FIXME: use pci_ioremap_io to remap the IO space here and 286 - * move over to the generic io.h implementation. 287 - * This requires solving the same problem for PXA PCMCIA 288 - * support. 289 - */ 290 - it8152_io.start = (unsigned long)IT8152_IO_BASE + 0x12000; 291 - it8152_io.end = (unsigned long)IT8152_IO_BASE + 0x12000 + 0x100000; 292 - 293 - sys->mem_offset = 0x10000000; 294 - sys->io_offset = (unsigned long)IT8152_IO_BASE; 295 - 296 - if (request_resource(&ioport_resource, &it8152_io)) { 297 - printk(KERN_ERR "PCI: unable to allocate IO region\n"); 298 - goto err0; 299 - } 300 - if (request_resource(&iomem_resource, &it8152_mem)) { 301 - printk(KERN_ERR "PCI: unable to allocate memory region\n"); 302 - goto err1; 303 - } 304 - 305 - pci_add_resource_offset(&sys->resources, &it8152_io, sys->io_offset); 306 - pci_add_resource_offset(&sys->resources, &it8152_mem, sys->mem_offset); 307 - 308 - if (platform_notify || platform_notify_remove) { 309 - printk(KERN_ERR "PCI: Can't use platform_notify\n"); 310 - goto err2; 311 - } 312 - 313 - platform_notify = it8152_pci_platform_notify; 314 - platform_notify_remove = it8152_pci_platform_notify_remove; 315 - 316 - return 1; 317 - 318 - err2: 319 - release_resource(&it8152_io); 320 - err1: 321 - release_resource(&it8152_mem); 322 - err0: 323 - return -EBUSY; 324 - } 325 - 326 - /* ITE bridge requires setting latency timer to avoid early bus access 327 - termination by PCI bus master devices 328 - */ 329 - void pcibios_set_master(struct pci_dev *dev) 330 - { 331 - u8 lat; 332 - 333 - /* no need to update on-chip OHCI controller */ 334 - if ((dev->vendor == PCI_VENDOR_ID_ITE) && 335 - (dev->device == PCI_DEVICE_ID_ITE_8152) && 336 - ((dev->class >> 8) == PCI_CLASS_SERIAL_USB)) 337 - return; 338 - 339 - pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat); 340 - if (lat < 16) 341 - lat = (64 <= pcibios_max_latency) ? 64 : pcibios_max_latency; 342 - else if (lat > pcibios_max_latency) 343 - lat = pcibios_max_latency; 344 - else 345 - return; 346 - printk(KERN_DEBUG "PCI: Setting latency timer of device %s to %d\n", 347 - pci_name(dev), lat); 348 - pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat); 349 - } 350 - 351 - 352 - EXPORT_SYMBOL(dma_set_coherent_mask);
-116
arch/arm/include/asm/hardware/it8152.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - /* 3 - * linux/include/arm/hardware/it8152.h 4 - * 5 - * Copyright Compulab Ltd., 2006,2007 6 - * Mike Rapoport <mike@compulab.co.il> 7 - * 8 - * ITE 8152 companion chip register definitions 9 - */ 10 - 11 - #ifndef __ASM_HARDWARE_IT8152_H 12 - #define __ASM_HARDWARE_IT8152_H 13 - 14 - #include <mach/irqs.h> 15 - 16 - extern void __iomem *it8152_base_address; 17 - 18 - #define IT8152_IO_BASE (it8152_base_address + 0x03e00000) 19 - #define IT8152_CFGREG_BASE (it8152_base_address + 0x03f00000) 20 - 21 - #define __REG_IT8152(x) (it8152_base_address + (x)) 22 - 23 - #define IT8152_PCI_CFG_ADDR __REG_IT8152(0x3f00800) 24 - #define IT8152_PCI_CFG_DATA __REG_IT8152(0x3f00804) 25 - 26 - #define IT8152_INTC_LDCNIRR __REG_IT8152(0x3f00300) 27 - #define IT8152_INTC_LDPNIRR __REG_IT8152(0x3f00304) 28 - #define IT8152_INTC_LDCNIMR __REG_IT8152(0x3f00308) 29 - #define IT8152_INTC_LDPNIMR __REG_IT8152(0x3f0030C) 30 - #define IT8152_INTC_LDNITR __REG_IT8152(0x3f00310) 31 - #define IT8152_INTC_LDNIAR __REG_IT8152(0x3f00314) 32 - #define IT8152_INTC_LPCNIRR __REG_IT8152(0x3f00320) 33 - #define IT8152_INTC_LPPNIRR __REG_IT8152(0x3f00324) 34 - #define IT8152_INTC_LPCNIMR __REG_IT8152(0x3f00328) 35 - #define IT8152_INTC_LPPNIMR __REG_IT8152(0x3f0032C) 36 - #define IT8152_INTC_LPNITR __REG_IT8152(0x3f00330) 37 - #define IT8152_INTC_LPNIAR __REG_IT8152(0x3f00334) 38 - #define IT8152_INTC_PDCNIRR __REG_IT8152(0x3f00340) 39 - #define IT8152_INTC_PDPNIRR __REG_IT8152(0x3f00344) 40 - #define IT8152_INTC_PDCNIMR __REG_IT8152(0x3f00348) 41 - #define IT8152_INTC_PDPNIMR __REG_IT8152(0x3f0034C) 42 - #define IT8152_INTC_PDNITR __REG_IT8152(0x3f00350) 43 - #define IT8152_INTC_PDNIAR __REG_IT8152(0x3f00354) 44 - #define IT8152_INTC_INTC_TYPER __REG_IT8152(0x3f003FC) 45 - 46 - #define IT8152_GPIO_GPDR __REG_IT8152(0x3f00500) 47 - 48 - /* 49 - Interrupt controller per register summary: 50 - --------------------------------------- 51 - LCDNIRR: 52 - IT8152_LD_IRQ(8) PCICLK stop 53 - IT8152_LD_IRQ(7) MCLK ready 54 - IT8152_LD_IRQ(6) s/w 55 - IT8152_LD_IRQ(5) UART 56 - IT8152_LD_IRQ(4) GPIO 57 - IT8152_LD_IRQ(3) TIMER 4 58 - IT8152_LD_IRQ(2) TIMER 3 59 - IT8152_LD_IRQ(1) TIMER 2 60 - IT8152_LD_IRQ(0) TIMER 1 61 - 62 - LPCNIRR: 63 - IT8152_LP_IRQ(x) serial IRQ x 64 - 65 - PCIDNIRR: 66 - IT8152_PD_IRQ(14) PCISERR 67 - IT8152_PD_IRQ(13) CPU/PCI bridge target abort (h2pTADR) 68 - IT8152_PD_IRQ(12) CPU/PCI bridge master abort (h2pMADR) 69 - IT8152_PD_IRQ(11) PCI INTD 70 - IT8152_PD_IRQ(10) PCI INTC 71 - IT8152_PD_IRQ(9) PCI INTB 72 - IT8152_PD_IRQ(8) PCI INTA 73 - IT8152_PD_IRQ(7) serial INTD 74 - IT8152_PD_IRQ(6) serial INTC 75 - IT8152_PD_IRQ(5) serial INTB 76 - IT8152_PD_IRQ(4) serial INTA 77 - IT8152_PD_IRQ(3) serial IRQ IOCHK (IOCHKR) 78 - IT8152_PD_IRQ(2) chaining DMA (CDMAR) 79 - IT8152_PD_IRQ(1) USB (USBR) 80 - IT8152_PD_IRQ(0) Audio controller (ACR) 81 - */ 82 - #define IT8152_IRQ(x) (IRQ_BOARD_START + (x)) 83 - #define IT8152_LAST_IRQ (IRQ_BOARD_START + 40) 84 - 85 - /* IRQ-sources in 3 groups - local devices, LPC (serial), and external PCI */ 86 - #define IT8152_LD_IRQ_COUNT 9 87 - #define IT8152_LP_IRQ_COUNT 16 88 - #define IT8152_PD_IRQ_COUNT 15 89 - 90 - /* Priorities: */ 91 - #define IT8152_PD_IRQ(i) IT8152_IRQ(i) 92 - #define IT8152_LP_IRQ(i) (IT8152_IRQ(i) + IT8152_PD_IRQ_COUNT) 93 - #define IT8152_LD_IRQ(i) (IT8152_IRQ(i) + IT8152_PD_IRQ_COUNT + IT8152_LP_IRQ_COUNT) 94 - 95 - /* frequently used interrupts */ 96 - #define IT8152_PCISERR IT8152_PD_IRQ(14) 97 - #define IT8152_H2PTADR IT8152_PD_IRQ(13) 98 - #define IT8152_H2PMAR IT8152_PD_IRQ(12) 99 - #define IT8152_PCI_INTD IT8152_PD_IRQ(11) 100 - #define IT8152_PCI_INTC IT8152_PD_IRQ(10) 101 - #define IT8152_PCI_INTB IT8152_PD_IRQ(9) 102 - #define IT8152_PCI_INTA IT8152_PD_IRQ(8) 103 - #define IT8152_CDMA_INT IT8152_PD_IRQ(2) 104 - #define IT8152_USB_INT IT8152_PD_IRQ(1) 105 - #define IT8152_AUDIO_INT IT8152_PD_IRQ(0) 106 - 107 - struct pci_dev; 108 - struct pci_sys_data; 109 - 110 - extern void it8152_irq_demux(struct irq_desc *desc); 111 - extern void it8152_init_irq(void); 112 - extern int it8152_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); 113 - extern int it8152_pci_setup(int nr, struct pci_sys_data *sys); 114 - extern struct pci_ops it8152_ops; 115 - 116 - #endif /* __ASM_HARDWARE_IT8152_H */
+5 -1
arch/arm/include/asm/uaccess.h
··· 78 78 79 79 #define segment_eq(a, b) ((a) == (b)) 80 80 81 - /* We use 33-bit arithmetic here... */ 81 + /* 82 + * We use 33-bit arithmetic here. Success returns zero, failure returns 83 + * addr_limit. We take advantage that addr_limit will be zero for KERNEL_DS, 84 + * so this will always return success in that case. 85 + */ 82 86 #define __range_ok(addr, size) ({ \ 83 87 unsigned long flag, roksum; \ 84 88 __chk_user_ptr(addr); \
+2
arch/arm/include/asm/vfp.h
··· 9 9 #ifndef __ASM_VFP_H 10 10 #define __ASM_VFP_H 11 11 12 + #ifndef CONFIG_AS_VFP_VMRS_FPINST 12 13 #define FPSID cr0 13 14 #define FPSCR cr1 14 15 #define MVFR1 cr6 ··· 17 16 #define FPEXC cr8 18 17 #define FPINST cr9 19 18 #define FPINST2 cr10 19 + #endif 20 20 21 21 /* FPSID bits */ 22 22 #define FPSID_IMPLEMENTER_BIT (24)
+22 -9
arch/arm/include/asm/vfpmacros.h
··· 8 8 9 9 #include <asm/vfp.h> 10 10 11 - @ Macros to allow building with old toolkits (with no VFP support) 11 + #ifdef CONFIG_AS_VFP_VMRS_FPINST 12 + .macro VFPFMRX, rd, sysreg, cond 13 + vmrs\cond \rd, \sysreg 14 + .endm 15 + 16 + .macro VFPFMXR, sysreg, rd, cond 17 + vmsr\cond \sysreg, \rd 18 + .endm 19 + #else 20 + @ Macros to allow building with old toolkits (with no VFP support) 12 21 .macro VFPFMRX, rd, sysreg, cond 13 22 MRC\cond p10, 7, \rd, \sysreg, cr0, 0 @ FMRX \rd, \sysreg 14 23 .endm ··· 25 16 .macro VFPFMXR, sysreg, rd, cond 26 17 MCR\cond p10, 7, \rd, \sysreg, cr0, 0 @ FMXR \sysreg, \rd 27 18 .endm 19 + #endif 28 20 29 21 @ read all the working registers back into the VFP 30 22 .macro VFPFLDMIA, base, tmp 23 + .fpu vfpv2 31 24 #if __LINUX_ARM_ARCH__ < 6 32 - LDC p11, cr0, [\base],#33*4 @ FLDMIAX \base!, {d0-d15} 25 + fldmiax \base!, {d0-d15} 33 26 #else 34 - LDC p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d0-d15} 27 + vldmia \base!, {d0-d15} 35 28 #endif 36 29 #ifdef CONFIG_VFPv3 30 + .fpu vfpv3 37 31 #if __LINUX_ARM_ARCH__ <= 6 38 32 ldr \tmp, =elf_hwcap @ may not have MVFR regs 39 33 ldr \tmp, [\tmp, #0] 40 34 tst \tmp, #HWCAP_VFPD32 41 - ldclne p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} 35 + vldmiane \base!, {d16-d31} 42 36 addeq \base, \base, #32*4 @ step over unused register space 43 37 #else 44 38 VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 45 39 and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field 46 40 cmp \tmp, #2 @ 32 x 64bit registers? 47 - ldcleq p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} 41 + vldmiaeq \base!, {d16-d31} 48 42 addne \base, \base, #32*4 @ step over unused register space 49 43 #endif 50 44 #endif ··· 56 44 @ write all the working registers out of the VFP 57 45 .macro VFPFSTMIA, base, tmp 58 46 #if __LINUX_ARM_ARCH__ < 6 59 - STC p11, cr0, [\base],#33*4 @ FSTMIAX \base!, {d0-d15} 47 + fstmiax \base!, {d0-d15} 60 48 #else 61 - STC p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d0-d15} 49 + vstmia \base!, {d0-d15} 62 50 #endif 63 51 #ifdef CONFIG_VFPv3 52 + .fpu vfpv3 64 53 #if __LINUX_ARM_ARCH__ <= 6 65 54 ldr \tmp, =elf_hwcap @ may not have MVFR regs 66 55 ldr \tmp, [\tmp, #0] 67 56 tst \tmp, #HWCAP_VFPD32 68 - stclne p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} 57 + vstmiane \base!, {d16-d31} 69 58 addeq \base, \base, #32*4 @ step over unused register space 70 59 #else 71 60 VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 72 61 and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field 73 62 cmp \tmp, #2 @ 32 x 64bit registers? 74 - stcleq p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} 63 + vstmiaeq \base!, {d16-d31} 75 64 addne \base, \base, #32*4 @ step over unused register space 76 65 #endif 77 66 #endif
-17
arch/arm/kernel/bios32.c
··· 252 252 } 253 253 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, pci_fixup_cy82c693); 254 254 255 - static void pci_fixup_it8152(struct pci_dev *dev) 256 - { 257 - int i; 258 - /* fixup for ITE 8152 devices */ 259 - /* FIXME: add defines for class 0x68000 and 0x80103 */ 260 - if ((dev->class >> 8) == PCI_CLASS_BRIDGE_HOST || 261 - dev->class == 0x68000 || 262 - dev->class == 0x80103) { 263 - for (i = 0; i < PCI_NUM_RESOURCES; i++) { 264 - dev->resource[i].start = 0; 265 - dev->resource[i].end = 0; 266 - dev->resource[i].flags = 0; 267 - } 268 - } 269 - } 270 - DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ITE, PCI_DEVICE_ID_ITE_8152, pci_fixup_it8152); 271 - 272 255 /* 273 256 * If the bus contains any of these devices, then we must not turn on 274 257 * parity checking of any kind. Currently this is CyberPro 20x0 only.
+24
arch/arm/kernel/stacktrace.c
··· 22 22 * A simple function epilogue looks like this: 23 23 * ldm sp, {fp, sp, pc} 24 24 * 25 + * When compiled with clang, pc and sp are not pushed. A simple function 26 + * prologue looks like this when built with clang: 27 + * 28 + * stmdb {..., fp, lr} 29 + * add fp, sp, #x 30 + * sub sp, sp, #y 31 + * 32 + * A simple function epilogue looks like this when built with clang: 33 + * 34 + * sub sp, fp, #x 35 + * ldm {..., fp, pc} 36 + * 37 + * 25 38 * Note that with framepointer enabled, even the leaf functions have the same 26 39 * prologue and epilogue, therefore we can ignore the LR value in this case. 27 40 */ ··· 47 34 low = frame->sp; 48 35 high = ALIGN(low, THREAD_SIZE); 49 36 37 + #ifdef CONFIG_CC_IS_CLANG 38 + /* check current frame pointer is within bounds */ 39 + if (fp < low + 4 || fp > high - 4) 40 + return -EINVAL; 41 + 42 + frame->sp = frame->fp; 43 + frame->fp = *(unsigned long *)(fp); 44 + frame->pc = frame->lr; 45 + frame->lr = *(unsigned long *)(fp + 4); 46 + #else 50 47 /* check current frame pointer is within bounds */ 51 48 if (fp < low + 12 || fp > high - 4) 52 49 return -EINVAL; ··· 65 42 frame->fp = *(unsigned long *)(fp - 12); 66 43 frame->sp = *(unsigned long *)(fp - 8); 67 44 frame->pc = *(unsigned long *)(fp - 4); 45 + #endif 68 46 69 47 return 0; 70 48 }
-5
arch/arm/mm/mmu.c
··· 74 74 pteval_t pte; 75 75 }; 76 76 77 - unsigned long kimage_voffset __ro_after_init; 78 - 79 77 static struct cachepolicy cache_policies[] __initdata = { 80 78 { 81 79 .policy = "uncached", ··· 1652 1654 1653 1655 empty_zero_page = virt_to_page(zero_page); 1654 1656 __flush_dcache_page(NULL, empty_zero_page); 1655 - 1656 - /* Compute the virt/idmap offset, mostly for the sake of KVM */ 1657 - kimage_voffset = (unsigned long)&kimage_voffset - virt_to_idmap(&kimage_voffset); 1658 1657 } 1659 1658 1660 1659 void __init early_mm_init(const struct machine_desc *mdesc)
+1 -3
arch/arm/mm/proc-macros.S
··· 5 5 * VMA_VM_FLAGS 6 6 * VM_EXEC 7 7 */ 8 - #include <linux/const.h> 9 8 #include <asm/asm-offsets.h> 10 9 #include <asm/thread_info.h> 11 10 ··· 30 31 * act_mm - get current->active_mm 31 32 */ 32 33 .macro act_mm, rd 33 - bic \rd, sp, #(THREAD_SIZE - 1) & ~63 34 - bic \rd, \rd, #63 34 + get_thread_info \rd 35 35 ldr \rd, [\rd, #TI_TASK] 36 36 .if (TSK_ACTIVE_MM > IMM12_MASK) 37 37 add \rd, \rd, #TSK_ACTIVE_MM & ~IMM12_MASK
-2
arch/arm/vfp/Makefile
··· 8 8 # ccflags-y := -DDEBUG 9 9 # asflags-y := -DDEBUG 10 10 11 - KBUILD_AFLAGS :=$(KBUILD_AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp -mfloat-abi=soft) 12 - 13 11 obj-y += vfpmodule.o entry.o vfphw.o vfpsingle.o vfpdouble.o
+21 -10
arch/arm/vfp/vfphw.S
··· 78 78 ENTRY(vfp_support_entry) 79 79 DBGSTR3 "instr %08x pc %08x state %p", r0, r2, r10 80 80 81 + .fpu vfpv2 81 82 ldr r3, [sp, #S_PSR] @ Neither lazy restore nor FP exceptions 82 83 and r3, r3, #MODE_MASK @ are supported in kernel mode 83 84 teq r3, #USR_MODE ··· 259 258 260 259 ENTRY(vfp_get_float) 261 260 tbl_branch r0, r3, #3 261 + .fpu vfpv2 262 262 .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 263 - 1: mrc p10, 0, r0, c\dr, c0, 0 @ fmrs r0, s0 263 + 1: vmov r0, s\dr 264 264 ret lr 265 265 .org 1b + 8 266 - 1: mrc p10, 0, r0, c\dr, c0, 4 @ fmrs r0, s1 266 + .endr 267 + .irp dr,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 268 + 1: vmov r0, s\dr 267 269 ret lr 268 270 .org 1b + 8 269 271 .endr ··· 274 270 275 271 ENTRY(vfp_put_float) 276 272 tbl_branch r1, r3, #3 273 + .fpu vfpv2 277 274 .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 278 - 1: mcr p10, 0, r0, c\dr, c0, 0 @ fmsr r0, s0 275 + 1: vmov s\dr, r0 279 276 ret lr 280 277 .org 1b + 8 281 - 1: mcr p10, 0, r0, c\dr, c0, 4 @ fmsr r0, s1 278 + .endr 279 + .irp dr,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 280 + 1: vmov s\dr, r0 282 281 ret lr 283 282 .org 1b + 8 284 283 .endr ··· 289 282 290 283 ENTRY(vfp_get_double) 291 284 tbl_branch r0, r3, #3 285 + .fpu vfpv2 292 286 .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 293 - 1: fmrrd r0, r1, d\dr 287 + 1: vmov r0, r1, d\dr 294 288 ret lr 295 289 .org 1b + 8 296 290 .endr 297 291 #ifdef CONFIG_VFPv3 298 292 @ d16 - d31 registers 299 - .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 300 - 1: mrrc p11, 3, r0, r1, c\dr @ fmrrd r0, r1, d\dr 293 + .fpu vfpv3 294 + .irp dr,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 295 + 1: vmov r0, r1, d\dr 301 296 ret lr 302 297 .org 1b + 8 303 298 .endr ··· 313 304 314 305 ENTRY(vfp_put_double) 315 306 tbl_branch r2, r3, #3 307 + .fpu vfpv2 316 308 .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 317 - 1: fmdrr d\dr, r0, r1 309 + 1: vmov d\dr, r0, r1 318 310 ret lr 319 311 .org 1b + 8 320 312 .endr 321 313 #ifdef CONFIG_VFPv3 314 + .fpu vfpv3 322 315 @ d16 - d31 registers 323 - .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 324 - 1: mcrr p11, 3, r0, r1, c\dr @ fmdrr r0, r1, d\dr 316 + .irp dr,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 317 + 1: vmov d\dr, r0, r1 325 318 ret lr 326 319 .org 1b + 8 327 320 .endr
+19 -4
arch/arm/vfp/vfpinstr.h
··· 62 62 #define FPSCR_C (1 << 29) 63 63 #define FPSCR_V (1 << 28) 64 64 65 - /* 66 - * Since we aren't building with -mfpu=vfp, we need to code 67 - * these instructions using their MRC/MCR equivalents. 68 - */ 65 + #ifdef CONFIG_AS_VFP_VMRS_FPINST 66 + 67 + #define fmrx(_vfp_) ({ \ 68 + u32 __v; \ 69 + asm(".fpu vfpv2\n" \ 70 + "vmrs %0, " #_vfp_ \ 71 + : "=r" (__v) : : "cc"); \ 72 + __v; \ 73 + }) 74 + 75 + #define fmxr(_vfp_,_var_) \ 76 + asm(".fpu vfpv2\n" \ 77 + "vmsr " #_vfp_ ", %0" \ 78 + : : "r" (_var_) : "cc") 79 + 80 + #else 81 + 69 82 #define vfpreg(_vfp_) #_vfp_ 70 83 71 84 #define fmrx(_vfp_) ({ \ ··· 91 78 #define fmxr(_vfp_,_var_) \ 92 79 asm("mcr p10, 7, %0, " vfpreg(_vfp_) ", cr0, 0 @ fmxr " #_vfp_ ", %0" \ 93 80 : : "r" (_var_) : "cc") 81 + 82 + #endif 94 83 95 84 u32 vfp_single_cpdo(u32 inst, u32 fpscr); 96 85 u32 vfp_single_cprt(u32 inst, u32 fpscr, struct pt_regs *regs);