Linux 3.16.7
Greg KH
maintainer-----------------------------------
NOTE, this is the LAST 3.16-stable kernel to be released, it is now end-of-life, please move to the 3.17-stable series at this point in time.
-----------------------------------
I'm announcing the release of the 3.16.7 kernel.
All users of the 3.16 kernel series must upgrade.
The updated 3.16.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.16.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/lzo.txt | 164 +++++++ Documentation/virtual/kvm/mmu.txt | 14 Makefile | 2 arch/arm/boot/dts/Makefile | 4 arch/arm/boot/dts/armada-370-netgear-rn102.dts | 4 arch/arm/boot/dts/armada-370-netgear-rn104.dts | 4 arch/arm/boot/dts/armada-xp-netgear-rn2120.dts | 4 arch/arm/boot/dts/at91sam9263.dtsi | 2 arch/arm/boot/dts/imx28-evk.dts | 1 arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts | 16 arch/arm/boot/dts/kirkwood-rd88f6281-a.dts | 43 + arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts | 26 - arch/arm/boot/dts/kirkwood-rd88f6281-a1.dts | 31 - arch/arm/boot/dts/kirkwood-rd88f6281-z0.dts | 35 + arch/arm/boot/dts/kirkwood-rd88f6281.dtsi | 27 - arch/arm/boot/dts/kirkwood.dtsi | 4 arch/arm/boot/dts/sama5d3_can.dtsi | 2 arch/arm/mach-at91/clock.c | 1 arch/arm64/include/asm/compat.h | 4 arch/arm64/kernel/entry.S | 1 arch/m68k/mm/hwtest.c | 6 arch/powerpc/kernel/eeh_pe.c | 21 arch/powerpc/platforms/pseries/iommu.c | 51 +- arch/s390/kvm/interrupt.c | 1 arch/sparc/Kconfig | 1 arch/sparc/include/asm/hypervisor.h | 11 arch/sparc/include/asm/irq_64.h | 7 arch/sparc/include/asm/ldc.h | 5 arch/sparc/include/asm/oplib_64.h | 3 arch/sparc/include/asm/page_64.h | 33 - arch/sparc/include/asm/pgalloc_64.h | 28 + arch/sparc/include/asm/pgtable_64.h | 100 ++-- arch/sparc/include/asm/setup.h | 2 arch/sparc/include/asm/spitfire.h | 2 arch/sparc/include/asm/thread_info_64.h | 4 arch/sparc/include/asm/tsb.h | 87 ++- arch/sparc/include/asm/visasm.h | 8 arch/sparc/kernel/cpu.c | 12 arch/sparc/kernel/cpumap.c | 2 arch/sparc/kernel/ds.c | 4 arch/sparc/kernel/dtlb_prot.S | 6 arch/sparc/kernel/entry.h | 3 arch/sparc/kernel/head_64.S | 52 -- arch/sparc/kernel/hvapi.c | 1 arch/sparc/kernel/hvcalls.S | 16 arch/sparc/kernel/hvtramp.S | 1 arch/sparc/kernel/ioport.c | 5 arch/sparc/kernel/irq_64.c | 507 +++++++++++++++------- arch/sparc/kernel/ktlb.S | 125 ----- arch/sparc/kernel/ldc.c | 41 - arch/sparc/kernel/nmi.c | 1 arch/sparc/kernel/pcr.c | 47 +- arch/sparc/kernel/perf_event.c | 10 arch/sparc/kernel/process_64.c | 3 arch/sparc/kernel/setup_64.c | 36 + arch/sparc/kernel/smp_64.c | 8 arch/sparc/kernel/sun4v_tlb_miss.S | 35 - arch/sparc/kernel/trampoline_64.S | 12 arch/sparc/kernel/traps_64.c | 15 arch/sparc/kernel/tsb.S | 6 arch/sparc/kernel/viohs.c | 4 arch/sparc/kernel/vmlinux.lds.S | 10 arch/sparc/lib/NG4memcpy.S | 14 arch/sparc/lib/memset.S | 18 arch/sparc/mm/fault_64.c | 3 arch/sparc/mm/gup.c | 30 + arch/sparc/mm/init_64.c | 554 ++++++++++++------------- arch/sparc/mm/init_64.h | 18 arch/sparc/net/bpf_jit_asm.S | 3 arch/sparc/net/bpf_jit_comp.c | 27 - arch/sparc/power/hibernate_asm.S | 4 arch/sparc/prom/bootstr_64.c | 5 arch/sparc/prom/cif.S | 5 arch/sparc/prom/init_64.c | 6 arch/sparc/prom/p1275.c | 9 arch/x86/include/asm/kvm_host.h | 1 arch/x86/kernel/cpu/intel.c | 15 arch/x86/kvm/mmu.c | 29 - arch/x86/kvm/vmx.c | 16 arch/x86/kvm/x86.h | 20 crypto/async_tx/async_xor.c | 3 drivers/base/firmware_class.c | 3 drivers/base/regmap/regmap-debugfs.c | 8 drivers/base/regmap/regmap.c | 7 drivers/bluetooth/btusb.c | 9 drivers/bluetooth/hci_h5.c | 2 drivers/edac/mpc85xx_edac.c | 2 drivers/hid/hid-rmi.c | 44 + drivers/hv/channel.c | 49 +- drivers/hv/connection.c | 17 drivers/hv/hv.c | 27 - drivers/hv/hyperv_vmbus.h | 4 drivers/message/fusion/mptspi.c | 5 drivers/misc/mei/bus.c | 2 drivers/net/wireless/ath/ath9k/ar5008_phy.c | 4 drivers/net/wireless/iwlwifi/mvm/constants.h | 2 drivers/net/wireless/iwlwifi/pcie/drv.c | 4 drivers/net/wireless/rt2x00/rt2800.h | 2 drivers/pci/host/pci-mvebu.c | 6 drivers/pci/pci-sysfs.c | 2 drivers/pci/quirks.c | 20 drivers/pci/setup-bus.c | 2 drivers/regulator/ltc3589.c | 1 drivers/rtc/rtc-cmos.c | 5 drivers/scsi/be2iscsi/be_mgmt.c | 13 drivers/scsi/qla2xxx/qla_os.c | 6 drivers/scsi/qla2xxx/qla_target.c | 5 drivers/spi/spi-dw-mid.c | 10 drivers/tty/serial/omap-serial.c | 12 drivers/usb/gadget/Kconfig | 3 drivers/usb/gadget/pch_udc.c | 22 fs/btrfs/dev-replace.c | 3 fs/btrfs/extent-tree.c | 8 fs/btrfs/file.c | 25 - fs/btrfs/inode.c | 3 fs/btrfs/ioctl.c | 9 fs/btrfs/relocation.c | 93 ++-- fs/btrfs/transaction.c | 12 fs/ecryptfs/inode.c | 2 fs/namespace.c | 2 fs/nfs/nfs4proc.c | 2 fs/nfs/nfs4renewd.c | 12 fs/nfs/nfs4state.c | 18 fs/nfs/pagelist.c | 10 fs/nfsd/nfs4xdr.c | 8 fs/notify/fanotify/fanotify_user.c | 2 fs/xfs/xfs_aops.c | 16 include/linux/compiler-gcc5.h | 66 ++ include/linux/pci_ids.h | 1 include/linux/sched.h | 6 include/uapi/linux/hyperv.h | 2 kernel/futex.c | 2 lib/lzo/lzo1x_decompress_safe.c | 103 ++-- net/bluetooth/l2cap_core.c | 6 net/bluetooth/smp.c | 5 security/integrity/ima/ima_appraise.c | 7 security/integrity/ima/ima_crypto.c | 8 security/integrity/ima/ima_main.c | 12 security/integrity/integrity.h | 1 sound/core/pcm_native.c | 2 sound/firewire/bebob/bebob_terratec.c | 4 sound/pci/emu10k1/emu10k1_callback.c | 6 sound/pci/hda/hda_local.h | 4 sound/pci/hda/patch_hdmi.c | 15 sound/pci/hda/patch_realtek.c | 7 sound/usb/quirks-table.h | 30 + virt/kvm/kvm_main.c | 34 + 147 files changed, 2154 insertions(+), 1191 deletions(-)
Alexander Usyskin (1):
mei: bus: fix possible boundaries violation
Alexei Starovoitov (2):
sparc: bpf_jit: fix support for ldx/stx mem and SKF_AD_VLAN_TAG
sparc: bpf_jit: fix loads from negative offsets
Alexey Kardashevskiy (1):
powerpc/iommu/ddw: Fix endianness
Allen Pais (3):
sparc64: correctly recognise M6 and M7 cpu type
sparc64: support M6 and M7 for building CPU distribution map
sparc64: cpu hardware caps support for sparc M6 and M7
Anatol Pomozov (1):
ALSA: pcm: use the same dma mmap codepath both for arm and arm64
Andreas Henriksson (1):
ARM: at91: fix at91sam9263ek DT mmc pinmuxing settings
Andreas Larsson (1):
sparc: Let memset return the address argument
Andrew Lunn (1):
ARM: Kirkwood: Fix DT based DSA.
Andy Adamson (1):
NFSv4.1: Fix an NFSv4.1 state renewal regression
Andy Lutomirski (2):
fs: Add a missing permission check to do_umount x86,kvm,vmx: Preserve CR4 across VM entry
Andy Shevchenko (3):
spi: dw-mid: respect 8 bit mode
spi: dw-mid: check that DMA was inited before exit
spi: dw-mid: terminate ongoing transfers at exit
Anssi Hannula (1):
ALSA: hda - hdmi: Fix missing ELD change event on plug/unplug
Arnaud Ebalard (2):
ARM: mvebu: Netgear RN104: Use Hardware BCH ECC
ARM: mvebu: Netgear RN2120: Use Hardware BCH ECC
Arun Easi (1):
qla2xxx: Use correct offset to req-q-out for reserve calculation
Benjamin Tissoires (1):
HID: rmi: check sanity of the incoming report
Borislav Petkov (1):
mpc85xx_edac: Make L2 interrupt shared too
Bryan O'Donoghue (2):
usb: pch_udc: usb gadget device support for Intel Quark X1000 x86/intel/quark: Switch off CR4.PGE so TLB flush uses CR3 instead
Catalin Marinas (1):
futex: Ensure get_futex_key_refs() always implies a barrier
Champion Chen (1):
Bluetooth: Fix issue with USB suspend in btusb driver
Chao Yu (1):
ecryptfs: avoid to access NULL pointer when write metadata in xattr
Chris J Arges (1):
mptfusion: enable no_write_same for vmware scsi disks
Christian Borntraeger (1):
KVM: s390: unintended fallthrough for external call
Daniel Glöckner (1):
rtc-cmos: fix wakeup from S5 without CONFIG_PM_SLEEP
Daniel Hellstrom (1):
sparc32: dma_alloc_coherent must honour gfp flags
Dave Chinner (1):
xfs: ensure WB_SYNC_ALL writeback handles partial pages correctly
Dave Kleikamp (1):
sparc64: Increase size of boot string to 1024 bytes
David Dueck (1):
ARM: at91/dt: Fix typo regarding can0_clk
David Henningsson (1):
ALSA: hda - Add missing terminating entry to SND_HDA_PIN_QUIRK macro
David Matlack (3):
kvm: x86: fix stale mmio cache bug
kvm: fix potentially corrupt mmio cache
kvm: don't take vcpu mutex for obviously invalid vcpu ioctls
David S. Miller (18):
sparc64: Do not disable interrupts in nmi_cpu_busy()
sparc64: Fix pcr_ops initialization and usage bugs.
sparc64: Fix corrupted thread fault code.
sparc64: Fix reversed start/end in flush_tlb_kernel_range()
sparc64: Fix lockdep warnings on reboot on Ultra-5
sparc64: Fix FPU register corruption with AES crypto offload.
sparc64: Do not define thread fpregs save area as zero-length array.
sparc64: Fix hibernation code refrence to PAGE_OFFSET.
sparc64: Switch to 4-level page tables.
sparc64: Define VA hole at run time, rather than at compile time.
sparc64: Adjust KTSB assembler to support larger physical addresses.
sparc64: Fix physical memory management regressions with large max_phys_bits.
sparc64: Use kernel page tables for vmemmap.
sparc64: Increase MAX_PHYS_ADDRESS_BITS to 53.
sparc64: Adjust vmalloc region size based upon available virtual address bits.
sparc64: Kill unnecessary tables and increase MAX_BANKS.
sparc64: Fix register corruption in top-most kernel stack frame during boot.
sparc64: Implement __get_user_pages_fast().
David Sterba (1):
btrfs: wake up transaction thread from SYNC_FS ioctl
Dmitry Kasatkin (2):
ima: fix fallback to use new_sync_read()
ima: provide flag to identify new empty files
Douglas Lehr (1):
PCI: Increase IBM ipr SAS Crocodile BARs to at least system page size
Emmanuel Grumbach (1):
iwlwifi: mvm: disable BT Co-running by default
Fabio Estevam (1):
ARM: dts: imx28-evk: Let i2c0 run at 100kHz
Felix Fietkau (1):
Revert "ath9k_hw: reduce ANI firstep range for older chips"
Filipe Manana (1):
Btrfs: add missing compression property remove in btrfs_ioctl_setflags
Frans Klaver (1):
tty: omap-serial: fix division by zero
Gavin Shan (1):
powerpc/eeh: Clear frozen device state in time
Geert Uytterhoeven (1):
m68k: Disable/restore interrupts in hwreg_present()/hwreg_write()
Greg Kroah-Hartman (1):
Linux 3.16.7
Harsha Priya (1):
ALSA: ALC283 codec - Avoid pop noise on headphones during suspend/resume
Himanshu Madhani (1):
qla2xxx: fix kernel NULL pointer access
J. Bruce Fields (1):
nfsd4: reserve adequate space for LOCK op
Joe Lawrence (1):
qla2xxx: Fix shost use-after-free on device removal
Johan Hedberg (2):
Bluetooth: Fix incorrect LE CoC PDU length restriction based on HCI MTU
Bluetooth: Fix setting correct security level when initiating SMP
Josef Ahmad (1):
pci_ids: Add support for Intel Quark ILB
Josef Bacik (4):
Btrfs: don't do async reclaim during log replay
Btrfs: try not to ENOSPC on log replay
Btrfs: cleanup error handling in build_backref_tree
Btrfs: fix build_backref_tree issue with multiple shared blocks
Junxiao Bi (1):
mm: clear __GFP_FS when PF_MEMALLOC_NOIO is set
K. Y. Srinivasan (7):
Drivers: hv: util: Properly pack the data for file copy functionality
Drivers: hv: vmbus: Cleanup vmbus_post_msg()
Drivers: hv: vmbus: Cleanup vmbus_teardown_gpadl()
Drivers: hv: vmbus: Cleanup vmbus_close_internal()
Drivers: hv: vmbus: Cleanup vmbus_establish_gpadl()
Drivers: hv: vmbus: Fix a bug in vmbus_open()
Drivers: hv: vmbus: Cleanup hv_post_message()
Kees Cook (1):
firmware_class: make sure fw requests contain a name
Liu Bo (1):
Btrfs: fix up bounds checking in lseek
Loic Poulain (1):
Bluetooth: Fix HCI H5 corrupted ack value
Ludovic Desroches (1):
ARM: at91/PMC: don't forget to write PMC_PCDR register to disable clocks
Mike Christie (1):
be2iscsi: check ip buffer before copying
Olga Kornievskaia (1):
Fixing lease renewal
Oren Givon (1):
iwlwifi: Add missing PCI IDs for the 7260 series
Pankaj Dubey (1):
regmap: fix NULL pointer dereference in _regmap_write/read
Paolo Bonzini (1):
KVM: do not bias the generation number in kvm_current_mmio_generation
Qu Wenruo (1):
btrfs: Fix a deadlock in btrfs_dev_replace_finishing()
Ricardo Ribalda Delgado (1):
PCI: Generate uppercase hex for modalias interface class
Sage Weil (1):
Btrfs: fix race in WAIT_SYNC ioctl
Sasha Levin (1):
kernel: add support for gcc 5
Sowmini Varadhan (1):
sparc64: Move request_irq() from ldc_bind() to ldc_alloc()
Stanislaw Gruszka (1):
rt2800: correct BBP1_TX_POWER_CTRL mask
Steffen Trumtrar (1):
regulator: ltc3589: fix broken voltage transitions
Takashi Iwai (2):
ALSA: emu10k1: Fix deadlock in synth voice lookup
ALSA: hda - Fix inverted LED gpio setup for Lenovo Ideapad
Takashi Sakamoto (1):
ALSA: bebob: Fix failure to detect source of clock for Terratec Phase 88
Thomas Petazzoni (1):
PCI: mvebu: Fix uninitialized variable in mvebu_get_tgt_attr()
Trond Myklebust (4):
NFSv4: Fix lock recovery when CREATE_SESSION/SETCLIENTID_CONFIRM fails
NFSv4: fix open/lock state recovery error handling
NFS: Fix an uninitialised pointer Oops in the writeback error path
NFS: Fix a bogus warning in nfs_generic_pgio
Victor Kamensky (1):
arm64: compat: fix compat types affecting struct compat_elf_prpsinfo
Vlad Catoi (1):
ALSA: usb-audio: Add support for Steinberg UR22 USB interface
Will Deacon (1):
arm64: debug: don't re-enable debug exceptions on return from el1_dbg
Willy Tarreau (3):
Documentation: lzo: document part of the encoding Revert "lzo: properly check for overruns"
lzo: check for length overrun in variable length encoding.
Xiubo Li (2):
regmap: debugfs: fix possbile NULL pointer dereference
regmap: fix possible ZERO_SIZE_PTR pointer dereferencing error.
Xuelin Shi (1):
dmaengine: fix xor sources continuation
Yann Droneaud (1):
fanotify: enable close-on-exec on events' fd when requested in fanotify_init()
Yinghai Lu (1):
PCI: Add missing MEM_64 mask in pci_assign_unassigned_bridge_resources()
bob picco (4):
sparc64: sun4v TLB error power off events
sparc64: find_node adjustment
sparc64: T5 PMU
sparc64: sparse irq
[email protected] (1):
ARM: mvebu: Netgear RN102: Use Hardware BCH ECC
Greg KH
maintainerDocumentation/lzo.txt new file +164 -0
@@ -0,0 +1,164 @@ + +LZO stream format as understood by Linux's LZO decompressor +=========================================================== + +Introduction + + This is not a specification. No specification seems to be publicly available + for the LZO stream format. This document describes what input format the LZO + decompressor as implemented in the Linux kernel understands. The file subject + of this analysis is lib/lzo/lzo1x_decompress_safe.c. No analysis was made on + the compressor nor on any other implementations though it seems likely that + the format matches the standard one. The purpose of this document is to + better understand what the code does in order to propose more efficient fixes + for future bug reports. + +Description + + The stream is composed of a series of instructions, operands, and data. The + instructions consist in a few bits representing an opcode, and bits forming + the operands for the instruction, whose size and position depend on the + opcode and on the number of literals copied by previous instruction. The + operands are used to indicate : + + - a distance when copying data from the dictionary (past output buffer) + - a length (number of bytes to copy from dictionary) + - the number of literals to copy, which is retained in variable "state" + as a piece of information for next instructions. + + Optionally depending on the opcode and operands, extra data may follow. These + extra data can be a complement for the operand (eg: a length or a distance + encoded on larger values), or a literal to be copied to the output buffer. + + The first byte of the block follows a different encoding from other bytes, it + seems to be optimized for literal use only, since there is no dictionary yet + prior to that byte. + + Lengths are always encoded on a variable size starting with a small number + of bits in the operand. If the number of bits isn't enough to represent the + length, up to 255 may be added in increments by consuming more bytes with a + rate of at most 255 per extra byte (thus the compression ratio cannot exceed + around 255:1). The variable length encoding using #bits is always the same : + + length = byte & ((1 << #bits) - 1) + if (!length) { + length = ((1 << #bits) - 1) + length += 255*(number of zero bytes) + length += first-non-zero-byte + } + length += constant (generally 2 or 3) + + For references to the dictionary, distances are relative to the output + pointer. Distances are encoded using very few bits belonging to certain + ranges, resulting in multiple copy instructions using different encodings. + Certain encodings involve one extra byte, others involve two extra bytes + forming a little-endian 16-bit quantity (marked LE16 below). + + After any instruction except the large literal copy, 0, 1, 2 or 3 literals + are copied before starting the next instruction. The number of literals that + were copied may change the meaning and behaviour of the next instruction. In + practice, only one instruction needs to know whether 0, less than 4, or more + literals were copied. This is the information stored in the <state> variable + in this implementation. This number of immediate literals to be copied is + generally encoded in the last two bits of the instruction but may also be + taken from the last two bits of an extra operand (eg: distance). + + End of stream is declared when a block copy of distance 0 is seen. Only one + instruction may encode this distance (0001HLLL), it takes one LE16 operand + for the distance, thus requiring 3 bytes. + + IMPORTANT NOTE : in the code some length checks are missing because certain + instructions are called under the assumption that a certain number of bytes + follow because it has already been garanteed before parsing the instructions. + They just have to "refill" this credit if they consume extra bytes. This is + an implementation design choice independant on the algorithm or encoding. + +Byte sequences + + First byte encoding : + + 0..17 : follow regular instruction encoding, see below. It is worth + noting that codes 16 and 17 will represent a block copy from + the dictionary which is empty, and that they will always be + invalid at this place. + + 18..21 : copy 0..3 literals + state = (byte - 17) = 0..3 [ copy <state> literals ] + skip byte + + 22..255 : copy literal string + length = (byte - 17) = 4..238 + state = 4 [ don't copy extra literals ] + skip byte + + Instruction encoding : + + 0 0 0 0 X X X X (0..15) + Depends on the number of literals copied by the last instruction. + If last instruction did not copy any literal (state == 0), this + encoding will be a copy of 4 or more literal, and must be interpreted + like this : + + 0 0 0 0 L L L L (0..15) : copy long literal string + length = 3 + (L ?: 15 + (zero_bytes * 255) + non_zero_byte) + state = 4 (no extra literals are copied) + + If last instruction used to copy between 1 to 3 literals (encoded in + the instruction's opcode or distance), the instruction is a copy of a + 2-byte block from the dictionary within a 1kB distance. It is worth + noting that this instruction provides little savings since it uses 2 + bytes to encode a copy of 2 other bytes but it encodes the number of + following literals for free. It must be interpreted like this : + + 0 0 0 0 D D S S (0..15) : copy 2 bytes from <= 1kB distance + length = 2 + state = S (copy S literals after this block) + Always followed by exactly one byte : H H H H H H H H + distance = (H << 2) + D + 1 + + If last instruction used to copy 4 or more literals (as detected by + state == 4), the instruction becomes a copy of a 3-byte block from the + dictionary from a 2..3kB distance, and must be interpreted like this : + + 0 0 0 0 D D S S (0..15) : copy 3 bytes from 2..3 kB distance + length = 3 + state = S (copy S literals after this block) + Always followed by exactly one byte : H H H H H H H H + distance = (H << 2) + D + 2049 + + 0 0 0 1 H L L L (16..31) + Copy of a block within 16..48kB distance (preferably less than 10B) + length = 2 + (L ?: 7 + (zero_bytes * 255) + non_zero_byte) + Always followed by exactly one LE16 : D D D D D D D D : D D D D D D S S + distance = 16384 + (H << 14) + D + state = S (copy S literals after this block) + End of stream is reached if distance == 16384 + + 0 0 1 L L L L L (32..63) + Copy of small block within 16kB distance (preferably less than 34B) + length = 2 + (L ?: 31 + (zero_bytes * 255) + non_zero_byte) + Always followed by exactly one LE16 : D D D D D D D D : D D D D D D S S + distance = D + 1 + state = S (copy S literals after this block) + + 0 1 L D D D S S (64..127) + Copy 3-4 bytes from block within 2kB distance + state = S (copy S literals after this block) + length = 3 + L + Always followed by exactly one byte : H H H H H H H H + distance = (H << 3) + D + 1 + + 1 L L D D D S S (128..255) + Copy 5-8 bytes from block within 2kB distance + state = S (copy S literals after this block) + length = 5 + L + Always followed by exactly one byte : H H H H H H H H + distance = (H << 3) + D + 1 + +Authors + + This document was written by Willy Tarreau <[email protected]> on 2014/07/19 during an + analysis of the decompression code available in Linux 3.16-rc5. The code is + tricky, it is possible that this document contains mistakes or that a few + corner cases were overlooked. In any case, please report any doubt, fix, or + proposed updates to the author(s) so that the document can be updated.
Documentation/virtual/kvm/mmu.txt +14 -0
@@ -425,6 +425,20 @@ fault through the slow path. Since only 19 bits are used to store generation-number on mmio spte, all pages are zapped when there is an overflow. +Unfortunately, a single memory access might access kvm_memslots(kvm) multiple +times, the last one happening when the generation number is retrieved and +stored into the MMIO spte. Thus, the MMIO spte might be created based on +out-of-date information, but with an up-to-date generation number. + +To avoid this, the generation number is incremented again after synchronize_srcu +returns; thus, the low bit of kvm_memslots(kvm)->generation is only 1 during a +memslot update, while some SRCU readers might be using the old copy. We do not +want to use an MMIO sptes created with an odd generation number, and we can do +this without losing a bit in the MMIO spte. The low bit of the generation +is not stored in MMIO spte, and presumed zero when it is extracted out of the +spte. If KVM is unlucky and creates an MMIO spte while the low bit is 1, +the next access to the spte will always be a cache miss. + Further reading ===============
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 16 -SUBLEVEL = 6 +SUBLEVEL = 7 EXTRAVERSION = NAME = Museum of Fishiegoodies
arch/arm/boot/dts/Makefile +2 -2
@@ -137,8 +137,8 @@ kirkwood := \ kirkwood-openrd-client.dtb \ kirkwood-openrd-ultimate.dtb \ kirkwood-rd88f6192.dtb \ - kirkwood-rd88f6281-a0.dtb \ - kirkwood-rd88f6281-a1.dtb \ + kirkwood-rd88f6281-z0.dtb \ + kirkwood-rd88f6281-a.dtb \ kirkwood-rs212.dtb \ kirkwood-rs409.dtb \ kirkwood-rs411.dtb \
arch/arm/boot/dts/armada-370-netgear-rn102.dts +4 -0
@@ -143,6 +143,10 @@ marvell,nand-enable-arbiter; nand-on-flash-bbt; + /* Use Hardware BCH ECC */ + nand-ecc-strength = <4>; + nand-ecc-step-size = <512>; + partition@0 { label = "u-boot"; reg = <0x0000000 0x180000>; /* 1.5MB */
arch/arm/boot/dts/armada-370-netgear-rn104.dts +4 -0
@@ -145,6 +145,10 @@ marvell,nand-enable-arbiter; nand-on-flash-bbt; + /* Use Hardware BCH ECC */ + nand-ecc-strength = <4>; + nand-ecc-step-size = <512>; + partition@0 { label = "u-boot"; reg = <0x0000000 0x180000>; /* 1.5MB */
arch/arm/boot/dts/armada-xp-netgear-rn2120.dts +4 -0
@@ -223,6 +223,10 @@ marvell,nand-enable-arbiter; nand-on-flash-bbt; + /* Use Hardware BCH ECC */ + nand-ecc-strength = <4>; + nand-ecc-step-size = <512>; + partition@0 { label = "u-boot"; reg = <0x0000000 0x180000>; /* 1.5MB */
arch/arm/boot/dts/at91sam9263.dtsi +2 -0
@@ -535,6 +535,7 @@ compatible = "atmel,hsmci"; reg = <0xfff80000 0x600>; interrupts = <10 IRQ_TYPE_LEVEL_HIGH 0>; + pinctrl-names = "default"; #address-cells = <1>; #size-cells = <0>; status = "disabled";
@@ -544,6 +545,7 @@ compatible = "atmel,hsmci"; reg = <0xfff84000 0x600>; interrupts = <11 IRQ_TYPE_LEVEL_HIGH 0>; + pinctrl-names = "default"; #address-cells = <1>; #size-cells = <0>; status = "disabled";
arch/arm/boot/dts/imx28-evk.dts +0 -1
@@ -193,7 +193,6 @@ i2c0: i2c@80058000 { pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins_a>; - clock-frequency = <400000>; status = "okay"; sgtl5000: codec@0a {
arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts +6 -10
@@ -123,11 +123,11 @@ dsa@0 { compatible = "marvell,dsa"; - #address-cells = <2>; + #address-cells = <1>; #size-cells = <0>; - dsa,ethernet = <ð0>; - dsa,mii-bus = <ðphy0>; + dsa,ethernet = <ð0port>; + dsa,mii-bus = <&mdio>; switch@0 { #address-cells = <1>;
@@ -169,17 +169,13 @@ &mdio { status = "okay"; - - ethphy0: ethernet-phy@ff { - reg = <0xff>; /* No phy attached */ - speed = <1000>; - duplex = <1>; - }; }; ð0 { status = "okay"; + ethernet0-port@0 { - phy-handle = <ðphy0>; + speed = <1000>; + duplex = <1>; }; };
arch/arm/boot/dts/kirkwood-rd88f6281-a.dts new file +43 -0
43 lines not on this page · raw message
arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts deleted +0 -26
@@ -1,26 +0,0 @@ -/* - * Marvell RD88F6181 A0 Board descrition - * - * Andrew Lunn <[email protected]> - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - * - * This file contains the definitions for the board with the A0 variant of - * the SoC. The ethernet switch does not have a "wan" port. - */ - -/dts-v1/; -#include "kirkwood-rd88f6281.dtsi" - -/ { - model = "Marvell RD88f6281 Reference design, with A0 SoC"; - compatible = "marvell,rd88f6281-a0", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood"; - - dsa@0 { - switch@0 { - reg = <10 0>; /* MDIO address 10, switch 0 in tree */ - }; - }; -};
arch/arm/boot/dts/kirkwood-rd88f6281-a1.dts deleted +0 -31
@@ -1,31 +0,0 @@ -/* - * Marvell RD88F6181 A1 Board descrition - * - * Andrew Lunn <[email protected]> - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - * - * This file contains the definitions for the board with the A1 variant of - * the SoC. The ethernet switch has a "wan" port. - */ - -/dts-v1/; - -#include "kirkwood-rd88f6281.dtsi" - -/ { - model = "Marvell RD88f6281 Reference design, with A1 SoC"; - compatible = "marvell,rd88f6281-a1", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood"; - - dsa@0 { - switch@0 { - reg = <0 0>; /* MDIO address 0, switch 0 in tree */ - port@4 { - reg = <4>; - label = "wan"; - }; - }; - }; -};
arch/arm/boot/dts/kirkwood-rd88f6281-z0.dts new file +35 -0
@@ -0,0 +1,35 @@ +/* + * Marvell RD88F6181 Z0 stepping descrition + * + * Andrew Lunn <[email protected]> + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + * + * This file contains the definitions for the board using the Z0 + * stepping of the SoC. The ethernet switch has a "wan" port. +*/ + +/dts-v1/; + +#include "kirkwood-rd88f6281.dtsi" + +/ { + model = "Marvell RD88f6281 Reference design, with Z0 SoC"; + compatible = "marvell,rd88f6281-z0", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood"; + + dsa@0 { + switch@0 { + reg = <0 0>; /* MDIO address 0, switch 0 in tree */ + port@4 { + reg = <4>; + label = "wan"; + }; + }; + }; +}; + +ð1 { + status = "disabled"; +};
arch/arm/boot/dts/kirkwood-rd88f6281.dtsi +5 -22
@@ -37,7 +37,6 @@ ocp@f1000000 { pinctrl: pin-controller@10000 { - pinctrl-0 = <&pmx_sdio_cd>; pinctrl-names = "default"; pmx_sdio_cd: pmx-sdio-cd {
@@ -69,8 +68,8 @@ #address-cells = <2>; #size-cells = <0>; - dsa,ethernet = <ð0>; - dsa,mii-bus = <ðphy1>; + dsa,ethernet = <ð0port>; + dsa,mii-bus = <&mdio>; switch@0 { #address-cells = <1>;
@@ -119,35 +118,19 @@ }; partition@300000 { - label = "data"; + label = "rootfs"; reg = <0x0300000 0x500000>; }; }; &mdio { status = "okay"; - - ethphy0: ethernet-phy@0 { - reg = <0>; - }; - - ethphy1: ethernet-phy@ff { - reg = <0xff>; /* No PHY attached */ - speed = <1000>; - duple = <1>; - }; }; ð0 { status = "okay"; ethernet0-port@0 { - phy-handle = <ðphy0>; - }; -}; - -ð1 { - status = "okay"; - ethernet1-port@0 { - phy-handle = <ðphy1>; + speed = <1000>; + duplex = <1>; }; };
arch/arm/boot/dts/kirkwood.dtsi +2 -2
@@ -309,7 +309,7 @@ marvell,tx-checksum-limit = <1600>; status = "disabled"; - ethernet0-port@0 { + eth0port: ethernet0-port@0 { compatible = "marvell,kirkwood-eth-port"; reg = <0>; interrupts = <11>;
@@ -342,7 +342,7 @@ pinctrl-names = "default"; status = "disabled"; - ethernet1-port@0 { + eth1port: ethernet1-port@0 { compatible = "marvell,kirkwood-eth-port"; reg = <0>; interrupts = <15>;
arch/arm/boot/dts/sama5d3_can.dtsi +1 -1
@@ -40,7 +40,7 @@ atmel,clk-output-range = <0 66000000>; }; - can1_clk: can0_clk { + can1_clk: can1_clk { #clock-cells = <0>; reg = <41>; atmel,clk-output-range = <0 66000000>;
arch/arm/mach-at91/clock.c +1 -0
@@ -962,6 +962,7 @@ static int __init at91_clock_reset(void) }at91_pmc_write (AT91_PMC_SCDR , scdr); +at91_pmc_write (AT91_PMC_PCDR , pcdr);if (cpu_is_sama5d3 ())at91_pmc_write (AT91_PMC_PCDR1 , pcdr1);
arch/arm64/include/asm/compat.h +2 -2
@@ -37,8 +37,8 @@ typedef s32 compat_ssize_t;typedef s32 compat_time_t ;typedef s32 compat_clock_t ;typedef s32 compat_pid_t ; -typedef u32 __compat_uid_t ; -typedef u32 __compat_gid_t ; +typedef u16 __compat_uid_t ; +typedef u16 __compat_gid_t ;typedef u16 __compat_uid16_t ;typedef u16 __compat_gid16_t ;typedef u32 __compat_uid32_t ;
arch/arm64/kernel/entry.S +0 -1
@@ -298,7 +298,6 @@ el1_dbg: mrs x0, far_el1 mov x2, sp // struct pt_regs bl do_debug_exception - enable_dbg kernel_exit 1 el1_inv: // TODO: add support for undefined instructions in kernel mode
arch/m68k/mm/hwtest.c +6 -0
@@ -28,9 +28,11 @@int hwreg_present (volatile void *regp ) {int ret =0 ; +unsigned long flags;long save_sp, save_vbr;long tmp_vectors[3 ]; +local_irq_save (flags); __asm__ __volatile__ ("movec %/vbr,%2\n\t" "movel #Lberr1,%4@(8)\n\t"
@@ -46,6 +48,7 @@ int hwreg_present( volatile void *regp ) : "=&d" (ret), "=&r" (save_sp), "=&r" (save_vbr) : "a" (regp), "a" (tmp_vectors) ); +local_irq_restore (flags);return ( ret ); }
@@ -58,9 +61,11 @@ EXPORT_SYMBOL(hwreg_present);int hwreg_write (volatile void *regp,unsigned short val ) {int ret; +unsigned long flags;long save_sp, save_vbr;long tmp_vectors[3 ]; +local_irq_save (flags); __asm__ __volatile__ ("movec %/vbr,%2\n\t" "movel #Lberr2,%4@(8)\n\t"
@@ -78,6 +83,7 @@ int hwreg_write( volatile void *regp, unsigned short val ) : "=&d" (ret), "=&r" (save_sp), "=&r" (save_vbr) : "a" (regp), "a" (tmp_vectors), "g" (val) ); +local_irq_restore (flags);return ( ret ); }
arch/powerpc/kernel/eeh_pe.c +18 -3
@@ -570,6 +570,8 @@ static void *__eeh_pe_state_clear(void *data, void *flag) {struct eeh_pe *pe = (struct eeh_pe *)data;int state = *((int *)flag); +struct eeh_dev *edev, *tmp; +struct pci_dev *pdev;/* Keep the state of permanently removed PE intact */ if ((pe->freeze_count > EEH_MAX_ALLOWED_FREEZES) &&
@@ -578,9 +580,22 @@ static void *__eeh_pe_state_clear(void *data, void *flag) pe->state &= ~state; -/* Clear check count since last isolation */ -if (state &EEH_PE_ISOLATED ) - pe->check_count =0 ; +/* +* Special treatment on clearing isolated state. Clear +* check count since last isolation and put all affected +* devices to normal state. +*/ +if (!(state &EEH_PE_ISOLATED )) +return NULL ; + + pe->check_count =0 ; +eeh_pe_for_each_dev (pe, edev, tmp) { + pdev =eeh_dev_to_pci_dev (edev); +if (!pdev) +continue ; + + pdev->error_state = pci_channel_io_normal; + }return NULL ; }
arch/powerpc/platforms/pseries/iommu.c +28 -23
116 lines not on this page · raw message
arch/s390/kvm/interrupt.c +1 -0
@@ -85,6 +85,7 @@ static int __interrupt_is_deliverable(struct kvm_vcpu *vcpu,return 0 ;if (vcpu->arch.sie_block->gcr[0 ] &0x2000ul )return 1 ; +return 0 ;case KVM_S390_INT_EMERGENCY :if (psw_extint_disabled (vcpu))return 0 ;
arch/sparc/Kconfig +1 -0
@@ -67,6 +67,7 @@ config SPARC64 select HAVE_SYSCALL_TRACEPOINTS select HAVE_CONTEXT_TRACKING select HAVE_DEBUG_KMEMLEAK + select SPARSE_IRQ select RTC_DRV_CMOS select RTC_DRV_BQ4802 select RTC_DRV_SUN4V
arch/sparc/include/asm/hypervisor.h +11 -0
@@ -2947,6 +2947,16 @@ unsigned long sun4v_vt_set_perfreg(unsigned long reg_num, unsigned long reg_val);#endif +#define HV_FAST_T5_GET_PERFREG 0x1a8 +#define HV_FAST_T5_SET_PERFREG 0x1a9 + +#ifndef __ASSEMBLY__ +unsigned long sun4v_t5_get_perfreg (unsigned long reg_num, +unsigned long *reg_val); +unsigned long sun4v_t5_set_perfreg (unsigned long reg_num, +unsigned long reg_val); +#endif +/* Function numbers for HV_CORE_TRAP. */ #define HV_CORE_SET_VER 0x00#define HV_CORE_PUTCHAR 0x01
@@ -2978,6 +2988,7 @@ unsigned long sun4v_vt_set_perfreg(unsigned long reg_num,#define HV_GRP_VF_CPU 0x0205#define HV_GRP_KT_CPU 0x0209#define HV_GRP_VT_CPU 0x020c +#define HV_GRP_T5_CPU 0x0211#define HV_GRP_DIAG 0x0300#ifndef __ASSEMBLY__
arch/sparc/include/asm/irq_64.h +2 -5
@@ -37,7 +37,7 @@* * ino_bucket->irq allocation is made during {sun4v_,}build_irq(). */ -#define NR_IRQS 255 +#define NR_IRQS (2048) void irq_install_pre_handler(int irq, void (*func)(unsigned int, void *, void *),
@@ -57,11 +57,8 @@ unsigned int sun4u_build_msi(u32 portid, unsigned int *irq_p, unsigned long iclr_base);void sun4u_destroy_msi (unsigned int irq); -unsigned char irq_alloc (unsigned int dev_handle, -unsigned int dev_ino); -#ifdef CONFIG_PCI_MSI +unsigned int irq_alloc (unsigned int dev_handle,unsigned int dev_ino);void irq_free (unsigned int irq); -#endif void __init init_IRQ (void );void fixup_irqs (void );
arch/sparc/include/asm/ldc.h +3 -2
@@ -53,13 +53,14 @@ struct ldc_channel;/* Allocate state for a channel. */ struct ldc_channel *ldc_alloc (unsigned long id,const struct ldc_channel_config *cfgp, -void *event_arg); +void *event_arg, +const char *name);/* Shut down and free state for a channel. */ void ldc_free (struct ldc_channel *lp);/* Register TX and RX queues of the link with the hypervisor. */ -int ldc_bind (struct ldc_channel *lp,const char *name); +int ldc_bind (struct ldc_channel *lp);/* For non-RAW protocols we need to complete a handshake before * communication can proceed. ldc_connect() does that, if the
arch/sparc/include/asm/oplib_64.h +2 -1
@@ -62,7 +62,8 @@ struct linux_mem_p1275 {/* You must call prom_init() before using any of the library services, * preferably as early as possible. Pass it the romvec pointer. */ -void prom_init (void *cif_handler,void *cif_stack); +void prom_init (void *cif_handler); +void prom_init_report (void );/* Boot argument acquisition, returns the boot command line string. */ char *prom_getbootargs (void );
arch/sparc/include/asm/page_64.h +14 -19
@@ -57,18 +57,21 @@ void copy_user_page(void *to, void *from, unsigned long vaddr, struct page *topatypedef struct {unsigned long pte; }pte_t ;typedef struct {unsigned long iopte; }iopte_t ;typedef struct {unsigned long pmd; }pmd_t ; +typedef struct {unsigned long pud; }pud_t ;typedef struct {unsigned long pgd; }pgd_t ;typedef struct {unsigned long pgprot; }pgprot_t ;#define pte_val (x) ((x).pte)#define iopte_val (x) ((x).iopte)#define pmd_val (x) ((x).pmd) +#define pud_val (x) ((x).pud)#define pgd_val (x) ((x).pgd)#define pgprot_val (x) ((x).pgprot)#define __pte (x) ((pte_t) { (x) } )#define __iopte (x) ((iopte_t) { (x) } )#define __pmd (x) ((pmd_t) { (x) } ) +#define __pud (x) ((pud_t) { (x) } )#define __pgd (x) ((pgd_t) { (x) } )#define __pgprot (x) ((pgprot_t) { (x) } )
@@ -77,18 +80,21 @@ typedef struct { unsigned long pgprot; } pgprot_t;typedef unsigned long pte_t ;typedef unsigned long iopte_t ;typedef unsigned long pmd_t ; +typedef unsigned long pud_t ;typedef unsigned long pgd_t ;typedef unsigned long pgprot_t ;#define pte_val (x) (x)#define iopte_val (x) (x)#define pmd_val (x) (x) +#define pud_val (x) (x)#define pgd_val (x) (x)#define pgprot_val (x) (x)#define __pte (x) (x)#define __iopte (x) (x)#define __pmd (x) (x) +#define __pud (x) (x)#define __pgd (x) (x)#define __pgprot (x) (x)
@@ -96,21 +102,14 @@ typedef unsigned long pgprot_t;typedef pte_t *pgtable_t ; -/* These two values define the virtual address space range in which we -* must forbid 64-bit user processes from making mappings. It used to -* represent precisely the virtual address space hole present in most -* early sparc64 chips including UltraSPARC-I. But now it also is -* further constrained by the limits of our page tables, which is -* 43-bits of virtual address. -*/ -#define SPARC64_VA_HOLE_TOP _AC(0xfffffc0000000000,UL) -#define SPARC64_VA_HOLE_BOTTOM _AC(0x0000040000000000,UL) +extern unsigned long sparc64_va_hole_top; +extern unsigned long sparc64_va_hole_bottom;/* The next two defines specify the actual exclusion region we * enforce, wherein we use a 4GB red zone on each side of the VA hole. */ -#define VA_EXCLUDE_START (SPARC64_VA_HOLE_BOTTOM - (1UL << 32UL)) -#define VA_EXCLUDE_END (SPARC64_VA_HOLE_TOP + (1UL << 32UL)) +#define VA_EXCLUDE_START (sparc64_va_hole_bottom - (1UL << 32UL)) +#define VA_EXCLUDE_END (sparc64_va_hole_top + (1UL << 32UL))#define TASK_UNMAPPED_BASE (test_thread_flag(TIF_32BIT) ? \ _AC(0x0000000070000000,UL) : \
@@ -118,20 +117,16 @@ typedef pte_t *pgtable_t;#include <asm-generic/memory_model.h> -#define PAGE_OFFSET_BY_BITS (X ) (-(_AC(1,UL) << (X)))extern unsigned long PAGE_OFFSET ;#endif /* !(__ASSEMBLY__) */ -/* The maximum number of physical memory address bits we support, this -* is used to size various tables used to manage kernel TLB misses and -* also the sparsemem code. +/* The maximum number of physical memory address bits we support. The +* largest value we can support is whatever "KPGD_SHIFT + KPTE_BITS" +* evaluates to. */ -#define MAX_PHYS_ADDRESS_BITS 47 +#define MAX_PHYS_ADDRESS_BITS 53 -/* These two shift counts are used when indexing sparc64_valid_addr_bitmap -* and kpte_linear_bitmap. -*/ #define ILOG2_4MB 22#define ILOG2_256MB 28
arch/sparc/include/asm/pgalloc_64.h +27 -1
@@ -15,6 +15,13 @@extern struct kmem_cache *pgtable_cache; +static inline void __pgd_populate (pgd_t *pgd,pud_t *pud) +{ +pgd_set (pgd, pud); +} + +#define pgd_populate (MM ,PGD ,PUD ) __pgd_populate(PGD, PUD) +static inline pgd_t *pgd_alloc (struct mm_struct *mm) {return kmem_cache_alloc (pgtable_cache,GFP_KERNEL );
@@ -25,7 +32,23 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)kmem_cache_free (pgtable_cache, pgd); } -#define pud_populate (MM ,PUD ,PMD ) pud_set(PUD, PMD) +static inline void __pud_populate (pud_t *pud,pmd_t *pmd) +{ +pud_set (pud, pmd); +} + +#define pud_populate (MM ,PUD ,PMD ) __pud_populate(PUD, PMD) + +static inline pud_t *pud_alloc_one (struct mm_struct *mm,unsigned long addr) +{ +return kmem_cache_alloc (pgtable_cache, +GFP_KERNEL |__GFP_REPEAT); +} + +static inline void pud_free (struct mm_struct *mm,pud_t *pud) +{ +kmem_cache_free (pgtable_cache, pud); +}static inline pmd_t *pmd_alloc_one (struct mm_struct *mm,unsigned long addr) {
@@ -91,4 +114,7 @@ static inline void __pte_free_tlb(struct mmu_gather *tlb, pte_t *pte,#define __pmd_free_tlb (tlb, pmd, addr) \ pgtable_free_tlb(tlb, pmd, false) +#define __pud_free_tlb (tlb, pud, addr) \ + pgtable_free_tlb(tlb, pud, false) +#endif /* _SPARC64_PGALLOC_H */
arch/sparc/include/asm/pgtable_64.h +64 -36
197 lines not on this page · raw message
arch/sparc/include/asm/setup.h +2 -0
@@ -48,6 +48,8 @@ unsigned long safe_compute_effective_address(struct pt_regs *, unsigned int);#endif #ifdef CONFIG_SPARC64 +void __init start_early_boot (void ); +/* unaligned_64.c */ int handle_ldf_stq (u32 insn,struct pt_regs *regs);void handle_ld_nf (u32 insn,struct pt_regs *regs);
arch/sparc/include/asm/spitfire.h +2 -0
@@ -45,6 +45,8 @@#define SUN4V_CHIP_NIAGARA3 0x03#define SUN4V_CHIP_NIAGARA4 0x04#define SUN4V_CHIP_NIAGARA5 0x05 +#define SUN4V_CHIP_SPARC_M6 0x06 +#define SUN4V_CHIP_SPARC_M7 0x07#define SUN4V_CHIP_SPARC64X 0x8a#define SUN4V_CHIP_UNKNOWN 0xff
arch/sparc/include/asm/thread_info_64.h +3 -1
@@ -63,7 +63,8 @@ struct thread_info {struct pt_regs *kern_una_regs;unsigned int kern_una_insn; - unsigned long fpregs[0] __attribute__ ((aligned(64))); + unsigned long fpregs[(7 * 256) / sizeof(unsigned long)] + __attribute__ ((aligned(64))); };#endif /* !(__ASSEMBLY__) */
@@ -102,6 +103,7 @@ struct thread_info {#define FAULT_CODE_ITLB 0x04/* Miss happened in I-TLB */ #define FAULT_CODE_WINFIXUP 0x08/* Miss happened during spill/fill */ #define FAULT_CODE_BLKCOMMIT 0x10/* Use blk-commit ASI in copy_page */ +#define FAULT_CODE_BAD_RA 0x20/* Bad RA for sun4v */ #if PAGE_SHIFT ==13 #define THREAD_SIZE (2*PAGE_SIZE)
arch/sparc/include/asm/tsb.h +63 -24
135 lines not on this page · raw message
arch/sparc/include/asm/visasm.h +8 -0
@@ -39,6 +39,14 @@ 297: wr %o5, FPRS_FEF, %fprs; \ 298: +#define VISEntryHalfFast (fail_label) \ + rd %fprs, %o5; \ + andcc %o5, FPRS_FEF, %g0; \ + be,pt %icc, 297f; \ + nop; \ + ba,a,pt %xcc, fail_label; \ +297: wr %o5, FPRS_FEF, %fprs; +#define VISExitHalf \ wr %o5, 0, %fprs;
arch/sparc/kernel/cpu.c +12 -0
@@ -494,6 +494,18 @@ static void __init sun4v_cpu_probe(void) sparc_pmu_type ="niagara5" ;break ; +case SUN4V_CHIP_SPARC_M6 : + sparc_cpu_type ="SPARC-M6" ; + sparc_fpu_type ="SPARC-M6 integrated FPU" ; + sparc_pmu_type ="sparc-m6" ; +break ; + +case SUN4V_CHIP_SPARC_M7 : + sparc_cpu_type ="SPARC-M7" ; + sparc_fpu_type ="SPARC-M7 integrated FPU" ; + sparc_pmu_type ="sparc-m7" ; +break ; +case SUN4V_CHIP_SPARC64X : sparc_cpu_type ="SPARC64-X" ; sparc_fpu_type ="SPARC64-X integrated FPU" ;
arch/sparc/kernel/cpumap.c +2 -0
@@ -326,6 +326,8 @@ static int iterate_cpu(struct cpuinfo_tree *t, unsigned int root_index)case SUN4V_CHIP_NIAGARA3 :case SUN4V_CHIP_NIAGARA4 :case SUN4V_CHIP_NIAGARA5 : +case SUN4V_CHIP_SPARC_M6 : +case SUN4V_CHIP_SPARC_M7 :case SUN4V_CHIP_SPARC64X : rover_inc_table = niagara_iterate_method;break ;
arch/sparc/kernel/ds.c +2 -2
@@ -1200,14 +1200,14 @@ static int ds_probe(struct vio_dev *vdev, const struct vio_device_id *id) ds_cfg.tx_irq = vdev->tx_irq; ds_cfg.rx_irq = vdev->rx_irq; - lp =ldc_alloc (vdev->channel_id, &ds_cfg, dp); + lp =ldc_alloc (vdev->channel_id, &ds_cfg, dp,"DS" );if (IS_ERR (lp)) { err =PTR_ERR (lp); goto out_free_ds_states; } dp->lp = lp; - err =ldc_bind (lp,"DS" ); + err =ldc_bind (lp);if (err) goto out_free_ldc;
arch/sparc/kernel/dtlb_prot.S +3 -3
@@ -24,11 +24,11 @@ mov TLB_TAG_ACCESS, %g4 ! For reload of vaddr /* PROT ** ICACHE line 2: More real fault processing */ + ldxa [%g4] ASI_DMMU, %g5 ! Put tagaccess in %g5 bgu,pn %xcc, winfix_trampoline ! Yes, perform winfixup - ldxa [%g4] ASI_DMMU, %g5 ! Put tagaccess in %g5 - ba,pt %xcc, sparc64_realfault_common ! Nope, normal fault mov FAULT_CODE_DTLB | FAULT_CODE_WRITE, %g4 - nop + ba,pt %xcc, sparc64_realfault_common ! Nope, normal fault + nop nop nop nop
arch/sparc/kernel/entry.h +0 -3
@@ -65,13 +65,10 @@ struct pause_patch_entry {extern struct pause_patch_entry __pause_3insn_patch, __pause_3insn_patch_end; -void __init per_cpu_patch (void );void sun4v_patch_1insn_range (struct sun4v_1insn_patch_entry *,struct sun4v_1insn_patch_entry *);void sun4v_patch_2insn_range (struct sun4v_2insn_patch_entry *,struct sun4v_2insn_patch_entry *); -void __init sun4v_patch (void ); -void __init boot_cpu_id_too_large (int cpu);extern unsigned int dcache_parity_tl1_occurred;extern unsigned int icache_parity_tl1_occurred;
arch/sparc/kernel/head_64.S +16 -36
86 lines not on this page · raw message
arch/sparc/kernel/hvapi.c +1 -0
@@ -46,6 +46,7 @@ static struct api_info api_table[] = { { .group = HV_GRP_VF_CPU, }, { .group = HV_GRP_KT_CPU, }, { .group = HV_GRP_VT_CPU, }, + { .group = HV_GRP_T5_CPU, }, { .group = HV_GRP_DIAG, .flags = FLAG_PRE_API }, };
arch/sparc/kernel/hvcalls.S +16 -0
@@ -821,3 +821,19 @@ ENTRY(sun4v_vt_set_perfreg) retl nop ENDPROC(sun4v_vt_set_perfreg) + +ENTRY(sun4v_t5_get_perfreg) + mov %o1, %o4 + mov HV_FAST_T5_GET_PERFREG, %o5 + ta HV_FAST_TRAP + stx %o1, [%o4] + retl + nop +ENDPROC(sun4v_t5_get_perfreg) + +ENTRY(sun4v_t5_set_perfreg) + mov HV_FAST_T5_SET_PERFREG, %o5 + ta HV_FAST_TRAP + retl + nop +ENDPROC(sun4v_t5_set_perfreg)
arch/sparc/kernel/hvtramp.S +0 -1
@@ -109,7 +109,6 @@ hv_cpu_startup: sllx %g5, THREAD_SHIFT, %g5 sub %g5, (STACKFRAME_SZ + STACK_BIAS), %g5 add %g6, %g5, %sp - mov 0, %fp call init_irqwork_curcpu nop
arch/sparc/kernel/ioport.c +3 -2
@@ -278,7 +278,8 @@ static void *sbus_alloc_coherent(struct device *dev, size_t len, } order =get_order (len_total); -if ((va =__get_free_pages (GFP_KERNEL |__GFP_COMP, order)) ==0 ) + va =__get_free_pages (gfp, order); +if (va ==0 ) goto err_nopages;if ((res =kzalloc (sizeof (struct resource ),GFP_KERNEL )) ==NULL )
@@ -443,7 +444,7 @@ static void *pci32_alloc_coherent(struct device *dev, size_t len, } order =get_order (len_total); - va = (void *)__get_free_pages (GFP_KERNEL , order); + va = (void *)__get_free_pages (gfp, order);if (va ==NULL ) {printk ("pci_alloc_consistent: no %ld pages\n" , len_total>>PAGE_SHIFT ); goto err_nopages;
arch/sparc/kernel/irq_64.c +338 -169
678 lines not on this page · raw message
arch/sparc/kernel/ktlb.S +15 -110
169 lines not on this page · raw message
arch/sparc/kernel/ldc.c +21 -20
71 lines not on this page · raw message
arch/sparc/kernel/nmi.c +0 -1
@@ -130,7 +130,6 @@ static inline unsigned int get_nmi_count(int cpu)static __init void nmi_cpu_busy (void *data) { -local_irq_enable_in_hardirq ();while (endflag ==0 )mb (); }
arch/sparc/kernel/pcr.c +43 -4
77 lines not on this page · raw message
arch/sparc/kernel/perf_event.c +7 -3
@@ -1662,7 +1662,8 @@ static bool __init supported_pmu(void) sparc_pmu = &niagara2_pmu;return true; } -if (!strcmp (sparc_pmu_type,"niagara4" )) { +if (!strcmp (sparc_pmu_type,"niagara4" ) || + !strcmp (sparc_pmu_type,"niagara5" )) { sparc_pmu = &niagara4_pmu;return true; }
@@ -1671,9 +1672,12 @@ static bool __init supported_pmu(void)static int __init init_hw_perf_events (void ) { +int err; +pr_info ("Performance events: " ); -if (!supported_pmu ()) { + err =pcr_arch_init (); +if (err || !supported_pmu ()) {pr_cont ("No support for PMU type '%s'\n" , sparc_pmu_type);return 0 ; }
@@ -1685,7 +1689,7 @@ static int __init init_hw_perf_events(void)return 0 ; } -early_initcall (init_hw_perf_events); +pure_initcall (init_hw_perf_events);void perf_callchain_kernel (struct perf_callchain_entry *entry,struct pt_regs *regs)
arch/sparc/kernel/process_64.c +3 -0
@@ -312,6 +312,9 @@ static void __global_pmu_self(int this_cpu)struct global_pmu_snapshot *pp;int i, num; +if (!pcr_ops) +return ; + pp = &global_cpu_snapshot[this_cpu].pmu; num =1 ;
arch/sparc/kernel/setup_64.c +28 -8
@@ -30,6 +30,7 @@#include <linux/cpu.h> #include <linux/initrd.h> #include <linux/module.h> +#include <linux/start_kernel.h> #include <asm/io.h> #include <asm/processor.h>
@@ -174,7 +175,7 @@ char reboot_command[COMMAND_LINE_SIZE];static struct pt_regs fake_swapper_regs = { {0 , },0 ,0 ,0 ,0 }; -void __init per_cpu_patch (void ) +static void __init per_cpu_patch (void ) {struct cpuid_patch_entry *p;unsigned long ver;
@@ -266,7 +267,7 @@ void sun4v_patch_2insn_range(struct sun4v_2insn_patch_entry *start, } } -void __init sun4v_patch (void ) +static void __init sun4v_patch (void ) {extern void sun4v_hvapi_init (void );
@@ -335,14 +336,25 @@ static void __init pause_patch(void) } } -#ifdef CONFIG_SMP -void __init boot_cpu_id_too_large (int cpu) +void __init start_early_boot (void ) { -prom_printf ("Serious problem, boot cpu id (%d) >= NR_CPUS (%d)\n" , - cpu,NR_CPUS ); -prom_halt (); +int cpu; + +check_if_starfire (); +per_cpu_patch (); +sun4v_patch (); + + cpu =hard_smp_processor_id (); +if (cpu >=NR_CPUS ) { +prom_printf ("Serious problem, boot cpu id (%d) >= NR_CPUS (%d)\n" , + cpu,NR_CPUS ); +prom_halt (); + } +current_thread_info ()->cpu = cpu; + +prom_init_report (); +start_kernel (); } -#endif /* On Ultra, we support all of the v8 capabilities. */ unsigned long sparc64_elf_hwcap = (HWCAP_SPARC_FLUSH | HWCAP_SPARC_STBAR |
@@ -500,12 +512,16 @@ static void __init init_sparc64_elf_hwcap(void) sun4v_chip_type ==SUN4V_CHIP_NIAGARA3 || sun4v_chip_type ==SUN4V_CHIP_NIAGARA4 || sun4v_chip_type ==SUN4V_CHIP_NIAGARA5 || + sun4v_chip_type ==SUN4V_CHIP_SPARC_M6 || + sun4v_chip_type ==SUN4V_CHIP_SPARC_M7 || sun4v_chip_type == SUN4V_CHIP_SPARC64X) cap |= HWCAP_SPARC_BLKINIT;if (sun4v_chip_type ==SUN4V_CHIP_NIAGARA2 || sun4v_chip_type ==SUN4V_CHIP_NIAGARA3 || sun4v_chip_type ==SUN4V_CHIP_NIAGARA4 || sun4v_chip_type ==SUN4V_CHIP_NIAGARA5 || + sun4v_chip_type ==SUN4V_CHIP_SPARC_M6 || + sun4v_chip_type ==SUN4V_CHIP_SPARC_M7 || sun4v_chip_type ==SUN4V_CHIP_SPARC64X ) cap |=HWCAP_SPARC_N2 ; }
@@ -533,6 +549,8 @@ static void __init init_sparc64_elf_hwcap(void) sun4v_chip_type ==SUN4V_CHIP_NIAGARA3 || sun4v_chip_type ==SUN4V_CHIP_NIAGARA4 || sun4v_chip_type ==SUN4V_CHIP_NIAGARA5 || + sun4v_chip_type ==SUN4V_CHIP_SPARC_M6 || + sun4v_chip_type ==SUN4V_CHIP_SPARC_M7 || sun4v_chip_type == SUN4V_CHIP_SPARC64X) cap |= (AV_SPARC_VIS | AV_SPARC_VIS2 | AV_SPARC_ASI_BLK_INIT |
@@ -540,6 +558,8 @@ static void __init init_sparc64_elf_hwcap(void)if (sun4v_chip_type ==SUN4V_CHIP_NIAGARA3 || sun4v_chip_type ==SUN4V_CHIP_NIAGARA4 || sun4v_chip_type ==SUN4V_CHIP_NIAGARA5 || + sun4v_chip_type ==SUN4V_CHIP_SPARC_M6 || + sun4v_chip_type ==SUN4V_CHIP_SPARC_M7 || sun4v_chip_type ==SUN4V_CHIP_SPARC64X ) cap |= (AV_SPARC_VIS3 |AV_SPARC_HPC |AV_SPARC_FMAF );
arch/sparc/kernel/smp_64.c +7 -1
@@ -1383,7 +1383,6 @@ void __cpu_die(unsigned int cpu)void __init smp_cpus_done (unsigned int max_cpus) { -pcr_arch_init (); }void smp_send_reschedule (int cpu)
@@ -1468,6 +1467,13 @@ static void __init pcpu_populate_pte(unsigned long addr)pud_t *pud;pmd_t *pmd; +if (pgd_none (*pgd)) { +pud_t *new; + + new =__alloc_bootmem (PAGE_SIZE ,PAGE_SIZE ,PAGE_SIZE ); +pgd_populate (&init_mm, pgd, new); + } + pud =pud_offset (pgd, addr);if (pud_none (*pud)) {pmd_t *new;
arch/sparc/kernel/sun4v_tlb_miss.S +21 -14
@@ -195,6 +195,11 @@ sun4v_tsb_miss_common: ldx [%g2 + TRAP_PER_CPU_PGD_PADDR], %g7 sun4v_itlb_error: + rdpr %tl, %g1 + cmp %g1, 1 + ble,pt %icc, sun4v_bad_ra + or %g0, FAULT_CODE_BAD_RA | FAULT_CODE_ITLB, %g1 + sethi %hi(sun4v_err_itlb_vaddr), %g1 stx %g4, [%g1 + %lo(sun4v_err_itlb_vaddr)] sethi %hi(sun4v_err_itlb_ctx), %g1
@@ -206,15 +211,10 @@ sun4v_itlb_error: sethi %hi(sun4v_err_itlb_error), %g1 stx %o0, [%g1 + %lo(sun4v_err_itlb_error)] + sethi %hi(1f), %g7 rdpr %tl, %g4 - cmp %g4, 1 - ble,pt %icc, 1f - sethi %hi(2f), %g7 ba,pt %xcc, etraptl1 - or %g7, %lo(2f), %g7 - -1: ba,pt %xcc, etrap -2: or %g7, %lo(2b), %g7 +1: or %g7, %lo(1f), %g7 mov %l4, %o1 call sun4v_itlb_error_report add %sp, PTREGS_OFF, %o0
@@ -222,6 +222,11 @@ sun4v_itlb_error: /* NOTREACHED */ sun4v_dtlb_error: + rdpr %tl, %g1 + cmp %g1, 1 + ble,pt %icc, sun4v_bad_ra + or %g0, FAULT_CODE_BAD_RA | FAULT_CODE_DTLB, %g1 + sethi %hi(sun4v_err_dtlb_vaddr), %g1 stx %g4, [%g1 + %lo(sun4v_err_dtlb_vaddr)] sethi %hi(sun4v_err_dtlb_ctx), %g1
@@ -233,21 +238,23 @@ sun4v_dtlb_error: sethi %hi(sun4v_err_dtlb_error), %g1 stx %o0, [%g1 + %lo(sun4v_err_dtlb_error)] + sethi %hi(1f), %g7 rdpr %tl, %g4 - cmp %g4, 1 - ble,pt %icc, 1f - sethi %hi(2f), %g7 ba,pt %xcc, etraptl1 - or %g7, %lo(2f), %g7 - -1: ba,pt %xcc, etrap -2: or %g7, %lo(2b), %g7 +1: or %g7, %lo(1f), %g7 mov %l4, %o1 call sun4v_dtlb_error_report add %sp, PTREGS_OFF, %o0 /* NOTREACHED */ +sun4v_bad_ra: + or %g0, %g4, %g5 + ba,pt %xcc, sparc64_realfault_common + or %g1, %g0, %g4 + + /* NOTREACHED */ + /* Instruction Access Exception, tl0. */ sun4v_iacc: ldxa [%g0] ASI_SCRATCHPAD, %g2
arch/sparc/kernel/trampoline_64.S +7 -5
@@ -109,10 +109,13 @@ startup_continue: brnz,pn %g1, 1b nop - sethi %hi(p1275buf), %g2 - or %g2, %lo(p1275buf), %g2 - ldx [%g2 + 0x10], %l2 - add %l2, -(192 + 128), %sp + /* Get onto temporary stack which will be in the locked + * kernel image. + */ + sethi %hi(tramp_stack), %g1 + or %g1, %lo(tramp_stack), %g1 + add %g1, TRAMP_STACK_SIZE, %g1 + sub %g1, STACKFRAME_SZ + STACK_BIAS + 256, %sp flushw /* Setup the loop variables:
@@ -394,7 +397,6 @@ after_lock_tlb: sllx %g5, THREAD_SHIFT, %g5 sub %g5, (STACKFRAME_SZ + STACK_BIAS), %g5 add %g6, %g5, %sp - mov 0, %fp rdpr %pstate, %o1 or %o1, PSTATE_IE, %o1
arch/sparc/kernel/traps_64.c +9 -6
@@ -2104,6 +2104,11 @@ void sun4v_nonresum_overflow(struct pt_regs *regs)atomic_inc (&sun4v_nonresum_oflow_cnt); } +static void sun4v_tlb_error (struct pt_regs *regs) +{ +die_if_kernel ("TLB/TSB error" , regs); +} +unsigned long sun4v_err_itlb_vaddr;unsigned long sun4v_err_itlb_ctx;unsigned long sun4v_err_itlb_pte;
@@ -2111,8 +2116,7 @@ unsigned long sun4v_err_itlb_error;void sun4v_itlb_error_report (struct pt_regs *regs,int tl) { -if (tl >1 ) -dump_tl1_traplog ((struct tl1_traplog *)(regs +1 )); +dump_tl1_traplog ((struct tl1_traplog *)(regs +1 ));printk (KERN_EMERG "SUN4V-ITLB: Error at TPC[%lx], tl %d\n" , regs->tpc, tl);
@@ -2125,7 +2129,7 @@ void sun4v_itlb_error_report(struct pt_regs *regs, int tl) sun4v_err_itlb_vaddr, sun4v_err_itlb_ctx, sun4v_err_itlb_pte, sun4v_err_itlb_error); -prom_halt (); +sun4v_tlb_error (regs); }unsigned long sun4v_err_dtlb_vaddr;
@@ -2135,8 +2139,7 @@ unsigned long sun4v_err_dtlb_error;void sun4v_dtlb_error_report (struct pt_regs *regs,int tl) { -if (tl >1 ) -dump_tl1_traplog ((struct tl1_traplog *)(regs +1 )); +dump_tl1_traplog ((struct tl1_traplog *)(regs +1 ));printk (KERN_EMERG "SUN4V-DTLB: Error at TPC[%lx], tl %d\n" , regs->tpc, tl);
@@ -2149,7 +2152,7 @@ void sun4v_dtlb_error_report(struct pt_regs *regs, int tl) sun4v_err_dtlb_vaddr, sun4v_err_dtlb_ctx, sun4v_err_dtlb_pte, sun4v_err_dtlb_error); -prom_halt (); +sun4v_tlb_error (regs); }void hypervisor_tlbop_error (unsigned long err,unsigned long op)
arch/sparc/kernel/tsb.S +3 -3
@@ -162,10 +162,10 @@ tsb_miss_page_table_walk_sun4v_fastpath: nop .previous - rdpr %tl, %g3 - cmp %g3, 1 + rdpr %tl, %g7 + cmp %g7, 1 bne,pn %xcc, winfix_trampoline - nop + mov %g3, %g4 ba,pt %xcc, etrap rd %pc, %g7 call hugetlb_setup
arch/sparc/kernel/viohs.c +2 -2
@@ -714,7 +714,7 @@ int vio_ldc_alloc(struct vio_driver_state *vio, cfg.tx_irq = vio->vdev->tx_irq; cfg.rx_irq = vio->vdev->rx_irq; - lp =ldc_alloc (vio->vdev->channel_id, &cfg, event_arg); + lp =ldc_alloc (vio->vdev->channel_id, &cfg, event_arg, vio->name);if (IS_ERR (lp))return PTR_ERR (lp);
@@ -746,7 +746,7 @@ void vio_port_up(struct vio_driver_state *vio) err =0 ;if (state ==LDC_STATE_INIT ) { - err =ldc_bind (vio->lp, vio->name); + err =ldc_bind (vio->lp);if (err) printk(KERN_WARNING "%s: Port %lu bind failed, " "err=%d\n",
arch/sparc/kernel/vmlinux.lds.S +3 -7
@@ -35,8 +35,9 @@ jiffies = jiffies_64; SECTIONS { - /* swapper_low_pmd_dir is sparc64 only */ - swapper_low_pmd_dir = 0x0000000000402000; +#ifdef CONFIG_SPARC64 + swapper_pg_dir = 0x0000000000402000; +#endif . = INITIAL_ADDRESS; .text TEXTSTART : {
@@ -122,11 +123,6 @@ SECTIONS *(.swapper_4m_tsb_phys_patch) __swapper_4m_tsb_phys_patch_end = .; } - .page_offset_shift_patch : { - __page_offset_shift_patch = .; - *(.page_offset_shift_patch) - __page_offset_shift_patch_end = .; - } .popc_3insn_patch : { __popc_3insn_patch = .; *(.popc_3insn_patch)
arch/sparc/lib/NG4memcpy.S +13 -1
@@ -41,6 +41,10 @@ #endif #endif +#if !defined(EX_LD) && !defined(EX_ST) +#define NON_USER_COPY +#endif + #ifndef EX_LD #define EX_LD(x) x #endif
@@ -197,9 +201,13 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */ mov EX_RETVAL(%o3), %o0 .Llarge_src_unaligned: +#ifdef NON_USER_COPY + VISEntryHalfFast(.Lmedium_vis_entry_fail) +#else + VISEntryHalf +#endif andn %o2, 0x3f, %o4 sub %o2, %o4, %o2 - VISEntryHalf alignaddr %o1, %g0, %g1 add %o1, %o4, %o1 EX_LD(LOAD(ldd, %g1 + 0x00, %f0))
@@ -240,6 +248,10 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */ nop ba,a,pt %icc, .Lmedium_unaligned +#ifdef NON_USER_COPY +.Lmedium_vis_entry_fail: + or %o0, %o1, %g2 +#endif .Lmedium: LOAD(prefetch, %o1 + 0x40, #n_reads_strong) andcc %g2, 0x7, %g0
arch/sparc/lib/memset.S +14 -4
@@ -3,8 +3,9 @@ * Copyright (C) 1996,1997 Jakub Jelinek ([email protected]) * Copyright (C) 1996 David S. Miller ([email protected]) * - * Returns 0, if ok, and number of bytes not yet set if exception - * occurs and we were called as clear_user. + * Calls to memset returns initial %o0. Calls to bzero returns 0, if ok, and + * number of bytes not yet set if exception occurs and we were called as + * clear_user. */ #include <asm/ptrace.h>
@@ -65,6 +66,8 @@ __bzero_begin: .globl __memset_start, __memset_end __memset_start: memset: + mov %o0, %g1 + mov 1, %g4 and %o1, 0xff, %g3 sll %g3, 8, %g2 or %g3, %g2, %g3
@@ -89,6 +92,7 @@ memset: sub %o0, %o2, %o0 __bzero: + clr %g4 mov %g0, %g3 1: cmp %o1, 7
@@ -151,8 +155,8 @@ __bzero: bne,a 8f EX(stb %g3, [%o0], and %o1, 1) 8: - retl - clr %o0 + b 0f + nop 7: be 13b orcc %o1, 0, %g0
@@ -164,6 +168,12 @@ __bzero: bne 8b EX(stb %g3, [%o0 - 1], add %o1, 1) 0: + andcc %g4, 1, %g0 + be 5f + nop + retl + mov %g1, %o0 +5: retl clr %o0 __memset_end:
arch/sparc/mm/fault_64.c +3 -0
@@ -346,6 +346,9 @@ retry:down_read (&mm->mmap_sem); } +if (fault_code &FAULT_CODE_BAD_RA ) + goto do_sigbus; + vma =find_vma (mm, address);if (!vma) goto bad_area;
arch/sparc/mm/gup.c +30 -0
@@ -160,6 +160,36 @@ static int gup_pud_range(pgd_t pgd, unsigned long addr, unsigned long end,return 1 ; } +int __get_user_pages_fast (unsigned long start,int nr_pages,int write, +struct page **pages) +{ +struct mm_struct *mm = current->mm; +unsigned long addr, len, end; +unsigned long next, flags; +pgd_t *pgdp; +int nr =0 ; + + start &=PAGE_MASK ; + addr = start; + len = (unsigned long ) nr_pages <<PAGE_SHIFT ; + end = start + len; + +local_irq_save (flags); + pgdp =pgd_offset (mm, addr); +do { +pgd_t pgd = *pgdp; + + next =pgd_addr_end (addr, end); +if (pgd_none (pgd)) +break ; +if (!gup_pud_range (pgd, addr, next, write, pages, &nr)) +break ; + }while (pgdp++, addr = next, addr != end); +local_irq_restore (flags); + +return nr; +} +int get_user_pages_fast (unsigned long start,int nr_pages,int write,struct page **pages) {
arch/sparc/mm/init_64.c +278 -276
26 lines not on this page · raw message
drivers/hid/hid-rmi.c +38 -6
44 lines not on this page · raw message
drivers/hv/channel.c +33 -16
49 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/ar5008_phy.c +3 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/iwlwifi/mvm/constants.h +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/iwlwifi/pcie/drv.c +4 -0
Lines of this file are not shown. View the raw message.
fs/btrfs/relocation.c +63 -30
93 lines not on this page · raw message
include/linux/compiler-gcc5.h new file +66 -0
66 lines not on this page · raw message
lib/lzo/lzo1x_decompress_safe.c +57 -46
103 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.