-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlmHya0ACgkQONu9yGCS aT7J4BAArYY7/NDbB+rIFtIdqdk3d6PiOyfQjQB2fSrhdR/+38a3Z+AtfNoPkppd DQsEnXuZyJeUP5GCNAue1urp0nUuuw/Kr/7DUZvfO8wnjFjS/hfKxnRE8o/S+acN y/TBFO3LuWSp8ROouAnAr7EEDrLtses6/boQHiioGcb/uqI9JVutkdnOTnm5xYJQ bAo7dEOlK4trRRGbbMju2FHTFHO/NStos3GD2ORcqS3ibj2FyHvGEmbyyBfmmi+2 Jf5cOvn99lszHweUTxnRw93q6RZcGtmhYoPoANzYdtoZiXkV++EaEAfQ6KPVqeno mLNPqmWWvgJUsd1uCaR89GXwczVJtqThvGuJMroau+ShLJWuI8mL8N/N+g9wThJr ormq8PTP3oea9u63hfae1hfr4KsPqQ6UTQcSY7OuT4mgchU5T/DuSyYShy3kdtx4 bT1hzpXwD9y0JCgPVfH1o7ad996D9/MVXpELNREcvrqEGsvRbxBx7gPc4FUzMqaz vft6z0MX8AvgtNLm9EY5a956ixRG27vGYA7drsLPFXKxIuHQ5oh2nBCupxkrDtGK 0FEWeV6p+DJZm4Gl+0pCYt6AqxzszNW0eVM7sKngbAIYQ77m2h50TOb0HIA0MrKu Nrjs68hKc/louKc1eYQZnt6bD4EVHVjbpgVP+l1PGpKo/OSnxes= =tb62 -----END PGP SIGNATURE----- Merge 4.9.41 into android-4.9 Changes in 4.9.41 af_key: Add lock to key dump pstore: Make spinlock per zone instead of global net: reduce skb_warn_bad_offload() noise jfs: Don't clear SGID when inheriting ACLs ALSA: fm801: Initialize chip after IRQ handler is registered ALSA: hda - Add missing NVIDIA GPU codec IDs to patch table parisc: Prevent TLB speculation on flushed pages on CPUs that only support equivalent aliases parisc: Extend disabled preemption in copy_user_page parisc: Suspend lockup detectors before system halt powerpc/pseries: Fix of_node_put() underflow during reconfig remove NFS: invalidate file size when taking a lock. NFSv4.1: Fix a race where CB_NOTIFY_LOCK fails to wake a waiter crypto: authencesn - Fix digest_null crash KVM: PPC: Book3S HV: Enable TM before accessing TM registers md/raid5: add thread_group worker async_tx_issue_pending_all drm/vmwgfx: Fix gcc-7.1.1 warning drm/nouveau/disp/nv50-: bump max chans to 21 drm/nouveau/bar/gf100: fix access to upper half of BAR2 KVM: PPC: Book3S HV: Restore critical SPRs to host values on guest exit KVM: PPC: Book3S HV: Save/restore host values of debug registers Revert "powerpc/numa: Fix percpu allocations to be NUMA aware" Staging: comedi: comedi_fops: Avoid orphaned proc entry drm: rcar-du: Simplify and fix probe error handling smp/hotplug: Move unparking of percpu threads to the control CPU smp/hotplug: Replace BUG_ON and react useful nfc: Fix hangup of RC-S380* in port100_send_ack() nfc: fdp: fix NULL pointer dereference net: phy: Do not perform software reset for Generic PHY isdn: Fix a sleep-in-atomic bug isdn/i4l: fix buffer overflow ath10k: fix null deref on wmi-tlv when trying spectral scan wil6210: fix deadlock when using fw_no_recovery option mailbox: always wait in mbox_send_message for blocking Tx mode mailbox: skip complete wait event if timer expired mailbox: handle empty message in tx_tick sched/cgroup: Move sched_online_group() back into css_online() to fix crash RDMA/uverbs: Fix the check for port number ipmi/watchdog: fix watchdog timeout set on reboot dentry name snapshots v4l: s5c73m3: fix negation operator pstore: Allow prz to control need for locking pstore: Correctly initialize spinlock and flags pstore: Use dynamic spinlock initializer net: skb_needs_check() accepts CHECKSUM_NONE for tx device-dax: fix sysfs duplicate warnings x86/mce/AMD: Make the init code more robust r8169: add support for RTL8168 series add-on card. ARM: omap2+: fixing wrong strcat for Non-NULL terminated string dt-bindings: power/supply: Update TPS65217 properties dt-bindings: input: Specify the interrupt number of TPS65217 power button ARM: dts: am57xx-idk: Put USB2 port in peripheral mode ARM: dts: n900: Mark eMMC slot with no-sdio and no-sd flags net/mlx5: Disable RoCE on the e-switch management port under switchdev mode ipv6: Should use consistent conditional judgement for ip6 fragment between __ip6_append_data and ip6_finish_output net/mlx4_core: Use-after-free causes a resource leak in flow-steering detach net/mlx4: Remove BUG_ON from ICM allocation routine net/mlx4_core: Fix raw qp flow steering rules under SRIOV drm/msm: Ensure that the hardware write pointer is valid drm/msm: Put back the vaddr in submit_reloc() drm/msm: Verify that MSM_SUBMIT_BO_FLAGS are set vfio-pci: use 32-bit comparisons for register address for gcc-4.5 irqchip/keystone: Fix "scheduling while atomic" on rt ASoC: tlv320aic3x: Mark the RESET register as volatile spi: dw: Make debugfs name unique between instances ASoC: nau8825: fix invalid configuration in Pre-Scalar of FLL irqchip/mxs: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND openrisc: Add _text symbol to fix ksym build error dmaengine: ioatdma: Add Skylake PCI Dev ID dmaengine: ioatdma: workaround SKX ioatdma version l2tp: consider '::' as wildcard address in l2tp_ip6 socket lookup dmaengine: ti-dma-crossbar: Add some 'of_node_put()' in error path. usb: dwc3: omap: fix race of pm runtime with irq handler in probe ARM64: zynqmp: Fix W=1 dtc 1.4 warnings ARM64: zynqmp: Fix i2c node's compatible string perf probe: Fix to get correct modname from elf header ARM: s3c2410_defconfig: Fix invalid values for NF_CT_PROTO_* ACPI / scan: Prefer devices without _HID/_CID for _ADR matching usb: gadget: Fix copy/pasted error message Btrfs: use down_read_nested to make lockdep silent Btrfs: fix lockdep warning about log_mutex benet: stricter vxlan offloading check in be_features_check Btrfs: adjust outstanding_extents counter properly when dio write is split Xen: ARM: Zero reserved fields of xatp before making hypervisor call tools lib traceevent: Fix prev/next_prio for deadline tasks xfrm: Don't use sk_family for socket policy lookups perf tools: Install tools/lib/traceevent plugins with install-bin perf symbols: Robustify reading of build-id from sysfs video: fbdev: cobalt_lcdfb: Handle return NULL error from devm_ioremap vfio-pci: Handle error from pci_iomap arm64: mm: fix show_pte KERN_CONT fallout nvmem: imx-ocotp: Fix wrong register size net: usb: asix_devices: add .reset_resume for USB PM ASoC: fsl_ssi: set fifo watermark to more reliable value sh_eth: enable RX descriptor word 0 shift on SH7734 ARCv2: IRQ: Call entry/exit functions for chained handlers in MCIP ALSA: usb-audio: test EP_FLAG_RUNNING at urb completion x86/platform/intel-mid: Rename 'spidev' to 'mrfld_spidev' perf/x86: Set pmu->module in Intel PMU modules ASoC: Intel: bytcr-rt5640: fix settings in internal clock mode HID: ignore Petzl USB headlamp scsi: fnic: Avoid sending reset to firmware when another reset is in progress scsi: snic: Return error code on memory allocation failure scsi: bfa: Increase requested firmware version to 3.2.5.1 ASoC: Intel: Skylake: Release FW ctx in cleanup ASoC: dpcm: Avoid putting stream state to STOP when FE stream is paused Linux 4.9.41 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
103 lines
2.9 KiB
C
103 lines
2.9 KiB
C
/*
|
|
* Copyright (C) 2010 Marco Stornelli <marco.stornelli@gmail.com>
|
|
* Copyright (C) 2011 Kees Cook <keescook@chromium.org>
|
|
* Copyright (C) 2011 Google, Inc.
|
|
*
|
|
* This software is licensed under the terms of the GNU General Public
|
|
* License version 2, as published by the Free Software Foundation, and
|
|
* may be copied, distributed, and modified under those terms.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
*/
|
|
|
|
#ifndef __LINUX_PSTORE_RAM_H__
|
|
#define __LINUX_PSTORE_RAM_H__
|
|
|
|
#include <linux/compiler.h>
|
|
#include <linux/device.h>
|
|
#include <linux/init.h>
|
|
#include <linux/kernel.h>
|
|
#include <linux/list.h>
|
|
#include <linux/types.h>
|
|
|
|
/*
|
|
* Choose whether access to the RAM zone requires locking or not. If a zone
|
|
* can be written to from different CPUs like with ftrace for example, then
|
|
* PRZ_FLAG_NO_LOCK is used. For all other cases, locking is required.
|
|
*/
|
|
#define PRZ_FLAG_NO_LOCK BIT(0)
|
|
|
|
struct persistent_ram_buffer;
|
|
struct rs_control;
|
|
|
|
struct persistent_ram_ecc_info {
|
|
int block_size;
|
|
int ecc_size;
|
|
int symsize;
|
|
int poly;
|
|
};
|
|
|
|
struct persistent_ram_zone {
|
|
phys_addr_t paddr;
|
|
size_t size;
|
|
void *vaddr;
|
|
struct persistent_ram_buffer *buffer;
|
|
size_t buffer_size;
|
|
u32 flags;
|
|
raw_spinlock_t buffer_lock;
|
|
|
|
/* ECC correction */
|
|
char *par_buffer;
|
|
char *par_header;
|
|
struct rs_control *rs_decoder;
|
|
int corrected_bytes;
|
|
int bad_blocks;
|
|
struct persistent_ram_ecc_info ecc_info;
|
|
|
|
char *old_log;
|
|
size_t old_log_size;
|
|
};
|
|
|
|
struct persistent_ram_zone *persistent_ram_new(phys_addr_t start, size_t size,
|
|
u32 sig, struct persistent_ram_ecc_info *ecc_info,
|
|
unsigned int memtype, u32 flags);
|
|
void persistent_ram_free(struct persistent_ram_zone *prz);
|
|
void persistent_ram_zap(struct persistent_ram_zone *prz);
|
|
|
|
int persistent_ram_write(struct persistent_ram_zone *prz, const void *s,
|
|
unsigned int count);
|
|
int persistent_ram_write_user(struct persistent_ram_zone *prz,
|
|
const void __user *s, unsigned int count);
|
|
|
|
void persistent_ram_save_old(struct persistent_ram_zone *prz);
|
|
size_t persistent_ram_old_size(struct persistent_ram_zone *prz);
|
|
void *persistent_ram_old(struct persistent_ram_zone *prz);
|
|
void persistent_ram_free_old(struct persistent_ram_zone *prz);
|
|
ssize_t persistent_ram_ecc_string(struct persistent_ram_zone *prz,
|
|
char *str, size_t len);
|
|
|
|
void ramoops_console_write_buf(const char *buf, size_t size);
|
|
|
|
/*
|
|
* Ramoops platform data
|
|
* @mem_size memory size for ramoops
|
|
* @mem_address physical memory address to contain ramoops
|
|
*/
|
|
|
|
struct ramoops_platform_data {
|
|
unsigned long mem_size;
|
|
phys_addr_t mem_address;
|
|
unsigned int mem_type;
|
|
unsigned long record_size;
|
|
unsigned long console_size;
|
|
unsigned long ftrace_size;
|
|
unsigned long pmsg_size;
|
|
int dump_oops;
|
|
struct persistent_ram_ecc_info ecc_info;
|
|
};
|
|
|
|
#endif
|