/* * skl-nhlt.h - Intel HDA Platform NHLT header * * Copyright (C) 2015 Intel Corp * Author: Sanjiv Kumar * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * 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 __SKL_NHLT_H__ #define __SKL_NHLT_H__ #include struct wav_fmt { u16 fmt_tag; u16 channels; u32 samples_per_sec; u32 avg_bytes_per_sec; u16 block_align; u16 bits_per_sample; u16 cb_size; } __packed; struct wav_fmt_ext { struct wav_fmt fmt; union samples { u16 valid_bits_per_sample; u16 samples_per_block; u16 reserved; } sample; u32 channel_mask; u8 sub_fmt[16]; } __packed; enum nhlt_link_type { NHLT_LINK_HDA = 0, NHLT_LINK_DSP = 1, NHLT_LINK_DMIC = 2, NHLT_LINK_SSP = 3, NHLT_LINK_INVALID }; enum nhlt_device_type { NHLT_DEVICE_BT = 0, NHLT_DEVICE_DMIC = 1, NHLT_DEVICE_I2S = 4, NHLT_DEVICE_INVALID }; struct nhlt_specific_cfg { u32 size; u8 caps[0]; } __packed; struct nhlt_fmt_cfg { struct wav_fmt_ext fmt_ext; struct nhlt_specific_cfg config; } __packed; struct nhlt_fmt { u8 fmt_count; struct nhlt_fmt_cfg fmt_config[0]; } __packed; struct nhlt_endpoint { u32 length; u8 linktype; u8 instance_id; u16 vendor_id; u16 device_id; u16 revision_id; u32 subsystem_id; u8 device_type; u8 direction; u8 virtual_bus_id; struct nhlt_specific_cfg config; } __packed; struct nhlt_acpi_table { struct acpi_table_header header; u8 endpoint_count; struct nhlt_endpoint desc[0]; } __packed; struct nhlt_resource_desc { u32 extra; u16 flags; u64 addr_spc_gra; u64 min_addr; u64 max_addr; u64 addr_trans_offset; u64 length; } __packed; #define MIC_ARRAY_2CH 2 #define MIC_ARRAY_4CH 4 struct nhlt_tdm_config { u8 virtual_slot; u8 config_type; } __packed; struct nhlt_dmic_array_config { struct nhlt_tdm_config tdm_config; u8 array_type; } __packed; enum { NHLT_MIC_ARRAY_2CH_SMALL = 0xa, NHLT_MIC_ARRAY_2CH_BIG = 0xb, NHLT_MIC_ARRAY_4CH_1ST_GEOM = 0xc, NHLT_MIC_ARRAY_4CH_L_SHAPED = 0xd, NHLT_MIC_ARRAY_4CH_2ND_GEOM = 0xe, NHLT_MIC_ARRAY_VENDOR_DEFINED = 0xf, }; #endif a href='/cgit.cgi/linux/net-next.git/commit/?id=54791b276b4000b307339f269d3bf7db877d536f'>root/sound/core/misc.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-01-30 14:28:22 -0800
committerDavid S. Miller <davem@davemloft.net>2017-01-30 14:28:22 -0800
commit54791b276b4000b307339f269d3bf7db877d536f (patch)
tree1c2616bd373ce5ea28aac2a53e32f5b5834901ce /sound/core/misc.c
parent5d0e7705774dd412a465896d08d59a81a345c1e4 (diff)
parent047487241ff59374fded8c477f21453681f5995c (diff)
Merge branch 'sparc64-non-resumable-user-error-recovery'
Liam R. Howlett says: ==================== sparc64: Recover from userspace non-resumable PIO & MEM errors A non-resumable error from userspace is able to cause a kernel panic or trap loop due to the setup and handling of the queued traps once in the kernel. This patch series addresses both of these issues. The queues are fixed by simply zeroing the memory before use. PIO errors from userspace will result in a SIGBUS being sent to the user process. The MEM errors form userspace will result in a SIGKILL and also cause the offending pages to be claimed so they are no longer used in future tasks. SIGKILL is used to ensure that the process does not try to coredump and result in an attempt to read the memory again from within kernel space. Although there is a HV call to scrub the memory (mem_scrub), there is no easy way to guarantee that the real memory address(es) are not used by other tasks. Clearing the error with mem_scrub would zero the memory and cause the other processes to proceed with bad data. The handling of other non-resumable errors remain unchanged and will cause a panic. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'sound/core/misc.c')