Merge remote-tracking branch 'remotes/origin/tmp-bb60f28' into msm-4.14

* remotes/origin/tmp-bb60f28:
  Linux 4.14.37
  mac80211_hwsim: fix use-after-free bug in hwsim_exit_net
  Revert "KVM: X86: Fix SMRAM accessing even if VM is shutdown"
  RDMA/mlx5: Fix NULL dereference while accessing XRC_TGT QPs
  perf: Return proper values for user stack errors
  perf: Fix sample_max_stack maximum check
  netfilter: x_tables: limit allocation requests for blob rule heads
  netfilter: compat: reject huge allocation requests
  netfilter: compat: prepare xt_compat_init_offsets to return errors
  netfilter: x_tables: add counters allocation wrapper
  netfilter: x_tables: cap allocations at 512 mbyte
  alarmtimer: Init nanosleep alarm timer on stack
  RDMA/core: Reduce poll batch for direct cq polling
  irqchip/gic-v3: Change pr_debug message to pr_devel
  cpumask: Make for_each_cpu_wrap() available on UP as well
  irqchip/gic-v3: Ignore disabled ITS nodes
  perf test: Fix test trace+probe_libc_inet_pton.sh for s390x
  powerpc/powernv: IMC fix out of bounds memory access at shutdown
  locking/qspinlock: Ensure node->count is updated before initialising node
  x86/platform/UV: Fix GAM Range Table entries less than 1GB
  powerpc/mm/hash64: Zero PGD pages on allocation
  vfs/proc/kcore, x86/mm/kcore: Fix SMAP fault when dumping vsyscall user page
  PM / wakeirq: Fix unbalanced IRQ enable for wakeirq
  ACPI / EC: Restore polling during noirq suspend/resume phases
  bpf: fix rlimit in reuseport net selftest
  net: stmmac: discard disabled flags in interrupt status register
  SUNRPC: Don't call __UDPX_INC_STATS() from a preemptible context
  KVM: PPC: Book3S HV: Fix handling of secondary HPTEG in HPT resizing code
  tools/libbpf: handle issues with bpf ELF objects containing .eh_frames
  net: Extra '_get' in declaration of arch_get_platform_mac_address
  svcrdma: Fix Read chunk round-up
  rxrpc: Don't put crypto buffers on the stack
  selftests/ftrace: Add some missing glob checks
  cpufreq: intel_pstate: Enable HWP during system resume on CPU0
  bcache: return attach error when no cache set exist
  bcache: fix for data collapse after re-attaching an attached device
  bcache: fix for allocator and register thread race
  bcache: properly set task state in bch_writeback_thread()
  cifs: silence compiler warnings showing up with gcc-8.0.0
  PM / domains: Fix up domain-idle-states OF parsing
  proc: fix /proc/*/map_files lookup
  arm64: spinlock: Fix theoretical trylock() A-B-A with LSE atomics
  RDS: IB: Fix null pointer issue
  bpf: sockmap, fix leaking maps with attached but not detached progs
  xen/grant-table: Use put_page instead of free_page
  xen-netfront: Fix race between device setup and open
  perf evsel: Fix period/freq terms setup
  MIPS: Generic: Support GIC in EIC mode
  perf record: Fix period option handling
  MIPS: TXx9: use IS_BUILTIN() for CONFIG_LEDS_CLASS
  bpf: fix selftests/bpf test_kmod.sh failure when CONFIG_BPF_JIT_ALWAYS_ON=y
  ACPI / scan: Use acpi_bus_get_status() to initialize ACPI_TYPE_DEVICE devs
  ACPI / bus: Do not call _STA on battery devices with unmet dependencies
  ACPI: processor_perflib: Do not send _PPC change notification if not ready
  firmware: dmi_scan: Fix handling of empty DMI strings
  x86/dumpstack: Avoid uninitlized variable
  x86/power: Fix swsusp_arch_resume prototype
  netfilter: ipv6: nf_defrag: Kill frag queue on RFC2460 failure
  s390/eadm: fix CONFIG_BLOCK include dependency
  drm/nouveau/pmu/fuc: don't use movw directly anymore
  IB/core: Map iWarp AH type to undefined in rdma_ah_find_type
  IB/ipoib: Fix for potential no-carrier state
  IB/hfi1: Fix for potential refcount leak in hfi1_open_file()
  IB/hfi1: Re-order IRQ cleanup to address driver cleanup race
  blk-mq: fix discard merge with scheduler attached
  openvswitch: Remove padding from packet before L3+ conntrack processing
  mm/fadvise: discard partial page if endbyte is also EOF
  mm: pin address_space before dereferencing it while isolating an LRU page
  mm: thp: use down_read_trylock() in khugepaged to avoid long block
  sparc64: update pmdp_invalidate() to return old pmd value
  asm-generic: provide generic_pmdp_establish()
  mm/mempolicy: add nodes_empty check in SYSC_migrate_pages
  mm/mempolicy: fix the check of nodemask from user
  ocfs2: return error when we attempt to access a dirty bh in jbd2
  ocfs2/acl: use 'ip_xattr_sem' to protect getting extended attribute
  ocfs2: return -EROFS to mount.ocfs2 if inode block is invalid
  fs/dax.c: release PMD lock even when there is no PMD support in DAX
  x86/kvm/vmx: do not use vm-exit instruction length for fast MMIO when running nested
  kvm: Map PFN-type memory regions as writable (if possible)
  tcp_nv: fix potential integer overflow in tcpnv_acked
  netfilter: x_tables: fix pointer leaks to userspace
  x86/hyperv: Check for required priviliges in hyperv_init()
  gianfar: prevent integer wrapping in the rx handler
  ntb_transport: Fix bug with max_mw_size parameter
  RDMA/mlx5: Avoid memory leak in case of XRCD dealloc failure
  powerpc/numa: Ensure nodes initialized for hotplug
  powerpc/numa: Use ibm,max-associativity-domains to discover possible nodes
  samples/bpf: Partially fixes the bpf.o build
  i40e: fix reported mask for ntuple filters
  i40e: program fragmented IPv4 filter input set
  ixgbe: don't set RXDCTL.RLPML for 82599
  jffs2: Fix use-after-free bug in jffs2_iget()'s error handling path
  RDMA/uverbs: Use an unambiguous errno for method not supported
  crypto: artpec6 - remove select on non-existing CRYPTO_SHA384
  device property: Define type of PROPERTY_ENRTY_*() macros
  tty: serial: exar: Relocate sleep wake-up handling
  x86/hyperv: Stop suppressing X86_FEATURE_PCID
  fm10k: fix "failed to kill vid" message for VF
  igb: Clear TXSTMP when ptp_tx_work() is timeout
  igb: Allow to remove administratively set MAC on VFs
  ASoC: rockchip: Use dummy_dai for rt5514 dsp dailink
  blk-mq-debugfs: don't allow write on attributes with seq_operations set
  KVM: s390: vsie: use READ_ONCE to access some SCB fields
  platform/x86: thinkpad_acpi: suppress warning about palm detection
  i40evf: ignore link up if not running
  i40evf: Don't schedule reset_task when device is being removed
  bpf: test_maps: cleanup sockmaps when test ends
  block: Set BIO_TRACE_COMPLETION on new bio during split
  nfp: fix error return code in nfp_pci_probe()
  HID: roccat: prevent an out of bounds read in kovaplus_profile_activated()
  Input: stmfts - set IRQ_NOAUTOEN to the irq flag
  scsi: fas216: fix sense buffer initialization
  scsi: devinfo: fix format of the device list
  f2fs: avoid hungtask when GC encrypted block if io_bits is set
  RDMA/cma: Check existence of netdevice during port validation
  Btrfs: raid56: fix race between merge_bio and rbio_orig_end_io
  Btrfs: fix unexpected EEXIST from btrfs_get_extent
  btrfs: fail mount when sb flag is not in BTRFS_SUPER_FLAG_SUPP
  Btrfs: fix scrub to repair raid6 corruption
  btrfs: Fix out of bounds access in btrfs_search_slot
  Btrfs: set plug for fsync
  ipmi/powernv: Fix error return code in ipmi_powernv_probe()
  mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl()
  kconfig: Fix expr_free() E_NOT leak
  kconfig: Fix automatic menu creation mem leak
  kconfig: Don't leak main menus during parsing
  watchdog: sp5100_tco: Fix watchdog disable bit
  PCI: Add dummy pci_irqd_intx_xlate() for CONFIG_PCI=n build
  MIPS: Fix clean of vmlinuz.{32,ecoff,bin,srec}
  nfs: Do not convert nfs_idmap_cache_timeout to jiffies
  IB/cq: Don't force IB_POLL_DIRECT poll context for ib_process_cq_direct
  spi: a3700: Clear DATA_OUT when performing a read
  net: stmmac: dwmac-meson8b: propagate rate changes to the parent clock
  net: stmmac: dwmac-meson8b: fix setting the RGMII TX clock on Meson8b
  ubifs: Fix uninitialized variable in search_dh_cookie()
  blk-mq: turn WARN_ON in __blk_mq_run_hw_queue into printk
  dm mpath: return DM_MAPIO_REQUEUE on blk-mq rq allocation failure
  dm thin: fix documentation relative to low water mark threshold
  iommu/vt-d: Use domain instead of cache fetching
  powerpc: System reset avoid interleaving oops using die synchronisation
  iommu/exynos: Don't unconditionally steal bus ops
  perf record: Fix failed memory allocation for get_cpuid_str
  tools lib traceevent: Fix get_field_str() for dynamic strings
  perf callchain: Fix attr.sample_max_stack setting
  tools lib traceevent: Simplify pointer print logic and fix %pF
  perf unwind: Do not look just at the global callchain_param.record_mode
  scsi: qla2xxx: Fix warning in qla2x00_async_iocb_timeout()
  i40iw: Zero-out consumer key on allocate stag for FMR
  i40iw: Free IEQ resources
  Input: synaptics - reset the ABS_X/Y fuzz after initializing MT axes
  libbpf: Makefile set specified permission mode
  Input: psmouse - fix Synaptics detection when protocol is disabled
  PCI: Add function 1 DMA alias quirk for Marvell 9128
  selftest: ftrace: Fix to pick text symbols for kprobes
  xprtrdma: Fix backchannel allocation of extra rpcrdma_reps
  platform/x86: dell-laptop: Filter out spurious keyboard backlight change events
  KVM: s390: use created_vcpus in more places
  tracing/hrtimer: Fix tracing bugs by taking all clock bases and modes into account
  netfilter: ipv6: nf_defrag: Pass on packets to stack per RFC2460
  KVM: PPC: Book3S HV: Enable migration of decrementer register
  RDMA/core: Clarify rdma_ah_find_type
  kvm: x86: fix KVM_XEN_HVM_CONFIG ioctl
  ASoC: au1x: Fix timeout tests in au1xac97c_ac97_read()
  ALSA: hda - Use IS_REACHABLE() for dependency on input
  ACPI / LPSS: Do not instiate platform_dev for devs without MMIO resources
  NFSv4: always set NFS_LOCK_LOST when a lock is lost.
  x86/tsc: Allow TSC calibration without PIT
  firewire-ohci: work around oversized DMA reads on JMicron controllers
  usb: musb: Fix external abort in musb_remove on omap2430
  usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers
  usb: musb: fix enumeration after resume
  drm/i915/bxt, glk: Increase PCODE timeouts during CDCLK freq changing
  drm/i915: Fix LSPCON TMDS output buffer enabling from low-power state
  drm/i915: Do no use kfree() to free a kmem_cache_alloc() return value
  drm/i915/audio: Fix audio detection issue on GLK
  drm/i915/gvt: throw error on unhandled vfio ioctls
  drm/vc4: Fix memory leak during BO teardown
  x86/tsc: Prevent 32bit truncation in calc_hpet_ref()
  clocksource/imx-tpm: Correct -ETIME return condition check
  x86/acpi: Prevent X2APIC id 0xffffffff from being accounted
  btrfs: fix unaligned access in readdir
  cifs: do not allow creating sockets except with SMB1 posix exensions
  UPSTREAM: module: Do not paper over type mismatches in module_param_call()
  UPSTREAM: treewide: Fix function prototypes for module_param_call()
  UPSTREAM: module: Prepare to convert all module_param_call() prototypes
  UPSTREAM: kbuild: add clang-version.sh
  UPSTREAM: console: Expand dummy functions for CFI
  UPSTREAM: console: SisUSB2VGA: Drop dummy con_font_get()
  ANDROID: sdcardfs: Set s_root to NULL after putting
  ANDROID: sdcardfs: d_make_root calls iput
  ANDROID: sdcardfs: Check for private data earlier
  ANDROID: sched: Remove duplicate const specifier

Conflicts:
	kernel/sched/sched.h

Change in module_param_call() definition requires alignment in:

	drivers/hwtracing/coresight/coresight-event.c
	drivers/power/reset/msm-poweroff.c

Change-Id: I0114d2226301af0b1775b37d79db5529653b135d
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
Isaac J. Manjarres 2018-04-26 09:55:15 -07:00
commit 4f5d011e6d
265 changed files with 3269 additions and 2143 deletions

View File

@ -112,9 +112,11 @@ $low_water_mark is expressed in blocks of size $data_block_size. If
free space on the data device drops below this level then a dm event
will be triggered which a userspace daemon should catch allowing it to
extend the pool device. Only one such event will be sent.
Resuming a device with a new table itself triggers an event so the
userspace daemon can use this to detect a situation where a new table
already exceeds the threshold.
No special event is triggered if a just resumed device's free space is below
the low water mark. However, resuming a device always triggers an
event; a userspace daemon should verify that free space exceeds the low
water mark when handling this event.
A low water mark for the metadata device is maintained in the kernel and
will trigger a dm event if free space on the metadata device drops below

View File

@ -1837,6 +1837,7 @@ registers, find a list below:
PPC | KVM_REG_PPC_DBSR | 32
PPC | KVM_REG_PPC_TIDR | 64
PPC | KVM_REG_PPC_PSSCR | 64
PPC | KVM_REG_PPC_DEC_EXPIRY | 64
PPC | KVM_REG_PPC_TM_GPR0 | 64
...
PPC | KVM_REG_PPC_TM_GPR31 | 64

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 4
PATCHLEVEL = 14
SUBLEVEL = 36
SUBLEVEL = 37
EXTRAVERSION =
NAME = Petit Gorille

View File

@ -88,8 +88,8 @@ static inline int arch_spin_trylock(arch_spinlock_t *lock)
" cbnz %w1, 1f\n"
" add %w1, %w0, %3\n"
" casa %w0, %w1, %2\n"
" and %w1, %w1, #0xffff\n"
" eor %w1, %w1, %w0, lsr #16\n"
" sub %w1, %w1, %3\n"
" eor %w1, %w1, %w0\n"
"1:")
: "=&r" (lockval), "=&r" (tmp), "+Q" (*lock)
: "I" (1 << TICKET_SHIFT)

View File

@ -133,4 +133,8 @@ vmlinuz.srec: vmlinuz
uzImage.bin: vmlinuz.bin FORCE
$(call if_changed,uimage,none)
clean-files := $(objtree)/vmlinuz $(objtree)/vmlinuz.{32,ecoff,bin,srec}
clean-files += $(objtree)/vmlinuz
clean-files += $(objtree)/vmlinuz.32
clean-files += $(objtree)/vmlinuz.ecoff
clean-files += $(objtree)/vmlinuz.bin
clean-files += $(objtree)/vmlinuz.srec

View File

@ -22,10 +22,10 @@ int get_c0_fdc_int(void)
{
int mips_cpu_fdc_irq;
if (cpu_has_veic)
panic("Unimplemented!");
else if (mips_gic_present())
if (mips_gic_present())
mips_cpu_fdc_irq = gic_get_c0_fdc_int();
else if (cpu_has_veic)
panic("Unimplemented!");
else if (cp0_fdc_irq >= 0)
mips_cpu_fdc_irq = MIPS_CPU_IRQ_BASE + cp0_fdc_irq;
else
@ -38,10 +38,10 @@ int get_c0_perfcount_int(void)
{
int mips_cpu_perf_irq;
if (cpu_has_veic)
panic("Unimplemented!");
else if (mips_gic_present())
if (mips_gic_present())
mips_cpu_perf_irq = gic_get_c0_perfcount_int();
else if (cpu_has_veic)
panic("Unimplemented!");
else if (cp0_perfcount_irq >= 0)
mips_cpu_perf_irq = MIPS_CPU_IRQ_BASE + cp0_perfcount_irq;
else
@ -54,10 +54,10 @@ unsigned int get_c0_compare_int(void)
{
int mips_cpu_timer_irq;
if (cpu_has_veic)
panic("Unimplemented!");
else if (mips_gic_present())
if (mips_gic_present())
mips_cpu_timer_irq = gic_get_c0_compare_int();
else if (cpu_has_veic)
panic("Unimplemented!");
else
mips_cpu_timer_irq = MIPS_CPU_IRQ_BASE + cp0_compare_irq;

View File

@ -186,7 +186,7 @@ static void __init rbtx4939_update_ioc_pen(void)
#define RBTX4939_MAX_7SEGLEDS 8
#if IS_ENABLED(CONFIG_LEDS_CLASS)
#if IS_BUILTIN(CONFIG_LEDS_CLASS)
static u8 led_val[RBTX4939_MAX_7SEGLEDS];
struct rbtx4939_led_data {
struct led_classdev cdev;
@ -261,7 +261,7 @@ static inline void rbtx4939_led_setup(void)
static void __rbtx4939_7segled_putc(unsigned int pos, unsigned char val)
{
#if IS_ENABLED(CONFIG_LEDS_CLASS)
#if IS_BUILTIN(CONFIG_LEDS_CLASS)
unsigned long flags;
local_irq_save(flags);
/* bit7: reserved for LED class */

View File

@ -73,10 +73,16 @@ static inline void radix__pgd_free(struct mm_struct *mm, pgd_t *pgd)
static inline pgd_t *pgd_alloc(struct mm_struct *mm)
{
pgd_t *pgd;
if (radix_enabled())
return radix__pgd_alloc(mm);
return kmem_cache_alloc(PGT_CACHE(PGD_INDEX_SIZE),
pgtable_gfp_flags(mm, GFP_KERNEL));
pgd = kmem_cache_alloc(PGT_CACHE(PGD_INDEX_SIZE),
pgtable_gfp_flags(mm, GFP_KERNEL));
memset(pgd, 0, PGD_TABLE_SIZE);
return pgd;
}
static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)

View File

@ -607,6 +607,8 @@ struct kvm_ppc_rmmu_info {
#define KVM_REG_PPC_TIDR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xbc)
#define KVM_REG_PPC_PSSCR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xbd)
#define KVM_REG_PPC_DEC_EXPIRY (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xbe)
/* Transactional Memory checkpointed state:
* This is all GPRs, all VSX regs and a subset of SPRs
*/

View File

@ -336,7 +336,7 @@ void system_reset_exception(struct pt_regs *regs)
* No debugger or crash dump registered, print logs then
* panic.
*/
__die("System Reset", regs, SIGABRT);
die("System Reset", regs, SIGABRT);
mdelay(2*MSEC_PER_SEC); /* Wait a little while for others to print */
add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);

View File

@ -1348,12 +1348,8 @@ static unsigned long resize_hpt_rehash_hpte(struct kvm_resize_hpt *resize,
}
new_pteg = hash & new_hash_mask;
if (vpte & HPTE_V_SECONDARY) {
BUG_ON(~pteg != (hash & old_hash_mask));
new_pteg = ~new_pteg;
} else {
BUG_ON(pteg != (hash & old_hash_mask));
}
if (vpte & HPTE_V_SECONDARY)
new_pteg = ~hash & new_hash_mask;
new_idx = new_pteg * HPTES_PER_GROUP + (idx % HPTES_PER_GROUP);
new_hptep = (__be64 *)(new->virt + (new_idx << 4));

View File

@ -1497,6 +1497,10 @@ static int kvmppc_get_one_reg_hv(struct kvm_vcpu *vcpu, u64 id,
case KVM_REG_PPC_ARCH_COMPAT:
*val = get_reg_val(id, vcpu->arch.vcore->arch_compat);
break;
case KVM_REG_PPC_DEC_EXPIRY:
*val = get_reg_val(id, vcpu->arch.dec_expires +
vcpu->arch.vcore->tb_offset);
break;
default:
r = -EINVAL;
break;
@ -1724,6 +1728,10 @@ static int kvmppc_set_one_reg_hv(struct kvm_vcpu *vcpu, u64 id,
case KVM_REG_PPC_ARCH_COMPAT:
r = kvmppc_set_arch_compat(vcpu, set_reg_val(id, *val));
break;
case KVM_REG_PPC_DEC_EXPIRY:
vcpu->arch.dec_expires = set_reg_val(id, *val) -
vcpu->arch.vcore->tb_offset;
break;
default:
r = -EINVAL;
break;

View File

@ -758,7 +758,7 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
hrtimer_init(&vcpu->arch.dec_timer, CLOCK_REALTIME, HRTIMER_MODE_ABS);
vcpu->arch.dec_timer.function = kvmppc_decrementer_wakeup;
vcpu->arch.dec_expires = ~(u64)0;
vcpu->arch.dec_expires = get_tb();
#ifdef CONFIG_KVM_EXIT_TIMING
mutex_init(&vcpu->arch.exit_timing_lock);

View File

@ -546,7 +546,7 @@ static int numa_setup_cpu(unsigned long lcpu)
nid = of_node_to_nid_single(cpu);
out_present:
if (nid < 0 || !node_online(nid))
if (nid < 0 || !node_possible(nid))
nid = first_online_node;
map_cpu_to_node(lcpu, nid);
@ -887,6 +887,32 @@ static void __init setup_node_data(int nid, u64 start_pfn, u64 end_pfn)
NODE_DATA(nid)->node_spanned_pages = spanned_pages;
}
static void __init find_possible_nodes(void)
{
struct device_node *rtas;
u32 numnodes, i;
if (min_common_depth <= 0)
return;
rtas = of_find_node_by_path("/rtas");
if (!rtas)
return;
if (of_property_read_u32_index(rtas,
"ibm,max-associativity-domains",
min_common_depth, &numnodes))
goto out;
for (i = 0; i < numnodes; i++) {
if (!node_possible(i))
node_set(i, node_possible_map);
}
out:
of_node_put(rtas);
}
void __init initmem_init(void)
{
int nid, cpu;
@ -900,12 +926,15 @@ void __init initmem_init(void)
memblock_dump_all();
/*
* Reduce the possible NUMA nodes to the online NUMA nodes,
* since we do not support node hotplug. This ensures that we
* lower the maximum NUMA node ID to what is actually present.
* Modify the set of possible NUMA nodes to reflect information
* available about the set of online nodes, and the set of nodes
* that we expect to make use of for this platform's affinity
* calculations.
*/
nodes_and(node_possible_map, node_possible_map, node_online_map);
find_possible_nodes();
for_each_online_node(nid) {
unsigned long start_pfn, end_pfn;
@ -1246,6 +1275,40 @@ static long vphn_get_associativity(unsigned long cpu,
return rc;
}
static inline int find_and_online_cpu_nid(int cpu)
{
__be32 associativity[VPHN_ASSOC_BUFSIZE] = {0};
int new_nid;
/* Use associativity from first thread for all siblings */
vphn_get_associativity(cpu, associativity);
new_nid = associativity_to_nid(associativity);
if (new_nid < 0 || !node_possible(new_nid))
new_nid = first_online_node;
if (NODE_DATA(new_nid) == NULL) {
#ifdef CONFIG_MEMORY_HOTPLUG
/*
* Need to ensure that NODE_DATA is initialized for a node from
* available memory (see memblock_alloc_try_nid). If unable to
* init the node, then default to nearest node that has memory
* installed.
*/
if (try_online_node(new_nid))
new_nid = first_online_node;
#else
/*
* Default to using the nearest node that has memory installed.
* Otherwise, it would be necessary to patch the kernel MM code
* to deal with more memoryless-node error conditions.
*/
new_nid = first_online_node;
#endif
}
return new_nid;
}
/*
* Update the CPU maps and sysfs entries for a single CPU when its NUMA
* characteristics change. This function doesn't perform any locking and is
@ -1313,7 +1376,6 @@ int numa_update_cpu_topology(bool cpus_locked)
{
unsigned int cpu, sibling, changed = 0;
struct topology_update_data *updates, *ud;
__be32 associativity[VPHN_ASSOC_BUFSIZE] = {0};
cpumask_t updated_cpus;
struct device *dev;
int weight, new_nid, i = 0;
@ -1348,11 +1410,7 @@ int numa_update_cpu_topology(bool cpus_locked)
continue;
}
/* Use associativity from first thread for all siblings */
vphn_get_associativity(cpu, associativity);
new_nid = associativity_to_nid(associativity);
if (new_nid < 0 || !node_online(new_nid))
new_nid = first_online_node;
new_nid = find_and_online_cpu_nid(cpu);
if (new_nid == numa_cpu_lookup_table[cpu]) {
cpumask_andnot(&cpu_associativity_changes_mask,

View File

@ -126,9 +126,11 @@ static void disable_nest_pmu_counters(void)
const struct cpumask *l_cpumask;
get_online_cpus();
for_each_online_node(nid) {
for_each_node_with_cpus(nid) {
l_cpumask = cpumask_of_node(nid);
cpu = cpumask_first(l_cpumask);
cpu = cpumask_first_and(l_cpumask, cpu_online_mask);
if (cpu >= nr_cpu_ids)
continue;
opal_imc_counters_stop(OPAL_IMC_COUNTERS_NEST,
get_hard_smp_processor_id(cpu));
}

View File

@ -742,7 +742,7 @@ static void cmm_exit(void)
* Return value:
* 0 on success / other on failure
**/
static int cmm_set_disable(const char *val, struct kernel_param *kp)
static int cmm_set_disable(const char *val, const struct kernel_param *kp)
{
int disable = simple_strtoul(val, NULL, 10);

View File

@ -4,7 +4,7 @@
#include <linux/types.h>
#include <linux/device.h>
#include <linux/blkdev.h>
#include <linux/blk_types.h>
struct arqb {
u64 data;

View File

@ -601,7 +601,7 @@ static int kvm_vm_ioctl_enable_cap(struct kvm *kvm, struct kvm_enable_cap *cap)
case KVM_CAP_S390_GS:
r = -EINVAL;
mutex_lock(&kvm->lock);
if (atomic_read(&kvm->online_vcpus)) {
if (kvm->created_vcpus) {
r = -EBUSY;
} else if (test_facility(133)) {
set_kvm_facility(kvm->arch.model.fac_mask, 133);
@ -1121,7 +1121,7 @@ static int kvm_s390_set_processor_feat(struct kvm *kvm,
return -EINVAL;
mutex_lock(&kvm->lock);
if (!atomic_read(&kvm->online_vcpus)) {
if (!kvm->created_vcpus) {
bitmap_copy(kvm->arch.cpu_feat, (unsigned long *) data.feat,
KVM_S390_VM_CPU_FEAT_NR_BITS);
ret = 0;

View File

@ -31,7 +31,11 @@ struct vsie_page {
* the same offset as that in struct sie_page!
*/
struct mcck_volatile_info mcck_info; /* 0x0200 */
/* the pinned originial scb */
/*
* The pinned original scb. Be aware that other VCPUs can modify
* it while we read from it. Values that are used for conditions or
* are reused conditionally, should be accessed via READ_ONCE.
*/
struct kvm_s390_sie_block *scb_o; /* 0x0218 */
/* the shadow gmap in use by the vsie_page */
struct gmap *gmap; /* 0x0220 */
@ -143,12 +147,13 @@ static int shadow_crycb(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
{
struct kvm_s390_sie_block *scb_s = &vsie_page->scb_s;
struct kvm_s390_sie_block *scb_o = vsie_page->scb_o;
u32 crycb_addr = scb_o->crycbd & 0x7ffffff8U;
const uint32_t crycbd_o = READ_ONCE(scb_o->crycbd);
const u32 crycb_addr = crycbd_o & 0x7ffffff8U;
unsigned long *b1, *b2;
u8 ecb3_flags;
scb_s->crycbd = 0;
if (!(scb_o->crycbd & vcpu->arch.sie_block->crycbd & CRYCB_FORMAT1))
if (!(crycbd_o & vcpu->arch.sie_block->crycbd & CRYCB_FORMAT1))
return 0;
/* format-1 is supported with message-security-assist extension 3 */
if (!test_kvm_facility(vcpu->kvm, 76))
@ -186,12 +191,15 @@ static void prepare_ibc(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
{
struct kvm_s390_sie_block *scb_s = &vsie_page->scb_s;
struct kvm_s390_sie_block *scb_o = vsie_page->scb_o;
/* READ_ONCE does not work on bitfields - use a temporary variable */
const uint32_t __new_ibc = scb_o->ibc;
const uint32_t new_ibc = READ_ONCE(__new_ibc) & 0x0fffU;
__u64 min_ibc = (sclp.ibc >> 16) & 0x0fffU;
scb_s->ibc = 0;
/* ibc installed in g2 and requested for g3 */
if (vcpu->kvm->arch.model.ibc && (scb_o->ibc & 0x0fffU)) {
scb_s->ibc = scb_o->ibc & 0x0fffU;
if (vcpu->kvm->arch.model.ibc && new_ibc) {
scb_s->ibc = new_ibc;
/* takte care of the minimum ibc level of the machine */
if (scb_s->ibc < min_ibc)
scb_s->ibc = min_ibc;
@ -256,6 +264,10 @@ static int shadow_scb(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
{
struct kvm_s390_sie_block *scb_o = vsie_page->scb_o;
struct kvm_s390_sie_block *scb_s = &vsie_page->scb_s;
/* READ_ONCE does not work on bitfields - use a temporary variable */
const uint32_t __new_prefix = scb_o->prefix;
const uint32_t new_prefix = READ_ONCE(__new_prefix);
const bool wants_tx = READ_ONCE(scb_o->ecb) & ECB_TE;
bool had_tx = scb_s->ecb & ECB_TE;
unsigned long new_mso = 0;
int rc;
@ -302,14 +314,14 @@ static int shadow_scb(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
scb_s->icpua = scb_o->icpua;
if (!(atomic_read(&scb_s->cpuflags) & CPUSTAT_SM))
new_mso = scb_o->mso & 0xfffffffffff00000UL;
new_mso = READ_ONCE(scb_o->mso) & 0xfffffffffff00000UL;
/* if the hva of the prefix changes, we have to remap the prefix */
if (scb_s->mso != new_mso || scb_s->prefix != scb_o->prefix)
if (scb_s->mso != new_mso || scb_s->prefix != new_prefix)
prefix_unmapped(vsie_page);
/* SIE will do mso/msl validity and exception checks for us */
scb_s->msl = scb_o->msl & 0xfffffffffff00000UL;
scb_s->mso = new_mso;
scb_s->prefix = scb_o->prefix;
scb_s->prefix = new_prefix;
/* We have to definetly flush the tlb if this scb never ran */
if (scb_s->ihcpu != 0xffffU)
@ -321,11 +333,11 @@ static int shadow_scb(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
if (test_kvm_cpu_feat(vcpu->kvm, KVM_S390_VM_CPU_FEAT_ESOP))
scb_s->ecb |= scb_o->ecb & ECB_HOSTPROTINT;
/* transactional execution */
if (test_kvm_facility(vcpu->kvm, 73)) {
if (test_kvm_facility(vcpu->kvm, 73) && wants_tx) {
/* remap the prefix is tx is toggled on */
if ((scb_o->ecb & ECB_TE) && !had_tx)
if (!had_tx)
prefix_unmapped(vsie_page);
scb_s->ecb |= scb_o->ecb & ECB_TE;
scb_s->ecb |= ECB_TE;
}
/* SIMD */
if (test_kvm_facility(vcpu->kvm, 129)) {
@ -544,9 +556,9 @@ static int pin_blocks(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
gpa_t gpa;
int rc = 0;
gpa = scb_o->scaol & ~0xfUL;
gpa = READ_ONCE(scb_o->scaol) & ~0xfUL;
if (test_kvm_cpu_feat(vcpu->kvm, KVM_S390_VM_CPU_FEAT_64BSCAO))
gpa |= (u64) scb_o->scaoh << 32;
gpa |= (u64) READ_ONCE(scb_o->scaoh) << 32;
if (gpa) {
if (!(gpa & ~0x1fffUL))
rc = set_validity_icpt(scb_s, 0x0038U);
@ -566,7 +578,7 @@ static int pin_blocks(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
scb_s->scaol = (u32)(u64)hpa;
}
gpa = scb_o->itdba & ~0xffUL;
gpa = READ_ONCE(scb_o->itdba) & ~0xffUL;
if (gpa && (scb_s->ecb & ECB_TE)) {
if (!(gpa & ~0x1fffU)) {
rc = set_validity_icpt(scb_s, 0x0080U);
@ -581,7 +593,7 @@ static int pin_blocks(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
scb_s->itdba = hpa;
}
gpa = scb_o->gvrd & ~0x1ffUL;
gpa = READ_ONCE(scb_o->gvrd) & ~0x1ffUL;
if (gpa && (scb_s->eca & ECA_VX) && !(scb_s->ecd & ECD_HOSTREGMGMT)) {
if (!(gpa & ~0x1fffUL)) {
rc = set_validity_icpt(scb_s, 0x1310U);
@ -599,7 +611,7 @@ static int pin_blocks(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
scb_s->gvrd = hpa;
}
gpa = scb_o->riccbd & ~0x3fUL;
gpa = READ_ONCE(scb_o->riccbd) & ~0x3fUL;
if (gpa && (scb_s->ecb3 & ECB3_RI)) {
if (!(gpa & ~0x1fffUL)) {
rc = set_validity_icpt(scb_s, 0x0043U);
@ -617,8 +629,8 @@ static int pin_blocks(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
if ((scb_s->ecb & ECB_GS) && !(scb_s->ecd & ECD_HOSTREGMGMT)) {
unsigned long sdnxc;
gpa = scb_o->sdnxo & ~0xfUL;
sdnxc = scb_o->sdnxo & 0xfUL;
gpa = READ_ONCE(scb_o->sdnxo) & ~0xfUL;
sdnxc = READ_ONCE(scb_o->sdnxo) & 0xfUL;
if (!gpa || !(gpa & ~0x1fffUL)) {
rc = set_validity_icpt(scb_s, 0x10b0U);
goto unpin;
@ -785,7 +797,7 @@ static void retry_vsie_icpt(struct vsie_page *vsie_page)
static int handle_stfle(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
{
struct kvm_s390_sie_block *scb_s = &vsie_page->scb_s;
__u32 fac = vsie_page->scb_o->fac & 0x7ffffff8U;
__u32 fac = READ_ONCE(vsie_page->scb_o->fac) & 0x7ffffff8U;
if (fac && test_kvm_facility(vcpu->kvm, 7)) {
retry_vsie_icpt(vsie_page);

View File

@ -980,7 +980,7 @@ void update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long addr,
pmd_t *pmd);
#define __HAVE_ARCH_PMDP_INVALIDATE
extern void pmdp_invalidate(struct vm_area_struct *vma, unsigned long address,
extern pmd_t pmdp_invalidate(struct vm_area_struct *vma, unsigned long address,
pmd_t *pmdp);
#define __HAVE_ARCH_PGTABLE_DEPOSIT

View File

@ -219,17 +219,28 @@ void set_pmd_at(struct mm_struct *mm, unsigned long addr,
}
}
static inline pmd_t pmdp_establish(struct vm_area_struct *vma,
unsigned long address, pmd_t *pmdp, pmd_t pmd)
{
pmd_t old;
do {
old = *pmdp;
} while (cmpxchg64(&pmdp->pmd, old.pmd, pmd.pmd) != old.pmd);
return old;
}
/*
* This routine is only called when splitting a THP
*/
void pmdp_invalidate(struct vm_area_struct *vma, unsigned long address,
pmd_t pmdp_invalidate(struct vm_area_struct *vma, unsigned long address,
pmd_t *pmdp)
{
pmd_t entry = *pmdp;
pmd_t old, entry;
pmd_val(entry) &= ~_PAGE_VALID;
set_pmd_at(vma->vm_mm, address, pmdp, entry);
entry = __pmd(pmd_val(*pmdp) & ~_PAGE_VALID);
old = pmdp_establish(vma, address, pmdp, entry);
flush_tlb_range(vma, address, address + HPAGE_PMD_SIZE);
/*
@ -240,6 +251,8 @@ void pmdp_invalidate(struct vm_area_struct *vma, unsigned long address,
if ((pmd_val(entry) & _PAGE_PMD_HUGE) &&
!is_huge_zero_page(pmd_page(entry)))
(vma->vm_mm)->context.thp_pte_count--;
return old;
}
void pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp,

View File

@ -110,12 +110,19 @@ static int hv_cpu_init(unsigned int cpu)
*/
void hyperv_init(void)
{
u64 guest_id;
u64 guest_id, required_msrs;
union hv_x64_msr_hypercall_contents hypercall_msr;
if (x86_hyper_type != X86_HYPER_MS_HYPERV)
return;
/* Absolutely required MSRs */
required_msrs = HV_X64_MSR_HYPERCALL_AVAILABLE |
HV_X64_MSR_VP_INDEX_AVAILABLE;
if ((ms_hyperv.features & required_msrs) != required_msrs)
return;
/* Allocate percpu VP index */
hv_vp_index = kmalloc_array(num_possible_cpus(), sizeof(*hv_vp_index),
GFP_KERNEL);

View File

@ -137,7 +137,12 @@ static void hyperv_flush_tlb_others(const struct cpumask *cpus,
}
if (info->mm) {
/*
* AddressSpace argument must match the CR3 with PCID bits
* stripped out.
*/
flush->address_space = virt_to_phys(info->mm->pgd);
flush->address_space &= CR3_ADDR_MASK;
flush->flags = 0;
} else {
flush->address_space = 0;
@ -219,7 +224,12 @@ static void hyperv_flush_tlb_others_ex(const struct cpumask *cpus,
}
if (info->mm) {
/*
* AddressSpace argument must match the CR3 with PCID bits
* stripped out.
*/
flush->address_space = virt_to_phys(info->mm->pgd);
flush->address_space &= CR3_ADDR_MASK;
flush->flags = 0;
} else {
flush->address_space = 0;
@ -278,8 +288,6 @@ void hyperv_setup_mmu_ops(void)
if (!(ms_hyperv.hints & HV_X64_REMOTE_TLB_FLUSH_RECOMMENDED))
return;
setup_clear_cpu_cap(X86_FEATURE_PCID);
if (!(ms_hyperv.hints & HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED)) {
pr_info("Using hypercall for remote TLB flush\n");
pv_mmu_ops.flush_tlb_others = hyperv_flush_tlb_others;

View File

@ -69,6 +69,11 @@ struct legacy_pic {
extern struct legacy_pic *legacy_pic;
extern struct legacy_pic null_legacy_pic;
static inline bool has_legacy_pic(void)
{
return legacy_pic != &null_legacy_pic;
}
static inline int nr_legacy_irqs(void)
{
return legacy_pic->nr_legacy_irqs;

View File

@ -215,6 +215,10 @@ acpi_parse_x2apic(struct acpi_subtable_header *header, const unsigned long end)
apic_id = processor->local_apic_id;
enabled = processor->lapic_flags & ACPI_MADT_ENABLED;
/* Ignore invalid ID */
if (apic_id == 0xffffffff)
return 0;
/*
* We need to register disabled CPU as well to permit
* counting disabled CPUs. This allows us to size

View File

@ -1140,16 +1140,25 @@ static void __init decode_gam_rng_tbl(unsigned long ptr)
uv_gre_table = gre;
for (; gre->type != UV_GAM_RANGE_TYPE_UNUSED; gre++) {
unsigned long size = ((unsigned long)(gre->limit - lgre)
<< UV_GAM_RANGE_SHFT);
int order = 0;
char suffix[] = " KMGTPE";
while (size > 9999 && order < sizeof(suffix)) {
size /= 1024;
order++;
}
if (!index) {
pr_info("UV: GAM Range Table...\n");
pr_info("UV: # %20s %14s %5s %4s %5s %3s %2s\n", "Range", "", "Size", "Type", "NASID", "SID", "PN");
}
pr_info("UV: %2d: 0x%014lx-0x%014lx %5luG %3d %04x %02x %02x\n",
pr_info("UV: %2d: 0x%014lx-0x%014lx %5lu%c %3d %04x %02x %02x\n",
index++,
(unsigned long)lgre << UV_GAM_RANGE_SHFT,
(unsigned long)gre->limit << UV_GAM_RANGE_SHFT,
((unsigned long)(gre->limit - lgre)) >>
(30 - UV_GAM_RANGE_SHFT), /* 64M -> 1G */
size, suffix[order],
gre->type, gre->nasid, gre->sockid, gre->pnode);
lgre = gre->limit;

View File

@ -109,7 +109,7 @@ void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,
struct stack_info stack_info = {0};
unsigned long visit_mask = 0;
int graph_idx = 0;
bool partial;
bool partial = false;
printk("%sCall Trace:\n", log_lvl);

View File

@ -25,6 +25,7 @@
#include <asm/geode.h>
#include <asm/apic.h>
#include <asm/intel-family.h>
#include <asm/i8259.h>
unsigned int __read_mostly cpu_khz; /* TSC clocks / usec, not used here */
EXPORT_SYMBOL(cpu_khz);
@ -316,7 +317,7 @@ static unsigned long calc_hpet_ref(u64 deltatsc, u64 hpet1, u64 hpet2)
hpet2 -= hpet1;
tmp = ((u64)hpet2 * hpet_readl(HPET_PERIOD));
do_div(tmp, 1000000);
do_div(deltatsc, tmp);
deltatsc = div64_u64(deltatsc, tmp);
return (unsigned long) deltatsc;
}
@ -363,6 +364,20 @@ static unsigned long pit_calibrate_tsc(u32 latch, unsigned long ms, int loopmin)
unsigned long tscmin, tscmax;
int pitcnt;
if (!has_legacy_pic()) {
/*
* Relies on tsc_early_delay_calibrate() to have given us semi
* usable udelay(), wait for the same 50ms we would have with
* the PIT loop below.
*/
udelay(10 * USEC_PER_MSEC);
udelay(10 * USEC_PER_MSEC);
udelay(10 * USEC_PER_MSEC);
udelay(10 * USEC_PER_MSEC);
udelay(10 * USEC_PER_MSEC);
return ULONG_MAX;
}
/* Set the Gate high, disable speaker */
outb((inb(0x61) & ~0x02) | 0x01, 0x61);
@ -487,6 +502,9 @@ static unsigned long quick_pit_calibrate(void)
u64 tsc, delta;
unsigned long d1, d2;
if (!has_legacy_pic())
return 0;
/* Set the Gate high, disable speaker */
outb((inb(0x61) & ~0x02) | 0x01, 0x61);

View File

@ -3019,7 +3019,7 @@ static int kvm_handle_bad_page(struct kvm_vcpu *vcpu, gfn_t gfn, kvm_pfn_t pfn)
return RET_PF_RETRY;
}
return RET_PF_EMULATE;
return -EFAULT;
}
static void transparent_hugepage_adjust(struct kvm_vcpu *vcpu,

View File

@ -6765,7 +6765,21 @@ static int handle_ept_misconfig(struct kvm_vcpu *vcpu)
if (!is_guest_mode(vcpu) &&
!kvm_io_bus_write(vcpu, KVM_FAST_MMIO_BUS, gpa, 0, NULL)) {
trace_kvm_fast_mmio(gpa);
return kvm_skip_emulated_instruction(vcpu);
/*
* Doing kvm_skip_emulated_instruction() depends on undefined
* behavior: Intel's manual doesn't mandate
* VM_EXIT_INSTRUCTION_LEN to be set in VMCS when EPT MISCONFIG
* occurs and while on real hardware it was observed to be set,
* other hypervisors (namely Hyper-V) don't set it, we end up
* advancing IP with some random value. Disable fast mmio when
* running nested and keep it for real hardware in hope that
* VM_EXIT_INSTRUCTION_LEN will always be set correctly.
*/
if (!static_cpu_has(X86_FEATURE_HYPERVISOR))
return kvm_skip_emulated_instruction(vcpu);
else
return x86_emulate_instruction(vcpu, gpa, EMULTYPE_SKIP,
NULL, 0) == EMULATE_DONE;
}
ret = kvm_mmu_page_fault(vcpu, gpa, PFERR_RSVD_MASK, NULL, 0);

View File

@ -4225,13 +4225,14 @@ long kvm_arch_vm_ioctl(struct file *filp,
mutex_unlock(&kvm->lock);
break;
case KVM_XEN_HVM_CONFIG: {
struct kvm_xen_hvm_config xhc;
r = -EFAULT;
if (copy_from_user(&kvm->arch.xen_hvm_config, argp,
sizeof(struct kvm_xen_hvm_config)))
if (copy_from_user(&xhc, argp, sizeof(xhc)))
goto out;
r = -EINVAL;
if (kvm->arch.xen_hvm_config.flags)
if (xhc.flags)
goto out;
memcpy(&kvm->arch.xen_hvm_config, &xhc, sizeof(xhc));
r = 0;
break;
}
@ -5698,7 +5699,8 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu,
* handle watchpoints yet, those would be handled in
* the emulate_ops.
*/
if (kvm_vcpu_check_breakpoint(vcpu, &r))
if (!(emulation_type & EMULTYPE_SKIP) &&
kvm_vcpu_check_breakpoint(vcpu, &r))
return r;
ctxt->interruptibility = 0;

View File

@ -1180,8 +1180,7 @@ void __init mem_init(void)
after_bootmem = 1;
/* Register memory areas for /proc/kcore */
kclist_add(&kcore_vsyscall, (void *)VSYSCALL_ADDR,
PAGE_SIZE, KCORE_OTHER);
kclist_add(&kcore_vsyscall, (void *)VSYSCALL_ADDR, PAGE_SIZE, KCORE_USER);
mem_init_print_info(NULL);
}

View File

@ -592,7 +592,7 @@ enum __force_cpu_type {
static int force_cpu_type;
static int set_cpu_type(const char *str, struct kernel_param *kp)
static int set_cpu_type(const char *str, const struct kernel_param *kp)
{
if (!strcmp(str, "timer")) {
force_cpu_type = timer;

View File

@ -145,7 +145,7 @@ static inline void resume_init_first_level_page_table(pgd_t *pg_dir)
#endif
}
int swsusp_arch_resume(void)
asmlinkage int swsusp_arch_resume(void)
{
int error;

View File

@ -174,7 +174,7 @@ out:
return 0;
}
int swsusp_arch_resume(void)
asmlinkage int swsusp_arch_resume(void)
{
int error;

View File

@ -1893,7 +1893,7 @@ struct bio *bio_split(struct bio *bio, int sectors,
bio_advance(bio, split->bi_iter.bi_size);
if (bio_flagged(bio, BIO_TRACE_COMPLETION))
bio_set_flag(bio, BIO_TRACE_COMPLETION);
bio_set_flag(split, BIO_TRACE_COMPLETION);
return split;
}

View File

@ -3067,6 +3067,8 @@ void blk_rq_bio_prep(struct request_queue *q, struct request *rq,
{
if (bio_has_data(bio))
rq->nr_phys_segments = bio_phys_segments(q, bio);
else if (bio_op(bio) == REQ_OP_DISCARD)
rq->nr_phys_segments = 1;
rq->__data_len = bio->bi_iter.bi_size;
rq->bio = rq->biotail = bio;

View File

@ -551,6 +551,24 @@ static bool req_no_special_merge(struct request *req)
return !q->mq_ops && req->special;
}
static bool req_attempt_discard_merge(struct request_queue *q, struct request *req,
struct request *next)
{
unsigned short segments = blk_rq_nr_discard_segments(req);
if (segments >= queue_max_discard_segments(q))
goto no_merge;
if (blk_rq_sectors(req) + bio_sectors(next->bio) >
blk_rq_get_max_sectors(req, blk_rq_pos(req)))
goto no_merge;
req->nr_phys_segments = segments + blk_rq_nr_discard_segments(next);
return true;
no_merge:
req_set_nomerge(q, req);
return false;
}
static int ll_merge_requests_fn(struct request_queue *q, struct request *req,
struct request *next)
{
@ -684,9 +702,13 @@ static struct request *attempt_merge(struct request_queue *q,
* If we are allowed to merge, then append bio list
* from next to rq and release next. merge_requests_fn
* will have updated segment counts, update sector
* counts here.
* counts here. Handle DISCARDs separately, as they
* have separate settings.
*/
if (!ll_merge_requests_fn(q, req, next))
if (req_op(req) == REQ_OP_DISCARD) {
if (!req_attempt_discard_merge(q, req, next))
return NULL;
} else if (!ll_merge_requests_fn(q, req, next))
return NULL;
/*
@ -716,7 +738,8 @@ static struct request *attempt_merge(struct request_queue *q,
req->__data_len += blk_rq_bytes(next);
elv_merge_requests(q, req, next);
if (req_op(req) != REQ_OP_DISCARD)
elv_merge_requests(q, req, next);
/*
* 'next' is going away, so update stats accordingly

View File

@ -704,7 +704,11 @@ static ssize_t blk_mq_debugfs_write(struct file *file, const char __user *buf,
const struct blk_mq_debugfs_attr *attr = m->private;
void *data = d_inode(file->f_path.dentry->d_parent)->i_private;
if (!attr->write)
/*
* Attributes that only implement .seq_ops are read-only and 'attr' is
* the same with 'data' in this case.
*/
if (attr == data || !attr->write)
return -EPERM;
return attr->write(data, buf, count, ppos);

View File

@ -1143,9 +1143,27 @@ static void __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx)
/*
* We should be running this queue from one of the CPUs that
* are mapped to it.
*
* There are at least two related races now between setting
* hctx->next_cpu from blk_mq_hctx_next_cpu() and running
* __blk_mq_run_hw_queue():
*
* - hctx->next_cpu is found offline in blk_mq_hctx_next_cpu(),
* but later it becomes online, then this warning is harmless
* at all
*
* - hctx->next_cpu is found online in blk_mq_hctx_next_cpu(),
* but later it becomes offline, then the warning can't be
* triggered, and we depend on blk-mq timeout handler to
* handle dispatched requests to this hctx
*/
WARN_ON(!cpumask_test_cpu(raw_smp_processor_id(), hctx->cpumask) &&
cpu_online(hctx->next_cpu));
if (!cpumask_test_cpu(raw_smp_processor_id(), hctx->cpumask) &&
cpu_online(hctx->next_cpu)) {
printk(KERN_WARNING "run queue from wrong CPU %d, hctx %s\n",
raw_smp_processor_id(),
cpumask_empty(hctx->cpumask) ? "inactive": "active");
dump_stack();
}
/*
* We can't run the queue inline with ints disabled. Ensure that

View File

@ -465,6 +465,8 @@ static int acpi_lpss_create_device(struct acpi_device *adev,
acpi_dev_free_resource_list(&resource_list);
if (!pdata->mmio_base) {
/* Avoid acpi_bus_attach() instantiating a pdev for this dev. */
adev->pnp.type.platform_id = 0;
/* Skip the device, but continue the namespace scan. */
ret = 0;
goto err_out;

View File

@ -146,6 +146,12 @@ int acpi_bus_get_status(struct acpi_device *device)
return 0;
}
/* Battery devices must have their deps met before calling _STA */
if (acpi_device_is_battery(device) && device->dep_unmet) {
acpi_set_device_status(device, 0);
return 0;
}
status = acpi_bus_get_status_handle(device->handle, &sta);
if (ACPI_FAILURE(status))
return -ENODEV;

View File

@ -557,7 +557,8 @@ static int acpi_button_remove(struct acpi_device *device)
return 0;
}
static int param_set_lid_init_state(const char *val, struct kernel_param *kp)
static int param_set_lid_init_state(const char *val,
const struct kernel_param *kp)
{
int result = 0;
@ -575,7 +576,8 @@ static int param_set_lid_init_state(const char *val, struct kernel_param *kp)
return result;
}
static int param_get_lid_init_state(char *buffer, struct kernel_param *kp)
static int param_get_lid_init_state(char *buffer,
const struct kernel_param *kp)
{
switch (lid_init_state) {
case ACPI_BUTTON_LID_INIT_OPEN:

View File

@ -1927,6 +1927,9 @@ static int acpi_ec_suspend_noirq(struct device *dev)
ec->reference_count >= 1)
acpi_set_gpe(NULL, ec->gpe, ACPI_GPE_DISABLE);
if (acpi_sleep_no_ec_events())
acpi_ec_enter_noirq(ec);
return 0;
}
@ -1934,6 +1937,9 @@ static int acpi_ec_resume_noirq(struct device *dev)
{
struct acpi_ec *ec = acpi_driver_data(to_acpi_device(dev));
if (acpi_sleep_no_ec_events())
acpi_ec_leave_noirq(ec);
if (ec_no_wakeup && test_bit(EC_FLAGS_STARTED, &ec->flags) &&
ec->reference_count >= 1)
acpi_set_gpe(NULL, ec->gpe, ACPI_GPE_ENABLE);
@ -1956,7 +1962,8 @@ static const struct dev_pm_ops acpi_ec_pm = {
SET_SYSTEM_SLEEP_PM_OPS(acpi_ec_suspend, acpi_ec_resume)
};
static int param_set_event_clearing(const char *val, struct kernel_param *kp)
static int param_set_event_clearing(const char *val,
const struct kernel_param *kp)
{
int result = 0;
@ -1974,7 +1981,8 @@ static int param_set_event_clearing(const char *val, struct kernel_param *kp)
return result;
}
static int param_get_event_clearing(char *buffer, struct kernel_param *kp)
static int param_get_event_clearing(char *buffer,
const struct kernel_param *kp)
{
switch (ec_event_clearing) {
case ACPI_EC_EVT_TIMING_STATUS:

View File

@ -159,7 +159,7 @@ void acpi_processor_ppc_has_changed(struct acpi_processor *pr, int event_flag)
{
int ret;
if (ignore_ppc) {
if (ignore_ppc || !pr->performance) {
/*
* Only when it is notification event, the _OST object
* will be evaluated. Otherwise it is skipped.

View File

@ -1568,6 +1568,8 @@ void acpi_init_device_object(struct acpi_device *device, acpi_handle handle,
device_initialize(&device->dev);
dev_set_uevent_suppress(&device->dev, true);
acpi_init_coherency(device);
/* Assume there are unmet deps until acpi_device_dep_initialize() runs */
device->dep_unmet = 1;
}
void acpi_device_add_finalize(struct acpi_device *device)
@ -1591,6 +1593,14 @@ static int acpi_add_single_object(struct acpi_device **child,
}
acpi_init_device_object(device, handle, type, sta);
/*
* For ACPI_BUS_TYPE_DEVICE getting the status is delayed till here so
* that we can call acpi_bus_get_status() and use its quirk handling.
* Note this must be done before the get power-/wakeup_dev-flags calls.
*/
if (type == ACPI_BUS_TYPE_DEVICE)
acpi_bus_get_status(device);
acpi_bus_get_power_flags(device);
acpi_bus_get_wakeup_device_flags(device);
@ -1663,9 +1673,11 @@ static int acpi_bus_type_and_status(acpi_handle handle, int *type,
return -ENODEV;
*type = ACPI_BUS_TYPE_DEVICE;
status = acpi_bus_get_status_handle(handle, sta);
if (ACPI_FAILURE(status))
*sta = 0;
/*
* acpi_add_single_object updates this once we've an acpi_device
* so that acpi_bus_get_status' quirk handling can be used.
*/
*sta = 0;
break;
case ACPI_TYPE_PROCESSOR:
*type = ACPI_BUS_TYPE_PROCESSOR;
@ -1763,6 +1775,8 @@ static void acpi_device_dep_initialize(struct acpi_device *adev)
acpi_status status;
int i;
adev->dep_unmet = 0;
if (!acpi_has_method(adev->handle, "_DEP"))
return;

View File

@ -230,7 +230,8 @@ module_param_cb(trace_method_name, &param_ops_trace_method, &trace_method_name,
module_param_cb(trace_debug_layer, &param_ops_trace_attrib, &acpi_gbl_trace_dbg_layer, 0644);
module_param_cb(trace_debug_level, &param_ops_trace_attrib, &acpi_gbl_trace_dbg_level, 0644);
static int param_set_trace_state(const char *val, struct kernel_param *kp)
static int param_set_trace_state(const char *val,
const struct kernel_param *kp)
{
acpi_status status;
const char *method = trace_method_name;
@ -266,7 +267,7 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp)
return 0;
}
static int param_get_trace_state(char *buffer, struct kernel_param *kp)
static int param_get_trace_state(char *buffer, const struct kernel_param *kp)
{
if (!(acpi_gbl_trace_flags & ACPI_TRACE_ENABLED))
return sprintf(buffer, "disable");
@ -295,7 +296,8 @@ MODULE_PARM_DESC(aml_debug_output,
"To enable/disable the ACPI Debug Object output.");
/* /sys/module/acpi/parameters/acpica_version */
static int param_get_acpica_version(char *buffer, struct kernel_param *kp)
static int param_get_acpica_version(char *buffer,
const struct kernel_param *kp)
{
int result;

View File

@ -151,7 +151,7 @@ static DECLARE_WAIT_QUEUE_HEAD(binder_user_error_wait);
static int binder_stop_on_user_error;
static int binder_set_stop_on_user_error(const char *val,
struct kernel_param *kp)
const struct kernel_param *kp)
{
int ret;

View File

@ -2206,6 +2206,38 @@ static int genpd_parse_state(struct genpd_power_state *genpd_state,
return 0;
}
static int genpd_iterate_idle_states(struct device_node *dn,
struct genpd_power_state *states)
{
int ret;
struct of_phandle_iterator it;
struct device_node *np;
int i = 0;
ret = of_count_phandle_with_args(dn, "domain-idle-states", NULL);
if (ret <= 0)
return ret;
/* Loop over the phandles until all the requested entry is found */
of_for_each_phandle(&it, ret, dn, "domain-idle-states", NULL, 0) {
np = it.node;
if (!of_match_node(idle_state_match, np))
continue;
if (states) {
ret = genpd_parse_state(&states[i], np);
if (ret) {
pr_err("Parsing idle state node %pOF failed with err %d\n",
np, ret);
of_node_put(np);
return ret;
}
}
i++;
}
return i;
}
/**
* of_genpd_parse_idle_states: Return array of idle states for the genpd.
*
@ -2215,49 +2247,31 @@ static int genpd_parse_state(struct genpd_power_state *genpd_state,
*
* Returns the device states parsed from the OF node. The memory for the states
* is allocated by this function and is the responsibility of the caller to
* free the memory after use.
* free the memory after use. If no domain idle states is found it returns
* -EINVAL and in case of errors, a negative error code.
*/
int of_genpd_parse_idle_states(struct device_node *dn,
struct genpd_power_state **states, int *n)
{
struct genpd_power_state *st;
struct device_node *np;
int i = 0;
int err, ret;
int count;
struct of_phandle_iterator it;
const struct of_device_id *match_id;
int ret;
count = of_count_phandle_with_args(dn, "domain-idle-states", NULL);
if (count <= 0)
return -EINVAL;
ret = genpd_iterate_idle_states(dn, NULL);
if (ret <= 0)
return ret < 0 ? ret : -EINVAL;
st = kcalloc(count, sizeof(*st), GFP_KERNEL);
st = kcalloc(ret, sizeof(*st), GFP_KERNEL);
if (!st)
return -ENOMEM;
/* Loop over the phandles until all the requested entry is found */
of_for_each_phandle(&it, err, dn, "domain-idle-states", NULL, 0) {
np = it.node;
match_id = of_match_node(idle_state_match, np);
if (!match_id)
continue;
ret = genpd_parse_state(&st[i++], np);
if (ret) {
pr_err
("Parsing idle state node %pOF failed with err %d\n",
np, ret);
of_node_put(np);
kfree(st);
return ret;
}
ret = genpd_iterate_idle_states(dn, st);
if (ret <= 0) {
kfree(st);
return ret < 0 ? ret : -EINVAL;
}
*n = i;
if (!i)
kfree(st);
else
*states = st;
*states = st;
*n = ret;
return 0;
}

View File

@ -323,7 +323,8 @@ void dev_pm_arm_wake_irq(struct wake_irq *wirq)
return;
if (device_may_wakeup(wirq->dev)) {
if (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED)
if (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED &&
!pm_runtime_status_suspended(wirq->dev))
enable_irq(wirq->irq);
enable_irq_wake(wirq->irq);
@ -345,7 +346,8 @@ void dev_pm_disarm_wake_irq(struct wake_irq *wirq)
if (device_may_wakeup(wirq->dev)) {
disable_irq_wake(wirq->irq);
if (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED)
if (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED &&
!pm_runtime_status_suspended(wirq->dev))
disable_irq_nosync(wirq->irq);
}
}

View File

@ -251,8 +251,9 @@ static int ipmi_powernv_probe(struct platform_device *pdev)
ipmi->irq = opal_event_request(prop);
}
if (request_irq(ipmi->irq, ipmi_opal_event, IRQ_TYPE_LEVEL_HIGH,
"opal-ipmi", ipmi)) {
rc = request_irq(ipmi->irq, ipmi_opal_event, IRQ_TYPE_LEVEL_HIGH,
"opal-ipmi", ipmi);
if (rc) {
dev_warn(dev, "Unable to request irq\n");
goto err_dispose;
}

View File

@ -66,7 +66,7 @@ static void (*specific_poweroff_func)(ipmi_user_t user);
/* Holds the old poweroff function so we can restore it on removal. */
static void (*old_poweroff_func)(void);
static int set_param_ifnum(const char *val, struct kernel_param *kp)
static int set_param_ifnum(const char *val, const struct kernel_param *kp)
{
int rv = param_set_int(val, kp);
if (rv)

View File

@ -1345,7 +1345,7 @@ static unsigned int num_slave_addrs;
#define IPMI_MEM_ADDR_SPACE 1
static const char * const addr_space_to_str[] = { "i/o", "mem" };
static int hotmod_handler(const char *val, struct kernel_param *kp);
static int hotmod_handler(const char *val, const struct kernel_param *kp);
module_param_call(hotmod, hotmod_handler, NULL, NULL, 0200);
MODULE_PARM_DESC(hotmod, "Add and remove interfaces. See"
@ -1811,7 +1811,7 @@ static struct smi_info *smi_info_alloc(void)
return info;
}
static int hotmod_handler(const char *val, struct kernel_param *kp)
static int hotmod_handler(const char *val, const struct kernel_param *kp)
{
char *str = kstrdup(val, GFP_KERNEL);
int rv;

View File

@ -105,7 +105,7 @@ static int tpm_set_next_event(unsigned long delta,
* of writing CNT registers which may cause the min_delta event got
* missed, so we need add a ETIME check here in case it happened.
*/
return (int)((next - now) <= 0) ? -ETIME : 0;
return (int)(next - now) <= 0 ? -ETIME : 0;
}
static int tpm_set_state_oneshot(struct clock_event_device *evt)

View File

@ -779,6 +779,8 @@ static int intel_pstate_hwp_save_state(struct cpufreq_policy *policy)
return 0;
}
static void intel_pstate_hwp_enable(struct cpudata *cpudata);
static int intel_pstate_resume(struct cpufreq_policy *policy)
{
if (!hwp_active)
@ -786,6 +788,9 @@ static int intel_pstate_resume(struct cpufreq_policy *policy)
mutex_lock(&intel_pstate_limits_lock);
if (policy->cpu == 0)
intel_pstate_hwp_enable(all_cpu_data[policy->cpu]);
all_cpu_data[policy->cpu]->epp_policy = 0;
intel_pstate_hwp_set(policy->cpu);

View File

@ -763,7 +763,6 @@ config CRYPTO_DEV_ARTPEC6
select CRYPTO_HASH
select CRYPTO_SHA1
select CRYPTO_SHA256
select CRYPTO_SHA384
select CRYPTO_SHA512
help
Enables the driver for the on-chip crypto accelerator

View File

@ -50,7 +50,7 @@ int edac_mc_get_poll_msec(void)
return edac_mc_poll_msec;
}
static int edac_set_poll_msec(const char *val, struct kernel_param *kp)
static int edac_set_poll_msec(const char *val, const struct kernel_param *kp)
{
unsigned long l;
int ret;

View File

@ -19,7 +19,8 @@
#ifdef CONFIG_EDAC_DEBUG
static int edac_set_debug_level(const char *buf, struct kernel_param *kp)
static int edac_set_debug_level(const char *buf,
const struct kernel_param *kp)
{
unsigned long val;
int ret;

View File

@ -1130,7 +1130,13 @@ static int context_add_buffer(struct context *ctx)
return -ENOMEM;
offset = (void *)&desc->buffer - (void *)desc;
desc->buffer_size = PAGE_SIZE - offset;
/*
* Some controllers, like JMicron ones, always issue 0x20-byte DMA reads
* for descriptors, even 0x10-byte ones. This can cause page faults when
* an IOMMU is in use and the oversized read crosses a page boundary.
* Work around this by always leaving at least 0x10 bytes of padding.
*/
desc->buffer_size = PAGE_SIZE - offset - 0x10;
desc->buffer_bus = bus_addr + offset;
desc->used = 0;

View File

@ -18,7 +18,7 @@ EXPORT_SYMBOL_GPL(dmi_kobj);
* of and an antecedent to, SMBIOS, which stands for System
* Management BIOS. See further: http://www.dmtf.org/standards
*/
static const char dmi_empty_string[] = " ";
static const char dmi_empty_string[] = "";
static u32 dmi_ver __initdata;
static u32 dmi_len;
@ -44,25 +44,21 @@ static int dmi_memdev_nr;
static const char * __init dmi_string_nosave(const struct dmi_header *dm, u8 s)
{
const u8 *bp = ((u8 *) dm) + dm->length;
const u8 *nsp;
if (s) {
s--;
while (s > 0 && *bp) {
while (--s > 0 && *bp)
bp += strlen(bp) + 1;
s--;
}
if (*bp != 0) {
size_t len = strlen(bp)+1;
size_t cmp_len = len > 8 ? 8 : len;
if (!memcmp(bp, dmi_empty_string, cmp_len))
return dmi_empty_string;
/* Strings containing only spaces are considered empty */
nsp = bp;
while (*nsp == ' ')
nsp++;
if (*nsp != '\0')
return bp;
}
}
return "";
return dmi_empty_string;
}
static const char * __init dmi_string(const struct dmi_header *dm, u8 s)

View File

@ -350,19 +350,44 @@ int drm_dp_dual_mode_set_tmds_output(enum drm_dp_dual_mode_type type,
{
uint8_t tmds_oen = enable ? 0 : DP_DUAL_MODE_TMDS_DISABLE;
ssize_t ret;
int retry;
if (type < DRM_DP_DUAL_MODE_TYPE2_DVI)
return 0;
ret = drm_dp_dual_mode_write(adapter, DP_DUAL_MODE_TMDS_OEN,
&tmds_oen, sizeof(tmds_oen));
if (ret) {
DRM_DEBUG_KMS("Failed to %s TMDS output buffers\n",
enable ? "enable" : "disable");
return ret;
/*
* LSPCON adapters in low-power state may ignore the first write, so
* read back and verify the written value a few times.
*/
for (retry = 0; retry < 3; retry++) {
uint8_t tmp;
ret = drm_dp_dual_mode_write(adapter, DP_DUAL_MODE_TMDS_OEN,
&tmds_oen, sizeof(tmds_oen));
if (ret) {
DRM_DEBUG_KMS("Failed to %s TMDS output buffers (%d attempts)\n",
enable ? "enable" : "disable",
retry + 1);
return ret;
}
ret = drm_dp_dual_mode_read(adapter, DP_DUAL_MODE_TMDS_OEN,
&tmp, sizeof(tmp));
if (ret) {
DRM_DEBUG_KMS("I2C read failed during TMDS output buffer %s (%d attempts)\n",
enable ? "enabling" : "disabling",
retry + 1);
return ret;
}
if (tmp == tmds_oen)
return 0;
}
return 0;
DRM_DEBUG_KMS("I2C write value mismatch during TMDS output buffer %s\n",
enable ? "enabling" : "disabling");
return -EIO;
}
EXPORT_SYMBOL(drm_dp_dual_mode_set_tmds_output);

View File

@ -1153,7 +1153,7 @@ static long intel_vgpu_ioctl(struct mdev_device *mdev, unsigned int cmd,
return 0;
}
return 0;
return -ENOTTY;
}
static ssize_t

View File

@ -3995,7 +3995,11 @@ extern void intel_display_print_error_state(struct drm_i915_error_state_buf *e,
struct intel_display_error_state *error);
int sandybridge_pcode_read(struct drm_i915_private *dev_priv, u32 mbox, u32 *val);
int sandybridge_pcode_write(struct drm_i915_private *dev_priv, u32 mbox, u32 val);
int sandybridge_pcode_write_timeout(struct drm_i915_private *dev_priv, u32 mbox,
u32 val, int timeout_us);
#define sandybridge_pcode_write(dev_priv, mbox, val) \
sandybridge_pcode_write_timeout(dev_priv, mbox, val, 500)
int skl_pcode_request(struct drm_i915_private *dev_priv, u32 mbox, u32 request,
u32 reply_mask, u32 reply, int timeout_base_ms);

View File

@ -722,7 +722,7 @@ static int eb_lookup_vmas(struct i915_execbuffer *eb)
err = radix_tree_insert(handles_vma, handle, vma);
if (unlikely(err)) {
kfree(lut);
kmem_cache_free(eb->i915->luts, lut);
goto err_obj;
}

View File

@ -704,7 +704,7 @@ static void i915_audio_component_codec_wake_override(struct device *kdev,
struct drm_i915_private *dev_priv = kdev_to_i915(kdev);
u32 tmp;
if (!IS_GEN9_BC(dev_priv))
if (!IS_GEN9(dev_priv))
return;
i915_audio_component_get_power(kdev);

View File

@ -1289,10 +1289,15 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,
break;
}
/* Inform power controller of upcoming frequency change */
mutex_lock(&dev_priv->rps.hw_lock);
ret = sandybridge_pcode_write(dev_priv, HSW_PCODE_DE_WRITE_FREQ_REQ,
0x80000000);
/*
* Inform power controller of upcoming frequency change. BSpec
* requires us to wait up to 150usec, but that leads to timeouts;
* the 2ms used here is based on experiment.
*/
ret = sandybridge_pcode_write_timeout(dev_priv,
HSW_PCODE_DE_WRITE_FREQ_REQ,
0x80000000, 2000);
mutex_unlock(&dev_priv->rps.hw_lock);
if (ret) {
@ -1323,8 +1328,15 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,
I915_WRITE(CDCLK_CTL, val);
mutex_lock(&dev_priv->rps.hw_lock);
ret = sandybridge_pcode_write(dev_priv, HSW_PCODE_DE_WRITE_FREQ_REQ,
DIV_ROUND_UP(cdclk, 25000));
/*
* The timeout isn't specified, the 2ms used here is based on
* experiment.
* FIXME: Waiting for the request completion could be delayed until
* the next PCODE request based on BSpec.
*/
ret = sandybridge_pcode_write_timeout(dev_priv,
HSW_PCODE_DE_WRITE_FREQ_REQ,
DIV_ROUND_UP(cdclk, 25000), 2000);
mutex_unlock(&dev_priv->rps.hw_lock);
if (ret) {

View File

@ -8941,8 +8941,8 @@ int sandybridge_pcode_read(struct drm_i915_private *dev_priv, u32 mbox, u32 *val
return 0;
}
int sandybridge_pcode_write(struct drm_i915_private *dev_priv,
u32 mbox, u32 val)
int sandybridge_pcode_write_timeout(struct drm_i915_private *dev_priv,
u32 mbox, u32 val, int timeout_us)
{
int status;
@ -8965,7 +8965,7 @@ int sandybridge_pcode_write(struct drm_i915_private *dev_priv,
if (__intel_wait_for_register_fw(dev_priv,
GEN6_PCODE_MAILBOX, GEN6_PCODE_READY, 0,
500, 0, NULL)) {
timeout_us, 0, NULL)) {
DRM_ERROR("timeout waiting for pcode write of 0x%08x to mbox %x to finish for %ps\n",
val, mbox, __builtin_return_address(0));
return -ETIMEDOUT;

View File

@ -47,8 +47,8 @@ static uint32_t gf100_pmu_data[] = {
0x00000000,
0x00000000,
0x584d454d,
0x00000756,
0x00000748,
0x00000754,
0x00000746,
0x00000000,
0x00000000,
0x00000000,
@ -69,8 +69,8 @@ static uint32_t gf100_pmu_data[] = {
0x00000000,
0x00000000,
0x46524550,
0x0000075a,
0x00000758,
0x00000756,
0x00000000,
0x00000000,
0x00000000,
@ -91,8 +91,8 @@ static uint32_t gf100_pmu_data[] = {
0x00000000,
0x00000000,
0x5f433249,
0x00000b8a,
0x00000a2d,
0x00000b88,
0x00000a2b,
0x00000000,
0x00000000,
0x00000000,
@ -113,8 +113,8 @@ static uint32_t gf100_pmu_data[] = {
0x00000000,
0x00000000,
0x54534554,
0x00000bb3,
0x00000b8c,
0x00000bb1,
0x00000b8a,
0x00000000,
0x00000000,
0x00000000,
@ -135,8 +135,8 @@ static uint32_t gf100_pmu_data[] = {
0x00000000,
0x00000000,
0x454c4449,
0x00000bbf,
0x00000bbd,
0x00000bbb,
0x00000000,
0x00000000,
0x00000000,
@ -237,19 +237,19 @@ static uint32_t gf100_pmu_data[] = {
0x000005d3,
0x00000003,
0x00000002,
0x0000069d,
0x0000069b,
0x00040004,
0x00000000,
0x000006b9,
0x000006b7,
0x00010005,
0x00000000,
0x000006d6,
0x000006d4,
0x00010006,
0x00000000,
0x0000065b,
0x00000007,
0x00000000,
0x000006e1,
0x000006df,
/* 0x03c4: memx_func_tail */
/* 0x03c4: memx_ts_start */
0x00000000,
@ -1373,432 +1373,432 @@ static uint32_t gf100_pmu_code[] = {
/* 0x065b: memx_func_wait_vblank */
0x9800f840,
0x66b00016,
0x130bf400,
0x120bf400,
0xf40166b0,
0x0ef4060b,
/* 0x066d: memx_func_wait_vblank_head1 */
0x2077f12e,
0x070ef400,
/* 0x0674: memx_func_wait_vblank_head0 */
0x000877f1,
/* 0x0678: memx_func_wait_vblank_0 */
0x07c467f1,
0xcf0664b6,
0x67fd0066,
0xf31bf404,
/* 0x0688: memx_func_wait_vblank_1 */
0x07c467f1,
0xcf0664b6,
0x67fd0066,
0xf30bf404,
/* 0x0698: memx_func_wait_vblank_fini */
0xf80410b6,
/* 0x069d: memx_func_wr32 */
0x00169800,
0xb6011598,
0x60f90810,
0xd0fc50f9,
0x21f4e0fc,
0x0242b640,
0xf8e91bf4,
/* 0x06b9: memx_func_wait */
0x2c87f000,
0xcf0684b6,
0x1e980088,
0x011d9800,
0x98021c98,
0x10b6031b,
0xa321f410,
/* 0x06d6: memx_func_delay */
0x1e9800f8,
0x0410b600,
0xf87e21f4,
/* 0x06e1: memx_func_train */
/* 0x06e3: memx_exec */
0xf900f800,
0xb9d0f9e0,
0xb2b902c1,
/* 0x06ed: memx_exec_next */
0x00139802,
0xe70410b6,
0xe701f034,
0xb601e033,
0x30f00132,
0xde35980c,
0x12b855f9,
0xe41ef406,
0x98f10b98,
0xcbbbf20c,
0xc4b7f102,
0x06b4b607,
0xfc00bbcf,
0xf5e0fcd0,
0xf8033621,
/* 0x0729: memx_info */
0x01c67000,
/* 0x072f: memx_info_data */
0xf10e0bf4,
0xf103ccc7,
0xf40800b7,
/* 0x073a: memx_info_train */
0xc7f10b0e,
0xb7f10bcc,
/* 0x0742: memx_info_send */
0x21f50100,
0x00f80336,
/* 0x0748: memx_recv */
0xf401d6b0,
0xd6b0980b,
0xd80bf400,
/* 0x0756: memx_init */
0x2077f02c,
/* 0x0673: memx_func_wait_vblank_head0 */
0xf0060ef4,
/* 0x0676: memx_func_wait_vblank_0 */
0x67f10877,
0x64b607c4,
0x0066cf06,
0xf40467fd,
/* 0x0686: memx_func_wait_vblank_1 */
0x67f1f31b,
0x64b607c4,
0x0066cf06,
0xf40467fd,
/* 0x0696: memx_func_wait_vblank_fini */
0x10b6f30b,
/* 0x069b: memx_func_wr32 */
0x9800f804,
0x15980016,
0x0810b601,
0x50f960f9,
0xe0fcd0fc,
0xb64021f4,
0x1bf40242,
/* 0x06b7: memx_func_wait */
0xf000f8e9,
0x84b62c87,
0x0088cf06,
0x98001e98,
0x1c98011d,
0x031b9802,
0xf41010b6,
0x00f8a321,
/* 0x06d4: memx_func_delay */
0xb6001e98,
0x21f40410,
/* 0x06df: memx_func_train */
0xf800f87e,
/* 0x06e1: memx_exec */
0xf9e0f900,
0x02c1b9d0,
/* 0x06eb: memx_exec_next */
0x9802b2b9,
0x10b60013,
0xf034e704,
0xe033e701,
0x0132b601,
0x980c30f0,
0x55f9de35,
0xf40612b8,
0x0b98e41e,
0xf20c98f1,
0xf102cbbb,
0xb607c4b7,
0xbbcf06b4,
0xfcd0fc00,
0x3621f5e0,
/* 0x0727: memx_info */
0x7000f803,
0x0bf401c6,
/* 0x072d: memx_info_data */
0xccc7f10e,
0x00b7f103,
0x0b0ef408,
/* 0x0738: memx_info_train */
0x0bccc7f1,
0x0100b7f1,
/* 0x0740: memx_info_send */
0x033621f5,
/* 0x0746: memx_recv */
0xd6b000f8,
0x980bf401,
0xf400d6b0,
0x00f8d80b,
/* 0x0754: memx_init */
/* 0x0756: perf_recv */
0x00f800f8,
/* 0x0758: perf_recv */
/* 0x075a: perf_init */
0x00f800f8,
/* 0x075c: i2c_drive_scl */
0xf40036b0,
0x07f1110b,
0x04b607e0,
0x0001d006,
0x00f804bd,
/* 0x0770: i2c_drive_scl_lo */
0x07e407f1,
0xd00604b6,
0x04bd0001,
/* 0x077e: i2c_drive_sda */
/* 0x0758: perf_init */
/* 0x075a: i2c_drive_scl */
0x36b000f8,
0x110bf400,
0x07e007f1,
0xd00604b6,
0x04bd0002,
/* 0x0792: i2c_drive_sda_lo */
0x04bd0001,
/* 0x076e: i2c_drive_scl_lo */
0x07f100f8,
0x04b607e4,
0x0001d006,
0x00f804bd,
/* 0x077c: i2c_drive_sda */
0xf40036b0,
0x07f1110b,
0x04b607e0,
0x0002d006,
0x00f804bd,
/* 0x07a0: i2c_sense_scl */
0xf10132f4,
0xb607c437,
0x33cf0634,
0x0431fd00,
0xf4060bf4,
/* 0x07b6: i2c_sense_scl_done */
0x00f80131,
/* 0x07b8: i2c_sense_sda */
0xf10132f4,
0xb607c437,
0x33cf0634,
0x0432fd00,
0xf4060bf4,
/* 0x07ce: i2c_sense_sda_done */
0x00f80131,
/* 0x07d0: i2c_raise_scl */
0x47f140f9,
0x37f00898,
0x5c21f501,
/* 0x07dd: i2c_raise_scl_wait */
/* 0x0790: i2c_drive_sda_lo */
0x07e407f1,
0xd00604b6,
0x04bd0002,
/* 0x079e: i2c_sense_scl */
0x32f400f8,
0xc437f101,
0x0634b607,
0xfd0033cf,
0x0bf40431,
0x0131f406,
/* 0x07b4: i2c_sense_scl_done */
/* 0x07b6: i2c_sense_sda */
0x32f400f8,
0xc437f101,
0x0634b607,
0xfd0033cf,
0x0bf40432,
0x0131f406,
/* 0x07cc: i2c_sense_sda_done */
/* 0x07ce: i2c_raise_scl */
0x40f900f8,
0x089847f1,
0xf50137f0,
/* 0x07db: i2c_raise_scl_wait */
0xf1075a21,
0xf403e8e7,
0x21f57e21,
0x01f4079e,
0x0142b609,
/* 0x07ef: i2c_raise_scl_done */
0xfcef1bf4,
/* 0x07f3: i2c_start */
0xf500f840,
0xf4079e21,
0x21f50d11,
0x11f407b6,
0x300ef406,
/* 0x0804: i2c_start_rep */
0xf50037f0,
0xf0075a21,
0x21f50137,
0x76bb077c,
0x0465b600,
0x659450f9,
0x0256bb04,
0x75fd50bd,
0xf550fc04,
0xb607ce21,
0x11f40464,
/* 0x0831: i2c_start_send */
0x0037f01f,
0x077c21f5,
0x1388e7f1,
0xf07e21f4,
0x21f50037,
0xe7f1075a,
0x21f41388,
/* 0x084d: i2c_start_out */
/* 0x084f: i2c_stop */
0xf000f87e,
0x21f50037,
0x37f0075a,
0x7c21f500,
0xe8e7f107,
0x7e21f403,
0x07a021f5,
0xb60901f4,
0x1bf40142,
/* 0x07f1: i2c_raise_scl_done */
0xf840fcef,
/* 0x07f5: i2c_start */
0xa021f500,
0x0d11f407,
0x07b821f5,
0xf40611f4,
/* 0x0806: i2c_start_rep */
0x37f0300e,
0x5c21f500,
0x0137f007,
0x077e21f5,
0xb60076bb,
0x50f90465,
0xbb046594,
0x50bd0256,
0xfc0475fd,
0xd021f550,
0x0464b607,
/* 0x0833: i2c_start_send */
0xf01f11f4,
0x21f50037,
0xe7f1077e,
0x21f41388,
0x0037f07e,
0x075c21f5,
0x1388e7f1,
/* 0x084f: i2c_start_out */
0xf87e21f4,
/* 0x0851: i2c_stop */
0x0037f000,
0x075c21f5,
0xf50037f0,
0xf1077e21,
0xf403e8e7,
0x37f07e21,
0x5c21f501,
0x88e7f107,
0x7e21f413,
0xf50137f0,
0xf1077e21,
0xf1075a21,
0xf41388e7,
0x00f87e21,
/* 0x0884: i2c_bitw */
0x077e21f5,
0x03e8e7f1,
0xbb7e21f4,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
0x07d021f5,
0xf40464b6,
0xe7f11811,
0x21f41388,
0x0037f07e,
0x075c21f5,
0x1388e7f1,
/* 0x08c3: i2c_bitw_out */
0xf87e21f4,
/* 0x08c5: i2c_bitr */
0x0137f000,
0x077e21f5,
0x03e8e7f1,
0xbb7e21f4,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
0x07d021f5,
0xf40464b6,
0x21f51b11,
0x37f007b8,
0x5c21f500,
0x37f07e21,
0x7c21f501,
0x88e7f107,
0x7e21f413,
0xf4013cf0,
/* 0x090a: i2c_bitr_done */
0x00f80131,
/* 0x090c: i2c_get_byte */
0xf00057f0,
/* 0x0912: i2c_get_byte_next */
0x54b60847,
0x0076bb01,
0xf90465b6,
0x04659450,
0xbd0256bb,
0x0475fd50,
0x21f550fc,
0x64b608c5,
0x2b11f404,
0xb60553fd,
0x1bf40142,
0x0137f0d8,
0xb60076bb,
0x50f90465,
0xbb046594,
0x50bd0256,
0xfc0475fd,
0x8421f550,
0x0464b608,
/* 0x095c: i2c_get_byte_done */
/* 0x095e: i2c_put_byte */
0x47f000f8,
/* 0x0961: i2c_put_byte_next */
0x0142b608,
0xbb3854ff,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
0x088421f5,
0xf40464b6,
0x46b03411,
0xd81bf400,
0xb60076bb,
0x50f90465,
0xbb046594,
0x50bd0256,
0xfc0475fd,
0xc521f550,
0x0464b608,
0xbb0f11f4,
0x36b00076,
0x061bf401,
/* 0x09b7: i2c_put_byte_done */
0xf80132f4,
/* 0x09b9: i2c_addr */
0x0076bb00,
0xf90465b6,
0x04659450,
0xbd0256bb,
0x0475fd50,
0x21f550fc,
0x64b607f5,
0x2911f404,
0x012ec3e7,
0xfd0134b6,
0x76bb0553,
0x0465b600,
0x659450f9,
0x0256bb04,
0x75fd50bd,
0xf550fc04,
0xb6095e21,
/* 0x09fe: i2c_addr_done */
0x00f80464,
/* 0x0a00: i2c_acquire_addr */
0xb6f8cec7,
0xe0b702e4,
0xee980d1c,
/* 0x0a0f: i2c_acquire */
0xf500f800,
0xf40a0021,
0xd9f00421,
0x4021f403,
/* 0x0a1e: i2c_release */
/* 0x0882: i2c_bitw */
0x21f500f8,
0x21f40a00,
0x03daf004,
0xf84021f4,
/* 0x0a2d: i2c_recv */
0x0132f400,
0xb6f8c1c7,
0x16b00214,
0x3a1ff528,
0xf413a001,
0x0032980c,
0x0ccc13a0,
0xf4003198,
0xd0f90231,
0xd0f9e0f9,
0x000067f1,
0x100063f1,
0xbb016792,
0xe7f1077c,
0x21f403e8,
0x0076bb7e,
0xf90465b6,
0x04659450,
0xbd0256bb,
0x0475fd50,
0x21f550fc,
0x64b607ce,
0x1811f404,
0x1388e7f1,
0xf07e21f4,
0x21f50037,
0xe7f1075a,
0x21f41388,
/* 0x08c1: i2c_bitw_out */
/* 0x08c3: i2c_bitr */
0xf000f87e,
0x21f50137,
0xe7f1077c,
0x21f403e8,
0x0076bb7e,
0xf90465b6,
0x04659450,
0xbd0256bb,
0x0475fd50,
0x21f550fc,
0x64b607ce,
0x1b11f404,
0x07b621f5,
0xf50037f0,
0xf1075a21,
0xf41388e7,
0x3cf07e21,
0x0131f401,
/* 0x0908: i2c_bitr_done */
/* 0x090a: i2c_get_byte */
0x57f000f8,
0x0847f000,
/* 0x0910: i2c_get_byte_next */
0xbb0154b6,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
0x0a0f21f5,
0xfc0464b6,
0x00d6b0d0,
0x00b31bf5,
0xbb0057f0,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
0x09b921f5,
0xf50464b6,
0xc700d011,
0x76bbe0c5,
0x08c321f5,
0xf40464b6,
0x53fd2b11,
0x0142b605,
0xf0d81bf4,
0x76bb0137,
0x0465b600,
0x659450f9,
0x0256bb04,
0x75fd50bd,
0xf550fc04,
0xb6095e21,
0x11f50464,
0x57f000ad,
0xb6088221,
/* 0x095a: i2c_get_byte_done */
0x00f80464,
/* 0x095c: i2c_put_byte */
/* 0x095f: i2c_put_byte_next */
0xb60847f0,
0x54ff0142,
0x0076bb38,
0xf90465b6,
0x04659450,
0xbd0256bb,
0x0475fd50,
0x21f550fc,
0x64b60882,
0x3411f404,
0xf40046b0,
0x76bbd81b,
0x0465b600,
0x659450f9,
0x0256bb04,
0x75fd50bd,
0xf550fc04,
0xb608c321,
0x11f40464,
0x0076bb0f,
0xf40136b0,
0x32f4061b,
/* 0x09b5: i2c_put_byte_done */
/* 0x09b7: i2c_addr */
0xbb00f801,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
0x07f321f5,
0xf40464b6,
0xc3e72911,
0x34b6012e,
0x0553fd01,
0xb60076bb,
0x50f90465,
0xbb046594,
0x50bd0256,
0xfc0475fd,
0x5c21f550,
0x0464b609,
/* 0x09fc: i2c_addr_done */
/* 0x09fe: i2c_acquire_addr */
0xcec700f8,
0x02e4b6f8,
0x0d1ce0b7,
0xf800ee98,
/* 0x0a0d: i2c_acquire */
0xfe21f500,
0x0421f409,
0xf403d9f0,
0x00f84021,
/* 0x0a1c: i2c_release */
0x09fe21f5,
0xf00421f4,
0x21f403da,
/* 0x0a2b: i2c_recv */
0xf400f840,
0xc1c70132,
0x0214b6f8,
0xf52816b0,
0xa0013a1f,
0x980cf413,
0x13a00032,
0x31980ccc,
0x0231f400,
0xe0f9d0f9,
0x67f1d0f9,
0x63f10000,
0x67921000,
0x0076bb01,
0xf90465b6,
0x04659450,
0xbd0256bb,
0x0475fd50,
0x21f550fc,
0x64b609b9,
0x8a11f504,
0x64b60a0d,
0xb0d0fc04,
0x1bf500d6,
0x57f000b3,
0x0076bb00,
0xf90465b6,
0x04659450,
0xbd0256bb,
0x0475fd50,
0x21f550fc,
0x64b6090c,
0x6a11f404,
0xbbe05bcb,
0x64b609b7,
0xd011f504,
0xe0c5c700,
0xb60076bb,
0x50f90465,
0xbb046594,
0x50bd0256,
0xfc0475fd,
0x5c21f550,
0x0464b609,
0x00ad11f5,
0xbb0157f0,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
0x085121f5,
0xb90464b6,
0x74bd025b,
/* 0x0b33: i2c_recv_not_rd08 */
0xb0430ef4,
0x1bf401d6,
0x0057f03d,
0x09b921f5,
0xc73311f4,
0x21f5e0c5,
0x11f4095e,
0x0057f029,
0x09b921f5,
0xc71f11f4,
0x21f5e0b5,
0x11f4095e,
0x5121f515,
0xc774bd08,
0x1bf408c5,
0x0232f409,
/* 0x0b73: i2c_recv_not_wr08 */
/* 0x0b73: i2c_recv_done */
0xc7030ef4,
0x21f5f8ce,
0xe0fc0a1e,
0x12f4d0fc,
0x027cb90a,
0x033621f5,
/* 0x0b88: i2c_recv_exit */
/* 0x0b8a: i2c_init */
0x00f800f8,
/* 0x0b8c: test_recv */
0x05d817f1,
0xcf0614b6,
0x10b60011,
0xd807f101,
0x0604b605,
0xbd0001d0,
0x00e7f104,
0x4fe3f1d9,
0x5621f513,
/* 0x0bb3: test_init */
0xf100f802,
0xf50800e7,
0xf8025621,
/* 0x0bbd: idle_recv */
/* 0x0bbf: idle */
0xf400f800,
0x17f10031,
0x14b605d4,
0x09b721f5,
0xf50464b6,
0xbb008a11,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
0x090a21f5,
0xf40464b6,
0x5bcb6a11,
0x0076bbe0,
0xf90465b6,
0x04659450,
0xbd0256bb,
0x0475fd50,
0x21f550fc,
0x64b6084f,
0x025bb904,
0x0ef474bd,
/* 0x0b31: i2c_recv_not_rd08 */
0x01d6b043,
0xf03d1bf4,
0x21f50057,
0x11f409b7,
0xe0c5c733,
0x095c21f5,
0xf02911f4,
0x21f50057,
0x11f409b7,
0xe0b5c71f,
0x095c21f5,
0xf51511f4,
0xbd084f21,
0x08c5c774,
0xf4091bf4,
0x0ef40232,
/* 0x0b71: i2c_recv_not_wr08 */
/* 0x0b71: i2c_recv_done */
0xf8cec703,
0x0a1c21f5,
0xd0fce0fc,
0xb90a12f4,
0x21f5027c,
/* 0x0b86: i2c_recv_exit */
0x00f80336,
/* 0x0b88: i2c_init */
/* 0x0b8a: test_recv */
0x17f100f8,
0x14b605d8,
0x0011cf06,
0xf10110b6,
0xb605d407,
0xb605d807,
0x01d00604,
/* 0x0bdb: idle_loop */
0xf004bd00,
0x32f45817,
/* 0x0be1: idle_proc */
/* 0x0be1: idle_proc_exec */
0xb910f902,
0x21f5021e,
0x10fc033f,
0xf40911f4,
0x0ef40231,
/* 0x0bf5: idle_proc_next */
0x5810b6ef,
0xf4061fb8,
0x02f4e61b,
0x0028f4dd,
0x00bb0ef4,
0xf104bd00,
0xf1d900e7,
0xf5134fe3,
0xf8025621,
/* 0x0bb1: test_init */
0x00e7f100,
0x5621f508,
/* 0x0bbb: idle_recv */
0xf800f802,
/* 0x0bbd: idle */
0x0031f400,
0x05d417f1,
0xcf0614b6,
0x10b60011,
0xd407f101,
0x0604b605,
0xbd0001d0,
/* 0x0bd9: idle_loop */
0x5817f004,
/* 0x0bdf: idle_proc */
/* 0x0bdf: idle_proc_exec */
0xf90232f4,
0x021eb910,
0x033f21f5,
0x11f410fc,
0x0231f409,
/* 0x0bf3: idle_proc_next */
0xb6ef0ef4,
0x1fb85810,
0xe61bf406,
0xf4dd02f4,
0x0ef40028,
0x000000bb,
0x00000000,
0x00000000,
0x00000000,

View File

@ -47,8 +47,8 @@ static uint32_t gk208_pmu_data[] = {
0x00000000,
0x00000000,
0x584d454d,
0x000005f3,
0x000005e5,
0x000005ee,
0x000005e0,
0x00000000,
0x00000000,
0x00000000,
@ -69,8 +69,8 @@ static uint32_t gk208_pmu_data[] = {
0x00000000,
0x00000000,
0x46524550,
0x000005f7,
0x000005f5,
0x000005f2,
0x000005f0,
0x00000000,
0x00000000,
0x00000000,
@ -91,8 +91,8 @@ static uint32_t gk208_pmu_data[] = {
0x00000000,
0x00000000,
0x5f433249,
0x000009f8,
0x000008a2,
0x000009f3,
0x0000089d,
0x00000000,
0x00000000,
0x00000000,
@ -113,8 +113,8 @@ static uint32_t gk208_pmu_data[] = {
0x00000000,
0x00000000,
0x54534554,
0x00000a16,
0x000009fa,
0x00000a11,
0x000009f5,
0x00000000,
0x00000000,
0x00000000,
@ -135,8 +135,8 @@ static uint32_t gk208_pmu_data[] = {
0x00000000,
0x00000000,
0x454c4449,
0x00000a21,
0x00000a1f,
0x00000a1c,
0x00000a1a,
0x00000000,
0x00000000,
0x00000000,
@ -234,22 +234,22 @@ static uint32_t gk208_pmu_data[] = {
/* 0x037c: memx_func_next */
0x00000002,
0x00000000,
0x000004cf,
0x000004cc,
0x00000003,
0x00000002,
0x00000546,
0x00000541,
0x00040004,
0x00000000,
0x00000563,
0x0000055e,
0x00010005,
0x00000000,
0x0000057d,
0x00000578,
0x00010006,
0x00000000,
0x00000541,
0x0000053c,
0x00000007,
0x00000000,
0x00000589,
0x00000584,
/* 0x03c4: memx_func_tail */
/* 0x03c4: memx_ts_start */
0x00000000,
@ -1239,454 +1239,454 @@ static uint32_t gk208_pmu_code[] = {
0x0001f604,
0x00f804bd,
/* 0x045c: memx_func_enter */
0x162067f1,
0xf55d77f1,
0x047e6eb2,
0xd8b20000,
0xf90487fd,
0xfc80f960,
0x7ee0fcd0,
0x0700002d,
0x7e6eb2fe,
0x47162046,
0x6eb2f55d,
0x0000047e,
0x87fdd8b2,
0xf960f904,
0xfcd0fc80,
0x002d7ee0,
0xb2fe0700,
0x00047e6e,
0xfdd8b200,
0x60f90487,
0xd0fc80f9,
0x2d7ee0fc,
0xf0460000,
0x7e6eb226,
0xb2000004,
0x0487fdd8,
0x80f960f9,
0xe0fcd0fc,
0x00002d7e,
0x26f067f1,
0x047e6eb2,
0xd8b20000,
0xf90487fd,
0xfc80f960,
0x7ee0fcd0,
0x0600002d,
0x07e04004,
0xbd0006f6,
/* 0x04b9: memx_func_enter_wait */
0x07c04604,
0xf00066cf,
0x0bf40464,
0xcf2c06f7,
0x06b50066,
/* 0x04cf: memx_func_leave */
0x0600f8f1,
0x0066cf2c,
0x06f206b5,
0x07e44004,
0xbd0006f6,
/* 0x04e1: memx_func_leave_wait */
0x07c04604,
0xf00066cf,
0x1bf40464,
0xf067f1f7,
0xe0400406,
0x0006f607,
/* 0x04b6: memx_func_enter_wait */
0xc04604bd,
0x0066cf07,
0xf40464f0,
0x2c06f70b,
0xb50066cf,
0x00f8f106,
/* 0x04cc: memx_func_leave */
0x66cf2c06,
0xf206b500,
0xe4400406,
0x0006f607,
/* 0x04de: memx_func_leave_wait */
0xc04604bd,
0x0066cf07,
0xf40464f0,
0xf046f71b,
0xb2010726,
0x00047e6e,
0xfdd8b200,
0x60f90587,
0xd0fc80f9,
0x2d7ee0fc,
0x67f10000,
0x6eb21620,
0x0000047e,
0x87fdd8b2,
0xf960f905,
0xfcd0fc80,
0x002d7ee0,
0x0aa24700,
0x047e6eb2,
0xd8b20000,
0xf90587fd,
0xfc80f960,
0x7ee0fcd0,
0xf800002d,
/* 0x0541: memx_func_wait_vblank */
0x0410b600,
/* 0x0546: memx_func_wr32 */
0x169800f8,
0x01159800,
0xf90810b6,
0xfc50f960,
0x7ee0fcd0,
0xb600002d,
0x1bf40242,
/* 0x0563: memx_func_wait */
0x0800f8e8,
0x0088cf2c,
0x98001e98,
0x1c98011d,
0x031b9802,
0x7e1010b6,
0xf8000074,
/* 0x057d: memx_func_delay */
0x001e9800,
0x7e0410b6,
0xf8000058,
/* 0x0589: memx_func_train */
/* 0x058b: memx_exec */
0xf900f800,
0xb2d0f9e0,
/* 0x0593: memx_exec_next */
0x98b2b2c1,
0x10b60013,
0xf034e704,
0xe033e701,
0x0132b601,
0x980c30f0,
0x55f9de35,
0x1ef412a6,
0xf10b98e5,
0xbbf20c98,
0xc44b02cb,
0x00bbcf07,
0x20460000,
0x7e6eb216,
0xb2000004,
0x0587fdd8,
0x80f960f9,
0xe0fcd0fc,
0x00029f7e,
/* 0x05ca: memx_info */
0xc67000f8,
0x0c0bf401,
/* 0x05d0: memx_info_data */
0x4b03cc4c,
0x0ef40800,
/* 0x05d9: memx_info_train */
0x0bcc4c09,
/* 0x05df: memx_info_send */
0x7e01004b,
0xf800029f,
/* 0x05e5: memx_recv */
0x01d6b000,
0xb0a30bf4,
0x0bf400d6,
/* 0x05f3: memx_init */
0xf800f8dc,
/* 0x05f5: perf_recv */
/* 0x05f7: perf_init */
0xf800f800,
/* 0x05f9: i2c_drive_scl */
0x0036b000,
0x400d0bf4,
0x01f607e0,
0xf804bd00,
/* 0x0609: i2c_drive_scl_lo */
0x07e44000,
0xbd0001f6,
/* 0x0613: i2c_drive_sda */
0xb000f804,
0x0bf40036,
0x07e0400d,
0xbd0002f6,
/* 0x0623: i2c_drive_sda_lo */
0x4000f804,
0x02f607e4,
0xf804bd00,
/* 0x062d: i2c_sense_scl */
0x0132f400,
0xcf07c443,
0x31fd0033,
0x060bf404,
/* 0x063f: i2c_sense_scl_done */
0xf80131f4,
/* 0x0641: i2c_sense_sda */
0x0132f400,
0xcf07c443,
0x32fd0033,
0x060bf404,
/* 0x0653: i2c_sense_sda_done */
0xf80131f4,
/* 0x0655: i2c_raise_scl */
0x4440f900,
0x01030898,
0x0005f97e,
/* 0x0660: i2c_raise_scl_wait */
0x7e03e84e,
0x7e000058,
0xf400062d,
0x42b60901,
0xef1bf401,
/* 0x0674: i2c_raise_scl_done */
0x00f840fc,
/* 0x0678: i2c_start */
0x00062d7e,
0x7e0d11f4,
0xf4000641,
0x0ef40611,
/* 0x0689: i2c_start_rep */
0x7e00032e,
0x030005f9,
0x06137e01,
0x0076bb00,
0xf90465b6,
0x04659450,
0xbd0256bb,
0x0475fd50,
0x557e50fc,
0x64b60006,
0x1d11f404,
/* 0x06b4: i2c_start_send */
0x137e0003,
0x884e0006,
0x00587e13,
0x7e000300,
0x4e0005f9,
0x587e1388,
/* 0x06ce: i2c_start_out */
0x00002d7e,
0xb20aa247,
0x00047e6e,
0xfdd8b200,
0x60f90587,
0xd0fc80f9,
0x2d7ee0fc,
0x00f80000,
/* 0x06d0: i2c_stop */
0xf97e0003,
0x00030005,
0x0006137e,
0x7e03e84e,
0x03000058,
0x05f97e01,
/* 0x053c: memx_func_wait_vblank */
0xf80410b6,
/* 0x0541: memx_func_wr32 */
0x00169800,
0xb6011598,
0x60f90810,
0xd0fc50f9,
0x2d7ee0fc,
0x42b60000,
0xe81bf402,
/* 0x055e: memx_func_wait */
0x2c0800f8,
0x980088cf,
0x1d98001e,
0x021c9801,
0xb6031b98,
0x747e1010,
0x00f80000,
/* 0x0578: memx_func_delay */
0xb6001e98,
0x587e0410,
0x00f80000,
/* 0x0584: memx_func_train */
/* 0x0586: memx_exec */
0xe0f900f8,
0xc1b2d0f9,
/* 0x058e: memx_exec_next */
0x1398b2b2,
0x0410b600,
0x01f034e7,
0x01e033e7,
0xf00132b6,
0x35980c30,
0xa655f9de,
0xe51ef412,
0x98f10b98,
0xcbbbf20c,
0x07c44b02,
0xfc00bbcf,
0x7ee0fcd0,
0xf800029f,
/* 0x05c5: memx_info */
0x01c67000,
/* 0x05cb: memx_info_data */
0x4c0c0bf4,
0x004b03cc,
0x090ef408,
/* 0x05d4: memx_info_train */
0x4b0bcc4c,
/* 0x05da: memx_info_send */
0x9f7e0100,
0x00f80002,
/* 0x05e0: memx_recv */
0xf401d6b0,
0xd6b0a30b,
0xdc0bf400,
/* 0x05ee: memx_init */
0x00f800f8,
/* 0x05f0: perf_recv */
/* 0x05f2: perf_init */
0x00f800f8,
/* 0x05f4: i2c_drive_scl */
0xf40036b0,
0xe0400d0b,
0x0001f607,
0x00f804bd,
/* 0x0604: i2c_drive_scl_lo */
0xf607e440,
0x04bd0001,
/* 0x060e: i2c_drive_sda */
0x36b000f8,
0x0d0bf400,
0xf607e040,
0x04bd0002,
/* 0x061e: i2c_drive_sda_lo */
0xe44000f8,
0x0002f607,
0x00f804bd,
/* 0x0628: i2c_sense_scl */
0x430132f4,
0x33cf07c4,
0x0431fd00,
0xf4060bf4,
/* 0x063a: i2c_sense_scl_done */
0x00f80131,
/* 0x063c: i2c_sense_sda */
0x430132f4,
0x33cf07c4,
0x0432fd00,
0xf4060bf4,
/* 0x064e: i2c_sense_sda_done */
0x00f80131,
/* 0x0650: i2c_raise_scl */
0x984440f9,
0x7e010308,
/* 0x065b: i2c_raise_scl_wait */
0x4e0005f4,
0x587e03e8,
0x287e0000,
0x01f40006,
0x0142b609,
/* 0x066f: i2c_raise_scl_done */
0xfcef1bf4,
/* 0x0673: i2c_start */
0x7e00f840,
0xf4000628,
0x3c7e0d11,
0x11f40006,
0x2e0ef406,
/* 0x0684: i2c_start_rep */
0xf47e0003,
0x01030005,
0x00060e7e,
0xb60076bb,
0x50f90465,
0xbb046594,
0x50bd0256,
0xfc0475fd,
0x06507e50,
0x0464b600,
/* 0x06af: i2c_start_send */
0x031d11f4,
0x060e7e00,
0x13884e00,
0x0000587e,
0x137e0103,
0x884e0006,
0x00587e13,
/* 0x06ff: i2c_bitw */
0x7e00f800,
0x4e000613,
0x587e03e8,
0x76bb0000,
0x0465b600,
0x659450f9,
0x0256bb04,
0x75fd50bd,
0x7e50fc04,
0xb6000655,
0x11f40464,
0x13884e17,
0x0000587e,
0xf97e0003,
0xf47e0003,
0x884e0005,
0x00587e13,
/* 0x073d: i2c_bitw_out */
/* 0x073f: i2c_bitr */
/* 0x06c9: i2c_start_out */
/* 0x06cb: i2c_stop */
0x0300f800,
0x06137e01,
0x03e84e00,
0x0000587e,
0xb60076bb,
0x50f90465,
0xbb046594,
0x50bd0256,
0xfc0475fd,
0x06557e50,
0x0464b600,
0x7e1a11f4,
0x03000641,
0x05f97e00,
0x05f47e00,
0x7e000300,
0x4e00060e,
0x587e03e8,
0x01030000,
0x0005f47e,
0x7e13884e,
0x03000058,
0x060e7e01,
0x13884e00,
0x0000587e,
0xf4013cf0,
/* 0x0782: i2c_bitr_done */
0x00f80131,
/* 0x0784: i2c_get_byte */
0x08040005,
/* 0x0788: i2c_get_byte_next */
0xbb0154b6,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
0x00073f7e,
0xf40464b6,
0x53fd2a11,
0x0142b605,
0x03d81bf4,
0x0076bb01,
0xf90465b6,
0x04659450,
0xbd0256bb,
0x0475fd50,
0xff7e50fc,
0x64b60006,
/* 0x07d1: i2c_get_byte_done */
/* 0x07d3: i2c_put_byte */
0x0400f804,
/* 0x07d5: i2c_put_byte_next */
0x0142b608,
0xbb3854ff,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
0x0006ff7e,
0xf40464b6,
0x46b03411,
0xd81bf400,
0xb60076bb,
0x50f90465,
0xbb046594,
0x50bd0256,
0xfc0475fd,
0x073f7e50,
0x0464b600,
0xbb0f11f4,
0x36b00076,
0x061bf401,
/* 0x082b: i2c_put_byte_done */
0xf80132f4,
/* 0x082d: i2c_addr */
/* 0x06fa: i2c_bitw */
0x0e7e00f8,
0xe84e0006,
0x00587e03,
0x0076bb00,
0xf90465b6,
0x04659450,
0xbd0256bb,
0x0475fd50,
0x787e50fc,
0x507e50fc,
0x64b60006,
0x2911f404,
0x012ec3e7,
0xfd0134b6,
0x76bb0553,
0x0465b600,
0x659450f9,
0x0256bb04,
0x75fd50bd,
0x7e50fc04,
0xb60007d3,
/* 0x0872: i2c_addr_done */
0x00f80464,
/* 0x0874: i2c_acquire_addr */
0xb6f8cec7,
0xe0b705e4,
0x00f8d014,
/* 0x0880: i2c_acquire */
0x0008747e,
0x0000047e,
0x7e03d9f0,
0xf800002d,
/* 0x0891: i2c_release */
0x08747e00,
0x00047e00,
0x03daf000,
0x00002d7e,
/* 0x08a2: i2c_recv */
0x32f400f8,
0xf8c1c701,
0xb00214b6,
0x1ff52816,
0x13b80134,
0x98000cf4,
0x13b80032,
0x98000ccc,
0x31f40031,
0xf9d0f902,
0xd6d0f9e0,
0x10000000,
0xbb016792,
0x1711f404,
0x7e13884e,
0x03000058,
0x05f47e00,
0x13884e00,
0x0000587e,
/* 0x0738: i2c_bitw_out */
/* 0x073a: i2c_bitr */
0x010300f8,
0x00060e7e,
0x7e03e84e,
0xbb000058,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
0x0008807e,
0xfc0464b6,
0x00d6b0d0,
0x00b01bf5,
0x76bb0005,
0x0465b600,
0x659450f9,
0x0256bb04,
0x75fd50bd,
0x7e50fc04,
0xb600082d,
0x11f50464,
0xc5c700cc,
0x0076bbe0,
0xf90465b6,
0x04659450,
0xbd0256bb,
0x0475fd50,
0xd37e50fc,
0x64b60007,
0xa911f504,
0xbb010500,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
0x00082d7e,
0xf50464b6,
0xbb008711,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
0x0007847e,
0x0006507e,
0xf40464b6,
0x5bcb6711,
0x0076bbe0,
0x3c7e1a11,
0x00030006,
0x0005f47e,
0x7e13884e,
0xf0000058,
0x31f4013c,
/* 0x077d: i2c_bitr_done */
/* 0x077f: i2c_get_byte */
0x0500f801,
/* 0x0783: i2c_get_byte_next */
0xb6080400,
0x76bb0154,
0x0465b600,
0x659450f9,
0x0256bb04,
0x75fd50bd,
0x7e50fc04,
0xb600073a,
0x11f40464,
0x0553fd2a,
0xf40142b6,
0x0103d81b,
0xb60076bb,
0x50f90465,
0xbb046594,
0x50bd0256,
0xfc0475fd,
0x06fa7e50,
0x0464b600,
/* 0x07cc: i2c_get_byte_done */
/* 0x07ce: i2c_put_byte */
0x080400f8,
/* 0x07d0: i2c_put_byte_next */
0xff0142b6,
0x76bb3854,
0x0465b600,
0x659450f9,
0x0256bb04,
0x75fd50bd,
0x7e50fc04,
0xb60006fa,
0x11f40464,
0x0046b034,
0xbbd81bf4,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
0x00073a7e,
0xf40464b6,
0x76bb0f11,
0x0136b000,
0xf4061bf4,
/* 0x0826: i2c_put_byte_done */
0x00f80132,
/* 0x0828: i2c_addr */
0xb60076bb,
0x50f90465,
0xbb046594,
0x50bd0256,
0xfc0475fd,
0x06737e50,
0x0464b600,
0xe72911f4,
0xb6012ec3,
0x53fd0134,
0x0076bb05,
0xf90465b6,
0x04659450,
0xbd0256bb,
0x0475fd50,
0xd07e50fc,
0x64b60006,
0xbd5bb204,
0x410ef474,
/* 0x09a4: i2c_recv_not_rd08 */
0xf401d6b0,
0x00053b1b,
0x00082d7e,
0xc73211f4,
0xd37ee0c5,
0x11f40007,
0x7e000528,
0xf400082d,
0xb5c71f11,
0x07d37ee0,
0x1511f400,
0x0006d07e,
0xc5c774bd,
0x091bf408,
0xf40232f4,
/* 0x09e2: i2c_recv_not_wr08 */
/* 0x09e2: i2c_recv_done */
0xcec7030e,
0x08917ef8,
0xfce0fc00,
0x0912f4d0,
0x9f7e7cb2,
/* 0x09f6: i2c_recv_exit */
0x00f80002,
/* 0x09f8: i2c_init */
/* 0x09fa: test_recv */
0x584100f8,
0x0011cf04,
0x400110b6,
0x01f60458,
0xde04bd00,
0x134fd900,
0x0001de7e,
/* 0x0a16: test_init */
0x004e00f8,
0x01de7e08,
/* 0x0a1f: idle_recv */
0xce7e50fc,
0x64b60007,
/* 0x086d: i2c_addr_done */
/* 0x086f: i2c_acquire_addr */
0xc700f804,
0xe4b6f8ce,
0x14e0b705,
/* 0x087b: i2c_acquire */
0x7e00f8d0,
0x7e00086f,
0xf0000004,
0x2d7e03d9,
0x00f80000,
/* 0x088c: i2c_release */
0x00086f7e,
0x0000047e,
0x7e03daf0,
0xf800002d,
/* 0x089d: i2c_recv */
0x0132f400,
0xb6f8c1c7,
0x16b00214,
0x341ff528,
0xf413b801,
0x3298000c,
0xcc13b800,
0x3198000c,
0x0231f400,
0xe0f9d0f9,
0x00d6d0f9,
0x92100000,
0x76bb0167,
0x0465b600,
0x659450f9,
0x0256bb04,
0x75fd50bd,
0x7e50fc04,
0xb600087b,
0xd0fc0464,
0xf500d6b0,
0x0500b01b,
0x0076bb00,
0xf90465b6,
0x04659450,
0xbd0256bb,
0x0475fd50,
0x287e50fc,
0x64b60008,
0xcc11f504,
0xe0c5c700,
0xb60076bb,
0x50f90465,
0xbb046594,
0x50bd0256,
0xfc0475fd,
0x07ce7e50,
0x0464b600,
0x00a911f5,
0x76bb0105,
0x0465b600,
0x659450f9,
0x0256bb04,
0x75fd50bd,
0x7e50fc04,
0xb6000828,
0x11f50464,
0x76bb0087,
0x0465b600,
0x659450f9,
0x0256bb04,
0x75fd50bd,
0x7e50fc04,
0xb600077f,
0x11f40464,
0xe05bcb67,
0xb60076bb,
0x50f90465,
0xbb046594,
0x50bd0256,
0xfc0475fd,
0x06cb7e50,
0x0464b600,
0x74bd5bb2,
/* 0x099f: i2c_recv_not_rd08 */
0xb0410ef4,
0x1bf401d6,
0x7e00053b,
0xf4000828,
0xc5c73211,
0x07ce7ee0,
0x2811f400,
0x287e0005,
0x11f40008,
0xe0b5c71f,
0x0007ce7e,
0x7e1511f4,
0xbd0006cb,
0x08c5c774,
0xf4091bf4,
0x0ef40232,
/* 0x09dd: i2c_recv_not_wr08 */
/* 0x09dd: i2c_recv_done */
0xf8cec703,
0x00088c7e,
0xd0fce0fc,
0xb20912f4,
0x029f7e7c,
/* 0x09f1: i2c_recv_exit */
/* 0x09f3: i2c_init */
0xf800f800,
/* 0x0a21: idle */
0x0031f400,
0xcf045441,
0x10b60011,
0x04544001,
0xbd0001f6,
/* 0x0a35: idle_loop */
0xf4580104,
/* 0x0a3a: idle_proc */
/* 0x0a3a: idle_proc_exec */
0x10f90232,
0xa87e1eb2,
0x10fc0002,
0xf40911f4,
0x0ef40231,
/* 0x0a4d: idle_proc_next */
0x5810b6f0,
0x1bf41fa6,
0xe002f4e8,
0xf40028f4,
0x0000c60e,
/* 0x09f5: test_recv */
0x04584100,
0xb60011cf,
0x58400110,
0x0001f604,
0x00de04bd,
0x7e134fd9,
0xf80001de,
/* 0x0a11: test_init */
0x08004e00,
0x0001de7e,
/* 0x0a1a: idle_recv */
0x00f800f8,
/* 0x0a1c: idle */
0x410031f4,
0x11cf0454,
0x0110b600,
0xf6045440,
0x04bd0001,
/* 0x0a30: idle_loop */
0x32f45801,
/* 0x0a35: idle_proc */
/* 0x0a35: idle_proc_exec */
0xb210f902,
0x02a87e1e,
0xf410fc00,
0x31f40911,
0xf00ef402,
/* 0x0a48: idle_proc_next */
0xa65810b6,
0xe81bf41f,
0xf4e002f4,
0x0ef40028,
0x000000c6,
0x00000000,
0x00000000,
0x00000000,
0x00000000,

File diff suppressed because it is too large Load Diff

View File

@ -82,15 +82,15 @@ memx_train_tail:
// $r0 - zero
memx_func_enter:
#if NVKM_PPWR_CHIPSET == GT215
movw $r8 0x1610
mov $r8 0x1610
nv_rd32($r7, $r8)
imm32($r6, 0xfffffffc)
and $r7 $r6
movw $r6 0x2
mov $r6 0x2
or $r7 $r6
nv_wr32($r8, $r7)
#else
movw $r6 0x001620
mov $r6 0x001620
imm32($r7, ~0x00000aa2);
nv_rd32($r8, $r6)
and $r8 $r7
@ -101,7 +101,7 @@ memx_func_enter:
and $r8 $r7
nv_wr32($r6, $r8)
movw $r6 0x0026f0
mov $r6 0x0026f0
nv_rd32($r8, $r6)
and $r8 $r7
nv_wr32($r6, $r8)
@ -136,19 +136,19 @@ memx_func_leave:
bra nz #memx_func_leave_wait
#if NVKM_PPWR_CHIPSET == GT215
movw $r8 0x1610
mov $r8 0x1610
nv_rd32($r7, $r8)
imm32($r6, 0xffffffcc)
and $r7 $r6
nv_wr32($r8, $r7)
#else
movw $r6 0x0026f0
mov $r6 0x0026f0
imm32($r7, 0x00000001)
nv_rd32($r8, $r6)
or $r8 $r7
nv_wr32($r6, $r8)
movw $r6 0x001620
mov $r6 0x001620
nv_rd32($r8, $r6)
or $r8 $r7
nv_wr32($r6, $r8)
@ -177,11 +177,11 @@ memx_func_wait_vblank:
bra #memx_func_wait_vblank_fini
memx_func_wait_vblank_head1:
movw $r7 0x20
mov $r7 0x20
bra #memx_func_wait_vblank_0
memx_func_wait_vblank_head0:
movw $r7 0x8
mov $r7 0x8
memx_func_wait_vblank_0:
nv_iord($r6, NV_PPWR_INPUT)
@ -273,13 +273,13 @@ memx_func_train:
// $r5 - outer loop counter
// $r6 - inner loop counter
// $r7 - entry counter (#memx_train_head + $r7)
movw $r5 0x3
movw $r7 0x0
mov $r5 0x3
mov $r7 0x0
// Read random memory to wake up... things
imm32($r9, 0x700000)
nv_rd32($r8,$r9)
movw $r14 0x2710
mov $r14 0x2710
call(nsec)
memx_func_train_loop_outer:
@ -289,9 +289,9 @@ memx_func_train:
nv_wr32($r9, $r8)
push $r5
movw $r6 0x0
mov $r6 0x0
memx_func_train_loop_inner:
movw $r8 0x1111
mov $r8 0x1111
mulu $r9 $r6 $r8
shl b32 $r8 $r9 0x10
or $r8 $r9
@ -315,7 +315,7 @@ memx_func_train:
// $r5 - inner inner loop counter
// $r9 - result
movw $r5 0
mov $r5 0
imm32($r9, 0x8300ffff)
memx_func_train_loop_4x:
imm32($r10, 0x100080)

View File

@ -173,6 +173,7 @@ static void vc4_bo_destroy(struct vc4_bo *bo)
vc4_bo_set_label(obj, -1);
if (bo->validated_shader) {
kfree(bo->validated_shader->uniform_addr_offsets);
kfree(bo->validated_shader->texture_samples);
kfree(bo->validated_shader);
bo->validated_shader = NULL;
@ -432,6 +433,7 @@ void vc4_free_object(struct drm_gem_object *gem_bo)
}
if (bo->validated_shader) {
kfree(bo->validated_shader->uniform_addr_offsets);
kfree(bo->validated_shader->texture_samples);
kfree(bo->validated_shader);
bo->validated_shader = NULL;

View File

@ -942,6 +942,7 @@ vc4_validate_shader(struct drm_gem_cma_object *shader_obj)
fail:
kfree(validation_state.branch_targets);
if (validated_shader) {
kfree(validated_shader->uniform_addr_offsets);
kfree(validated_shader->texture_samples);
kfree(validated_shader);
}

View File

@ -34,7 +34,8 @@ module_param(emulate_scroll_wheel, bool, 0644);
MODULE_PARM_DESC(emulate_scroll_wheel, "Emulate a scroll wheel");
static unsigned int scroll_speed = 32;
static int param_set_scroll_speed(const char *val, struct kernel_param *kp) {
static int param_set_scroll_speed(const char *val,
const struct kernel_param *kp) {
unsigned long speed;
if (!val || kstrtoul(val, 0, &speed) || speed > 63)
return -EINVAL;

View File

@ -37,6 +37,8 @@ static uint kovaplus_convert_event_cpi(uint value)
static void kovaplus_profile_activated(struct kovaplus_device *kovaplus,
uint new_profile_index)
{
if (new_profile_index >= ARRAY_SIZE(kovaplus->profile_settings))
return;
kovaplus->actual_profile = new_profile_index;
kovaplus->actual_cpi = kovaplus->profile_settings[new_profile_index].cpi_startup_level;
kovaplus->actual_x_sensitivity = kovaplus->profile_settings[new_profile_index].sensitivity_x;

View File

@ -20,12 +20,13 @@
#include <trace/events/exception.h>
static int event_abort_enable;
static int event_abort_set(const char *val, struct kernel_param *kp);
static int event_abort_set(const char *val, const struct kernel_param *kp);
module_param_call(event_abort_enable, event_abort_set, param_get_int,
&event_abort_enable, 0644);
static int event_abort_early_panic = 1;
static int event_abort_on_panic_set(const char *val, struct kernel_param *kp);
static int event_abort_on_panic_set(const char *val,
const struct kernel_param *kp);
module_param_call(event_abort_early_panic, event_abort_on_panic_set,
param_get_int, &event_abort_early_panic, 0644);
@ -96,7 +97,7 @@ static void event_abort_unregister(void)
unregister_trace_unhandled_abort(event_abort_unhandled_abort, NULL);
}
static int event_abort_set(const char *val, struct kernel_param *kp)
static int event_abort_set(const char *val, const struct kernel_param *kp)
{
int ret;
@ -114,7 +115,8 @@ static int event_abort_set(const char *val, struct kernel_param *kp)
return ret;
}
static int event_abort_on_panic_set(const char *val, struct kernel_param *kp)
static int event_abort_on_panic_set(const char *val,
const struct kernel_param *kp)
{
int ret;

View File

@ -244,7 +244,7 @@ struct chs_geom {
static unsigned int ide_disks;
static struct chs_geom ide_disks_chs[MAX_HWIFS * MAX_DRIVES];
static int ide_set_disk_chs(const char *str, struct kernel_param *kp)
static int ide_set_disk_chs(const char *str, const struct kernel_param *kp)
{
unsigned int a, b, c = 0, h = 0, s = 0, i, j = 1;
@ -328,7 +328,7 @@ static void ide_dev_apply_params(ide_drive_t *drive, u8 unit)
static unsigned int ide_ignore_cable;
static int ide_set_ignore_cable(const char *s, struct kernel_param *kp)
static int ide_set_ignore_cable(const char *s, const struct kernel_param *kp)
{
int i, j = 1;

View File

@ -624,11 +624,13 @@ static inline int cma_validate_port(struct ib_device *device, u8 port,
if ((dev_type != ARPHRD_INFINIBAND) && rdma_protocol_ib(device, port))
return ret;
if (dev_type == ARPHRD_ETHER && rdma_protocol_roce(device, port))
if (dev_type == ARPHRD_ETHER && rdma_protocol_roce(device, port)) {
ndev = dev_get_by_index(&init_net, bound_if_index);
else
if (!ndev)
return ret;
} else {
gid_type = IB_GID_TYPE_IB;
}
ret = ib_find_cached_gid_by_port(device, gid, gid_type, port,
ndev, NULL);

View File

@ -17,6 +17,7 @@
/* # of WCs to poll for with a single call to ib_poll_cq */
#define IB_POLL_BATCH 16
#define IB_POLL_BATCH_DIRECT 8
/* # of WCs to iterate over before yielding */
#define IB_POLL_BUDGET_IRQ 256
@ -25,7 +26,8 @@
#define IB_POLL_FLAGS \
(IB_CQ_NEXT_COMP | IB_CQ_REPORT_MISSED_EVENTS)
static int __ib_process_cq(struct ib_cq *cq, int budget)
static int __ib_process_cq(struct ib_cq *cq, int budget, struct ib_wc *wcs,
int batch)
{
int i, n, completed = 0;
@ -34,10 +36,10 @@ static int __ib_process_cq(struct ib_cq *cq, int budget)
* want to bound this call, thus we need unsigned
* minimum here.
*/
while ((n = ib_poll_cq(cq, min_t(u32, IB_POLL_BATCH,
budget - completed), cq->wc)) > 0) {
while ((n = ib_poll_cq(cq, min_t(u32, batch,
budget - completed), wcs)) > 0) {
for (i = 0; i < n; i++) {
struct ib_wc *wc = &cq->wc[i];
struct ib_wc *wc = &wcs[i];
if (wc->wr_cqe)
wc->wr_cqe->done(cq, wc);
@ -47,8 +49,7 @@ static int __ib_process_cq(struct ib_cq *cq, int budget)
completed += n;
if (n != IB_POLL_BATCH ||
(budget != -1 && completed >= budget))
if (n != batch || (budget != -1 && completed >= budget))
break;
}
@ -60,18 +61,20 @@ static int __ib_process_cq(struct ib_cq *cq, int budget)
* @cq: CQ to process
* @budget: number of CQEs to poll for
*
* This function is used to process all outstanding CQ entries on a
* %IB_POLL_DIRECT CQ. It does not offload CQ processing to a different
* context and does not ask for completion interrupts from the HCA.
* This function is used to process all outstanding CQ entries.
* It does not offload CQ processing to a different context and does
* not ask for completion interrupts from the HCA.
* Using direct processing on CQ with non IB_POLL_DIRECT type may trigger
* concurrent processing.
*
* Note: do not pass -1 as %budget unless it is guaranteed that the number
* of completions that will be processed is small.
*/
int ib_process_cq_direct(struct ib_cq *cq, int budget)
{
WARN_ON_ONCE(cq->poll_ctx != IB_POLL_DIRECT);
struct ib_wc wcs[IB_POLL_BATCH_DIRECT];
return __ib_process_cq(cq, budget);
return __ib_process_cq(cq, budget, wcs, IB_POLL_BATCH_DIRECT);
}
EXPORT_SYMBOL(ib_process_cq_direct);
@ -85,7 +88,7 @@ static int ib_poll_handler(struct irq_poll *iop, int budget)
struct ib_cq *cq = container_of(iop, struct ib_cq, iop);
int completed;
completed = __ib_process_cq(cq, budget);
completed = __ib_process_cq(cq, budget, cq->wc, IB_POLL_BATCH);
if (completed < budget) {
irq_poll_complete(&cq->iop);
if (ib_req_notify_cq(cq, IB_POLL_FLAGS) > 0)
@ -105,7 +108,8 @@ static void ib_cq_poll_work(struct work_struct *work)
struct ib_cq *cq = container_of(work, struct ib_cq, work);
int completed;
completed = __ib_process_cq(cq, IB_POLL_BUDGET_WORKQUEUE);
completed = __ib_process_cq(cq, IB_POLL_BUDGET_WORKQUEUE, cq->wc,
IB_POLL_BATCH);
if (completed >= IB_POLL_BUDGET_WORKQUEUE ||
ib_req_notify_cq(cq, IB_POLL_FLAGS) > 0)
queue_work(ib_comp_wq, &cq->work);

View File

@ -245,16 +245,13 @@ static long ib_uverbs_cmd_verbs(struct ib_device *ib_dev,
uintptr_t data[UVERBS_OPTIMIZE_USING_STACK_SZ / sizeof(uintptr_t)];
#endif
if (hdr->reserved)
return -EINVAL;
object_spec = uverbs_get_object(ib_dev, hdr->object_id);
if (!object_spec)
return -EOPNOTSUPP;
return -EPROTONOSUPPORT;
method_spec = uverbs_get_method(object_spec, hdr->method_id);
if (!method_spec)
return -EOPNOTSUPP;
return -EPROTONOSUPPORT;
if ((method_spec->flags & UVERBS_ACTION_FLAG_CREATE_ROOT) ^ !file->ucontext)
return -EINVAL;
@ -310,6 +307,16 @@ static long ib_uverbs_cmd_verbs(struct ib_device *ib_dev,
err = uverbs_handle_method(buf, ctx->uattrs, hdr->num_attrs, ib_dev,
file, method_spec, ctx->uverbs_attr_bundle);
/*
* EPROTONOSUPPORT is ONLY to be returned if the ioctl framework can
* not invoke the method because the request is not supported. No
* other cases should return this code.
*/
if (unlikely(err == -EPROTONOSUPPORT)) {
WARN_ON_ONCE(err == -EPROTONOSUPPORT);
err = -EINVAL;
}
out:
#ifdef UVERBS_OPTIMIZE_USING_STACK_SZ
if (ctx_size > UVERBS_OPTIMIZE_USING_STACK_SZ)
@ -348,7 +355,7 @@ long ib_uverbs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
}
if (hdr.reserved) {
err = -EOPNOTSUPP;
err = -EPROTONOSUPPORT;
goto out;
}

View File

@ -8294,8 +8294,8 @@ static irqreturn_t sdma_interrupt(int irq, void *data)
/* handle the interrupt(s) */
sdma_engine_interrupt(sde, status);
} else {
dd_dev_err_ratelimited(dd, "SDMA engine %u interrupt, but no status bits set\n",
sde->this_idx);
dd_dev_info_ratelimited(dd, "SDMA engine %u interrupt, but no status bits set\n",
sde->this_idx);
}
return IRQ_HANDLED;
}
@ -12967,7 +12967,14 @@ static void disable_intx(struct pci_dev *pdev)
pci_intx(pdev, 0);
}
static void clean_up_interrupts(struct hfi1_devdata *dd)
/**
* hfi1_clean_up_interrupts() - Free all IRQ resources
* @dd: valid device data data structure
*
* Free the MSI or INTx IRQs and assoicated PCI resources,
* if they have been allocated.
*/
void hfi1_clean_up_interrupts(struct hfi1_devdata *dd)
{
int i;
@ -13344,7 +13351,7 @@ static int set_up_interrupts(struct hfi1_devdata *dd)
return 0;
fail:
clean_up_interrupts(dd);
hfi1_clean_up_interrupts(dd);
return ret;
}
@ -14770,7 +14777,6 @@ void hfi1_start_cleanup(struct hfi1_devdata *dd)
aspm_exit(dd);
free_cntrs(dd);
free_rcverr(dd);
clean_up_interrupts(dd);
finish_chip_resources(dd);
}
@ -15229,7 +15235,7 @@ bail_free_rcverr:
bail_free_cntrs:
free_cntrs(dd);
bail_clear_intr:
clean_up_interrupts(dd);
hfi1_clean_up_interrupts(dd);
bail_cleanup:
hfi1_pcie_ddcleanup(dd);
bail_free:

View File

@ -191,9 +191,6 @@ static int hfi1_file_open(struct inode *inode, struct file *fp)
if (!atomic_inc_not_zero(&dd->user_refcount))
return -ENXIO;
/* Just take a ref now. Not all opens result in a context assign */
kobject_get(&dd->kobj);
/* The real work is performed later in assign_ctxt() */
fd = kzalloc(sizeof(*fd), GFP_KERNEL);
@ -203,6 +200,7 @@ static int hfi1_file_open(struct inode *inode, struct file *fp)
fd->mm = current->mm;
mmgrab(fd->mm);
fd->dd = dd;
kobject_get(&fd->dd->kobj);
fp->private_data = fd;
} else {
fp->private_data = NULL;

View File

@ -1954,6 +1954,7 @@ void hfi1_verbs_unregister_sysfs(struct hfi1_devdata *dd);
int qsfp_dump(struct hfi1_pportdata *ppd, char *buf, int len);
int hfi1_pcie_init(struct pci_dev *pdev, const struct pci_device_id *ent);
void hfi1_clean_up_interrupts(struct hfi1_devdata *dd);
void hfi1_pcie_cleanup(struct pci_dev *pdev);
int hfi1_pcie_ddinit(struct hfi1_devdata *dd, struct pci_dev *pdev);
void hfi1_pcie_ddcleanup(struct hfi1_devdata *);

View File

@ -1039,8 +1039,9 @@ static void shutdown_device(struct hfi1_devdata *dd)
}
dd->flags &= ~HFI1_INITTED;
/* mask interrupts, but not errors */
/* mask and clean up interrupts, but not errors */
set_intr_state(dd, 0);
hfi1_clean_up_interrupts(dd);
for (pidx = 0; pidx < dd->num_pports; ++pidx) {
ppd = dd->pport + pidx;
@ -1696,6 +1697,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
dd_dev_err(dd, "Failed to create /dev devices: %d\n", -j);
if (initfail || ret) {
hfi1_clean_up_interrupts(dd);
stop_timers(dd);
flush_workqueue(ib_wq);
for (pidx = 0; pidx < dd->num_pports; ++pidx) {

View File

@ -48,7 +48,6 @@ static void i40iw_ieq_tx_compl(struct i40iw_sc_vsi *vsi, void *sqwrid);
static void i40iw_ilq_putback_rcvbuf(struct i40iw_sc_qp *qp, u32 wqe_idx);
static enum i40iw_status_code i40iw_puda_replenish_rq(struct i40iw_puda_rsrc
*rsrc, bool initial);
static void i40iw_ieq_cleanup_qp(struct i40iw_puda_rsrc *ieq, struct i40iw_sc_qp *qp);
/**
* i40iw_puda_get_listbuf - get buffer from puda list
* @list: list to use for buffers (ILQ or IEQ)
@ -1480,7 +1479,7 @@ static void i40iw_ieq_tx_compl(struct i40iw_sc_vsi *vsi, void *sqwrid)
* @ieq: ieq resource
* @qp: all pending fpdu buffers
*/
static void i40iw_ieq_cleanup_qp(struct i40iw_puda_rsrc *ieq, struct i40iw_sc_qp *qp)
void i40iw_ieq_cleanup_qp(struct i40iw_puda_rsrc *ieq, struct i40iw_sc_qp *qp)
{
struct i40iw_puda_buf *buf;
struct i40iw_pfpdu *pfpdu = &qp->pfpdu;

View File

@ -186,4 +186,5 @@ enum i40iw_status_code i40iw_cqp_qp_create_cmd(struct i40iw_sc_dev *dev, struct
enum i40iw_status_code i40iw_cqp_cq_create_cmd(struct i40iw_sc_dev *dev, struct i40iw_sc_cq *cq);
void i40iw_cqp_qp_destroy_cmd(struct i40iw_sc_dev *dev, struct i40iw_sc_qp *qp);
void i40iw_cqp_cq_destroy_cmd(struct i40iw_sc_dev *dev, struct i40iw_sc_cq *cq);
void i40iw_ieq_cleanup_qp(struct i40iw_puda_rsrc *ieq, struct i40iw_sc_qp *qp);
#endif

View File

@ -428,6 +428,7 @@ void i40iw_free_qp_resources(struct i40iw_device *iwdev,
{
struct i40iw_pbl *iwpbl = &iwqp->iwpbl;
i40iw_ieq_cleanup_qp(iwdev->vsi.ieq, &iwqp->sc_qp);
i40iw_dealloc_push_page(iwdev, &iwqp->sc_qp);
if (qp_num)
i40iw_free_resource(iwdev, iwdev->allocated_qps, qp_num);
@ -1655,6 +1656,7 @@ static struct ib_mr *i40iw_alloc_mr(struct ib_pd *pd,
err_code = -EOVERFLOW;
goto err;
}
stag &= ~I40IW_CQPSQ_STAG_KEY_MASK;
iwmr->stag = stag;
iwmr->ibmr.rkey = stag;
iwmr->ibmr.lkey = stag;

View File

@ -2923,7 +2923,8 @@ static int __mlx5_ib_modify_qp(struct ib_qp *ibqp,
* If we moved a kernel QP to RESET, clean up all old CQ
* entries and reinitialize the QP.
*/
if (new_state == IB_QPS_RESET && !ibqp->uobject) {
if (new_state == IB_QPS_RESET &&
!ibqp->uobject && ibqp->qp_type != IB_QPT_XRC_TGT) {
mlx5_ib_cq_clean(recv_cq, base->mqp.qpn,
ibqp->srq ? to_msrq(ibqp->srq) : NULL);
if (send_cq != recv_cq)
@ -4636,13 +4637,10 @@ int mlx5_ib_dealloc_xrcd(struct ib_xrcd *xrcd)
int err;
err = mlx5_core_xrcd_dealloc(dev->mdev, xrcdn);
if (err) {
if (err)
mlx5_ib_warn(dev, "failed to dealloc xrcdn 0x%x\n", xrcdn);
return err;
}
kfree(xrcd);
return 0;
}

View File

@ -150,7 +150,7 @@ static struct kparam_string kp_txselect = {
.string = txselect_list,
.maxlen = MAX_ATTEN_LEN
};
static int setup_txselect(const char *, struct kernel_param *);
static int setup_txselect(const char *, const struct kernel_param *);
module_param_call(txselect, setup_txselect, param_get_string,
&kp_txselect, S_IWUSR | S_IRUGO);
MODULE_PARM_DESC(txselect,
@ -6169,7 +6169,7 @@ static void set_no_qsfp_atten(struct qib_devdata *dd, int change)
}
/* handle the txselect parameter changing */
static int setup_txselect(const char *str, struct kernel_param *kp)
static int setup_txselect(const char *str, const struct kernel_param *kp)
{
struct qib_devdata *dd;
unsigned long val;

View File

@ -2273,6 +2273,9 @@ static struct net_device *ipoib_add_port(const char *format,
priv->ca, ipoib_event);
ib_register_event_handler(&priv->event_handler);
/* call event handler to ensure pkey in sync */
queue_work(ipoib_workqueue, &priv->flush_heavy);
result = register_netdev(priv->dev);
if (result) {
printk(KERN_WARNING "%s: couldn't register ipoib port %d; error %d\n",

View File

@ -80,7 +80,7 @@ module_param(srpt_srq_size, int, 0444);
MODULE_PARM_DESC(srpt_srq_size,
"Shared receive queue (SRQ) size.");
static int srpt_get_u64_x(char *buffer, struct kernel_param *kp)
static int srpt_get_u64_x(char *buffer, const struct kernel_param *kp)
{
return sprintf(buffer, "0x%016llx", *(u64 *)kp->arg);
}

View File

@ -975,6 +975,21 @@ static void psmouse_apply_defaults(struct psmouse *psmouse)
psmouse->pt_deactivate = NULL;
}
static bool psmouse_do_detect(int (*detect)(struct psmouse *, bool),
struct psmouse *psmouse, bool allow_passthrough,
bool set_properties)
{
if (psmouse->ps2dev.serio->id.type == SERIO_PS_PSTHRU &&
!allow_passthrough) {
return false;
}
if (set_properties)
psmouse_apply_defaults(psmouse);
return detect(psmouse, set_properties) == 0;
}
static bool psmouse_try_protocol(struct psmouse *psmouse,
enum psmouse_type type,
unsigned int *max_proto,
@ -986,15 +1001,8 @@ static bool psmouse_try_protocol(struct psmouse *psmouse,
if (!proto)
return false;
if (psmouse->ps2dev.serio->id.type == SERIO_PS_PSTHRU &&
!proto->try_passthru) {
return false;
}
if (set_properties)
psmouse_apply_defaults(psmouse);
if (proto->detect(psmouse, set_properties) != 0)
if (!psmouse_do_detect(proto->detect, psmouse, proto->try_passthru,
set_properties))
return false;
if (set_properties && proto->init && init_allowed) {
@ -1027,8 +1035,8 @@ static int psmouse_extensions(struct psmouse *psmouse,
* Always check for focaltech, this is safe as it uses pnp-id
* matching.
*/
if (psmouse_try_protocol(psmouse, PSMOUSE_FOCALTECH,
&max_proto, set_properties, false)) {
if (psmouse_do_detect(focaltech_detect,
psmouse, false, set_properties)) {
if (max_proto > PSMOUSE_IMEX &&
IS_ENABLED(CONFIG_MOUSE_PS2_FOCALTECH) &&
(!set_properties || focaltech_init(psmouse) == 0)) {
@ -1074,8 +1082,8 @@ static int psmouse_extensions(struct psmouse *psmouse,
* probing for IntelliMouse.
*/
if (max_proto > PSMOUSE_PS2 &&
psmouse_try_protocol(psmouse, PSMOUSE_SYNAPTICS, &max_proto,
set_properties, false)) {
psmouse_do_detect(synaptics_detect,
psmouse, false, set_properties)) {
synaptics_hardware = true;
if (max_proto > PSMOUSE_IMEX) {

View File

@ -1280,6 +1280,16 @@ static void set_input_params(struct psmouse *psmouse,
INPUT_MT_POINTER |
(cr48_profile_sensor ?
INPUT_MT_TRACK : INPUT_MT_SEMI_MT));
/*
* For semi-mt devices we send ABS_X/Y ourselves instead of
* input_mt_report_pointer_emulation. But
* input_mt_init_slots() resets the fuzz to 0, leading to a
* filtered ABS_MT_POSITION_X but an unfiltered ABS_X
* position. Let's re-initialize ABS_X/Y here.
*/
if (!cr48_profile_sensor)
set_abs_position_params(dev, &priv->info, ABS_X, ABS_Y);
}
if (SYN_CAP_PALMDETECT(info->capabilities))

View File

@ -687,6 +687,14 @@ static int stmfts_probe(struct i2c_client *client,
input_set_drvdata(sdata->input, sdata);
/*
* stmfts_power_on expects interrupt to be disabled, but
* at this point the device is still off and I do not trust
* the status of the irq line that can generate some spurious
* interrupts. To be on the safe side it's better to not enable
* the interrupts during their request.
*/
irq_set_status_flags(client->irq, IRQ_NOAUTOEN);
err = devm_request_threaded_irq(&client->dev, client->irq,
NULL, stmfts_irq_handler,
IRQF_ONESHOT,
@ -694,9 +702,6 @@ static int stmfts_probe(struct i2c_client *client,
if (err)
return err;
/* stmfts_power_on expects interrupt to be disabled */
disable_irq(client->irq);
dev_dbg(&client->dev, "initializing ST-Microelectronics FTS...\n");
err = stmfts_power_on(sdata);

View File

@ -1344,8 +1344,15 @@ static const struct iommu_ops exynos_iommu_ops = {
static int __init exynos_iommu_init(void)
{
struct device_node *np;
int ret;
np = of_find_matching_node(NULL, sysmmu_of_match);
if (!np)
return 0;
of_node_put(np);
lv2table_kmem_cache = kmem_cache_create("exynos-iommu-lv2table",
LV2TABLE_SIZE, LV2TABLE_SIZE, 0, NULL);
if (!lv2table_kmem_cache) {

View File

@ -1603,8 +1603,7 @@ static void iommu_flush_iotlb_psi(struct intel_iommu *iommu,
* flush. However, device IOTLB doesn't need to be flushed in this case.
*/
if (!cap_caching_mode(iommu->cap) || !map)
iommu_flush_dev_iotlb(get_iommu_domain(iommu, did),
addr, mask);
iommu_flush_dev_iotlb(domain, addr, mask);
}
static void iommu_flush_iova(struct iova_domain *iovad)

View File

@ -132,6 +132,8 @@ static int __init its_pci_of_msi_init(void)
for (np = of_find_matching_node(NULL, its_device_id); np;
np = of_find_matching_node(np, its_device_id)) {
if (!of_device_is_available(np))
continue;
if (!of_property_read_bool(np, "msi-controller"))
continue;

View File

@ -154,6 +154,8 @@ static void __init its_pmsi_of_init(void)
for (np = of_find_matching_node(NULL, its_device_id); np;
np = of_find_matching_node(np, its_device_id)) {
if (!of_device_is_available(np))
continue;
if (!of_property_read_bool(np, "msi-controller"))
continue;

View File

@ -3083,6 +3083,8 @@ static int __init its_of_probe(struct device_node *node)
for (np = of_find_matching_node(node, its_device_id); np;
np = of_find_matching_node(np, its_device_id)) {
if (!of_device_is_available(np))
continue;
if (!of_property_read_bool(np, "msi-controller")) {
pr_warn("%pOF: no msi-controller property, ITS ignored\n",
np);

View File

@ -650,7 +650,7 @@ static void gic_send_sgi(u64 cluster_id, u16 tlist, unsigned int irq)
MPIDR_TO_SGI_AFFINITY(cluster_id, 1) |
tlist << ICC_SGI1R_TARGET_LIST_SHIFT);
pr_debug("CPU%d: ICC_SGI1R_EL1 %llx\n", smp_processor_id(), val);
pr_devel("CPU%d: ICC_SGI1R_EL1 %llx\n", smp_processor_id(), val);
gic_write_sgi1r(val);
}

Some files were not shown because too many files have changed in this diff Show More