2339 Commits

Author SHA1 Message Date
rwatson
6102a34d38 Merge r263233 from HEAD to stable/10:
Update kernel inclusions of capability.h to use capsicum.h instead; some
  further refinement is required as some device drivers intended to be
  portable over FreeBSD versions rely on __FreeBSD_version to decide whether
  to include capability.h.

Sponsored by:	Google, Inc.
2015-03-19 13:37:36 +00:00
dim
058f9df187 MFC r279312:
Fix a number of -Wcast-qual warnings under sys/arm.  No functional
change.

Submitted by:	andrew
2015-03-01 01:08:14 +00:00
dim
d160004487 MFC r279311:
In sys/arm/ti/am335x/am335x_rtc.c, fix a clang 3.6.0 warning about
am33x_rtc_softc::sc_irq_res (which is an array) never being NULL.

Submitted by:	andrew
2015-03-01 00:57:01 +00:00
loos
a7a8c39e00 MFC r274670, r274671, r276168:
Moves all the duplicate code to a single function.

Verify for invalid modes and unwanted flags before pass the new flags to
driver.

Make gpio_default_map_gpios() static.  No functional changes.

Improves the GPIO API description a little bit.

gpio_pin_max must return the maximum supported pin number and not the total
number of pins on the system.
2015-02-14 21:16:19 +00:00
loos
f991641986 MFC r273799:
Make the GPIO children attach to the first unit available and not only to
unit 0.

This fix a bug where a GPIO controller could fail to attach its children
(gpioc and gpiobus) if another GPIO driver attach first.
2015-02-14 20:37:33 +00:00
loos
c8630fd03e MFC: r273264, r274409, r278212, r278213:
Add a workaround needed to fix a bug of Arasan Host Controller where it may
lose the contents of consecutive writes (that happens within two SD card
clock cycles).

This fixes the causes of instability during the SD card detection and
identification on Raspberry Pi (which happens at 400 kHz and so was much
more vulnerable to this issue).

Remove the previous workaround which clearly can't provide the same effect.

Remove stale comments about the issues with HS mode.

Remove a previous workaround to limit the minimum sdhci frequency that
isn't needed anymore.

Remove some duplicate calls to bus_release_resource() and destroy the mutex
on error cases.

While here remove unnecessary includes.
2015-02-14 19:28:26 +00:00
loos
e5545eed6d MFC r276298, r276303:
Remove the '#undef DEBUG' that should not be committed.

Removes unused and duplicate headers.

Bring the wait limit on mailbox write to a more sane value.

Fix a off-by-one bug on wait time limit.

Remove extra blank line.
2015-02-14 18:45:43 +00:00
loos
2c27c21470 MFC r276296, r277207:
Make consistent use of the correct debug macros across the file.

Fix the C -> K temperature conversion for the dev.cpu.0.temperature sysctl.

Remove the unused temperature conversion macros.
2015-02-14 18:37:36 +00:00
kib
c85a726887 MFC r277643:
Remove Giant from /dev/mem and /dev/kmem.

MFC r277743:
Arm: ensure that _tmppt KVA is used exclusively.
2015-02-14 08:44:12 +00:00
ian
42d737e5aa MFC r278031: Remove a stale comment. 2015-02-13 23:37:56 +00:00
ian
1b3e6163a9 MFC r277555, r277568:
Enable all sd device clocks on imx6.

  Add imx5/6 pinmux driver support for encoded input register configs.
2015-02-13 23:34:40 +00:00
ian
fc13bac9c0 MFC r277523: Add last_fault_code when DEBUG is defined. 2015-02-13 23:32:03 +00:00
ian
c961e58ab5 MFC r277532, r277533: Add Maxmem global for arm. 2015-02-13 23:30:48 +00:00
ian
56013bbc63 MFC r277454, r277460, r277465, r277466, r277467, r277469, r277470, r277471,
r277472, r277473, r277474, r277475, r277476, r277477, r277478, r277479,
    r277480, r277512, r277516:

  Add inline implementations of arm bus_space_read/write_N().

  Revise the arm bus_space implementation to avoid dereferencing the tag on
  every operation to retrieve the bs_cookie value almost nothing actually uses.

  Use the explicit member initializer style to init the bus_space struct.

  Use arm/bus_space-v6.c for all armv6 systems

  Consolidate many identical implementations of bus_space to a single
  common tag and implementation shared by armv4 and armv6.

  Micro-optimize the new arm inline bus_space implementation by grouping all
  the data the inline functions access together at the start of the bus_space
  struct so that they all fit in a single cache line.
2015-02-13 22:32:02 +00:00
ian
b137f825dc MFC r272103: Move s3c2xx0 into the samsung directory. 2015-02-13 22:08:19 +00:00
ian
d8b2164f70 MFC r257740, r257739: Switch to using common armv6 bus_space tag. 2015-02-13 22:01:14 +00:00
ian
0d83b78040 MFC r277306, r277307, r277346:
Add defines for SDHCI 3.0 controllers.

  Add a new SDHCI quirk, SDHCI_QUIRK_DONT_SET_HISPD_BIT.

  Save the command-and-flags value into shadow register when it is written.
2015-02-13 20:38:39 +00:00
ian
f271f6c323 MFC r277305: Minor cleanups, comment changes. 2015-02-13 20:23:06 +00:00
ian
f3edb98cc7 MFC r277265: Enable the snoop control unit during MP startup 2015-02-13 20:21:13 +00:00
ian
0b254d1cdd MFC r277037: Enable ALT_BREAK_TO_DEBUGGER for rpi. 2015-02-13 20:18:29 +00:00
ian
d546a4529c MFC r276003:
Start to clean up the armv6 kernel configs by reducing the diff between
  them in the first sections and the later FDT support.
2015-02-13 20:15:10 +00:00
ian
fa148a0f4d MFC r263245, r269233, r267101, r275961: Config style cleanups.
Some of these are effectively record-only merges, because the actual
merge happened during conflict resolution of some prior merge.
2015-02-13 20:05:37 +00:00
ian
522359f373 MFC r271220:
Create a common i.MX53 config and use it with the two existing i.MX53 boards.
2015-02-13 19:52:16 +00:00
ian
be0b7de958 MFC r275962: Clean up style of CUBIEBOARD2 config. 2015-02-13 18:37:22 +00:00
ian
895492b87e MFC r277028, r277038:
Check for and handle failures of bus_dmamap_load().
 Handle dma mappings with more than one segment for rpi sdhci.
2015-02-13 18:16:08 +00:00
ian
64831f08c1 MFC r276985:
Store the shadow command/mode register in the softc, not a local static var.
2015-02-13 18:03:50 +00:00
ian
e11cd4215f MFC r276803, r276808:
Add accessors for the ARM CP15 performance monitor registers.
  Move the inclusion of cpu-v6.h inside the #ifdef _KERNEL block.
2015-02-13 17:53:11 +00:00
ian
45adae0187 MFC r267719:
Remove the incomplete Tegra 2 code, nobody was maintaining it. The AC100
  never booted to single user mode.  (And now it is blocking the ability
  to MFC other changes since it is gone from -current and hasn't kept up
  with the other changes).
2015-02-13 17:36:41 +00:00
ian
68023855e8 MFC r266083, r267597:
Give suitably-endowed ARMs a register similar to the x86 TSC register.
2015-02-13 16:21:36 +00:00
ian
8489ff3c1b MFC r276642, r276644:
Remove commented-out options SMP and APIC_IO from old arm boards that will
  never be able to support smp.

  Switch all arm kernels with option SMP to use SCHED_ULE instead of 4BSD.
2015-02-13 15:32:31 +00:00
ian
2da29ea176 MFC r266647, r270912, r273089:
Reduce the diff between the PandaBoard and BeableBone kernel configs

  Resync comments about scbus and pass for life after AHCI joined CAM.

  Uncomment general options from the Pandaboard config. These are in other
  configs and there is no reason for them not to be here.
2015-02-13 15:27:46 +00:00
ian
ce06bc5045 MFC r272356, r275639, r276638:
Split syscall handling out to a separate file.

  Include sys/kernel.h to pick up the definition of hz in syscall.c

  Add a new trap-v6.c which has support for all armv7 exceptions.
2015-02-13 02:02:12 +00:00
ian
9165bfa9f7 MFC r276525, r276596:
Put in a workaround for bug 196407 (arm modules cause crashes & panics).
  (Don't allow movw/movt insn in modules.)

  Fix alignment directives in arm asm code after clang 3.5 import.
2015-02-13 00:49:47 +00:00
ian
914dd97ca5 MFC r276519:
Define a WFI macro that expands to the right form of wait-for-interrupt
  depending on the architecture.
2015-02-13 00:17:22 +00:00
ian
4b65730f6b MFC r276518: Rework vfp code so it will compile on clang 3.4 and 3.5. 2015-02-13 00:15:13 +00:00
ian
0a793f5df0 MFC r276444, r276445, r276470:
Fix a paste-o in dcache_inv_pou_all().

 Change the order of operations for the initial cache setup.

 A couple small fixes to make clang 3.5 happy... Move END(sigcode)
 and other misplace ENTRY/END macros.
2015-02-13 00:12:21 +00:00
ian
4427ba1cd2 MFC r276394, r276397:
Add armv6 implementations of the startup-time cache maintenence functions.

  Create a new locore.S that includes locore-v4 or locore-v6 as needed.
2015-02-13 00:06:07 +00:00
ian
975bfc4e8b MFC r276395, r276396: Rename locore.S to locore-v4.S and add a new locore-v6.S. 2015-02-12 21:20:28 +00:00
ian
4ce6bafee9 MFC r276247, r276333, r276334, r276335, r276336, r276340, r276350:
Include acle-compat.h directly rather than getting it via sysreg.h.

  Add new code to read and parse cpu identification data using the new CPUID
  mechanism defined for armv7.

  Add new TLB and cache maintainence functions for armv6 and armv7.

  Eliminate an unused macro whose name clashes now with a function in the
  new cpu-v6.h

  Add cache maintenance functions which will be used by startup code to
  initially set up the MMU.

  Fix a "decl is not a prototype" error noticed by gcc (but not clang).

  Update comments (r4 is not used anywhere), use non-profiling entry macros.

  Add arm option ARM_NEW_PMAP, to allow us to begin adding the new pmap
  code alongside the existing implementation

  Add armv6 implementations of cache operations to avoid duplication
2015-02-12 21:10:24 +00:00
ian
997bc7a02b MFC r272209, r272300, r276212, r276213:
Add machine/sysreg.h to simplify accessing the system control coprocessor
  registers and use it in the ARMv7 CPU functions.

  Add macros for asm barrier instructions with arch-specific implementations.

  Define only the CP15 register operations that are valid for the architecture.
2015-02-12 19:45:07 +00:00
ian
a59279fefd MFC r276206:
For data and instruction prefetch aborts, call the same handler in the C
  code, passing a 0/1 flag that indicates which type of abort it was.  This
  sets the stage for unifying the handling of page faults in a single routine.
2015-02-12 19:35:46 +00:00
ian
564d364c54 MFC r276196, r276197, r276198, r276202, r276203, r276204:
Change the style of the DO_AST macro to match the others

  Remove _PROF_PROLOGUE from the EENTRY() macros.

  Stylish changes... put tabs where they need to be in macros, move lines
  around so that related things are more grouped together, rewrite comments.

  Fix the GLOBAL macro so it works (upper vs lowercase X), use it in _EENTRY.

  Create 'L' variants of all the ENTRY macros for file-static/local symbols.
2015-02-12 19:32:07 +00:00
ian
ea4d7bbc3c MFC r276191: Display correct value for cache level-of-coherency (needs +1). 2015-02-12 17:01:54 +00:00
ian
a9d7d10c20 MFC r276187, r276190, r271422:
Rename pmap_kenter_temp to pmap_kenter_temporary to be consistent with the
  other architectures with this function.

  Eliminate unnecessary references to pte.h internals by using the standard
  pmap_kenter_temporary() to map pages while dumping.

  Cleanup up ARM *frame structures.
2015-02-12 04:15:55 +00:00
ian
dff1ee7f45 MFC r271394, r271398:
Add more register values to armreg.h and remove CPU_CONTROL_32BP_ENABLE
  from asm.h as they were already defined in armreg.h.

  Unify interrupts bit definition and usage. While here remove PSR_C_bit.
2015-02-12 03:50:33 +00:00
ian
4830d3556d MFC r275779, r275963, r276101, r276161, r276297:
Move ofw_cpu.c to sys/dev/ofw so that it can be used by other
  architectures.

  Add driver for CPU frequency/voltage control on the Raspberry Pi.

  On initialization, do not use bcm_mbox_intr() to read the pending messages.
  This fixes the hang that happens on boot while initializing the cpufreq on
  Raspberry Pi.
2015-02-12 00:25:33 +00:00
ian
ba124c2ef3 MFC r276047: Add -march=armv7a to the kernel compile for all v7a ARM systems. 2015-02-11 22:47:48 +00:00
ian
fc47f4b0ff MFC r266943, r266950, r267390:
Add support for Exynos 5420 Octa - 8-core (big.LITTLE) ARM machine
  Enable SMP for both Exynos5 models we support.
2015-02-11 22:35:32 +00:00
rpaulo
9a363224b6 MFC r277958, r278061:
ti_pruss: make sure the mmap'ed memory region is uncacheable.

 am335x_clk_pruss_activate(): use the L3F clock.
2015-02-09 02:49:10 +00:00
kib
9dc38ea5dc MFC r278001:
Do not qualify the mcontext_t *mcp argument for set_mcontext(9) as const.
2015-02-07 08:47:15 +00:00