Changes in 4.9.194 bridge/mdb: remove wrong use of NLM_F_MULTI cdc_ether: fix rndis support for Mediatek based smartphones ipv6: Fix the link time qualifier of 'ping_v6_proc_exit_net()' isdn/capi: check message length in capi_write() net: Fix null de-reference of device refcount net: gso: Fix skb_segment splat when splitting gso_size mangled skb having linear-headed frag_list sch_hhf: ensure quantum and hhf_non_hh_weight are non-zero sctp: Fix the link time qualifier of 'sctp_ctrlsock_exit()' sctp: use transport pf_retrans in sctp_do_8_2_transport_strike tcp: fix tcp_ecn_withdraw_cwr() to clear TCP_ECN_QUEUE_CWR tipc: add NULL pointer check before calling kfree_rcu tun: fix use-after-free when register netdev failed Revert "MIPS: SiByte: Enable swiotlb for SWARM, LittleSur and BigSur" gpio: fix line flag validation in linehandle_create gpio: fix line flag validation in lineevent_create Btrfs: fix assertion failure during fsync and use of stale transaction genirq: Prevent NULL pointer dereference in resend_irqs() KVM: s390: Do not leak kernel stack data in the KVM_S390_INTERRUPT ioctl KVM: x86: work around leak of uninitialized stack contents KVM: nVMX: handle page fault in vmread MIPS: VDSO: Prevent use of smp_processor_id() MIPS: VDSO: Use same -m%-float cflag as the kernel proper clk: rockchip: Don't yell about bad mmc phases when getting mtd: rawnand: mtk: Fix wrongly assigned OOB buffer pointer issue driver core: Fix use-after-free and double free on glue directory crypto: talitos - check AES key size crypto: talitos - fix CTR alg blocksize crypto: talitos - check data blocksize in ablkcipher. crypto: talitos - fix ECB algs ivsize crypto: talitos - Do not modify req->cryptlen on decryption. crypto: talitos - HMAC SNOOP NO AFEU mode requires SW icv checking. drm/mediatek: mtk_drm_drv.c: Add of_node_put() before goto nvmem: Use the same permissions for eeprom as for nvmem x86/build: Add -Wnoaddress-of-packed-member to REALMODE_CFLAGS, to silence GCC9 build warning USB: usbcore: Fix slab-out-of-bounds bug during device reset media: tm6000: double free if usb disconnect while streaming powerpc/mm/radix: Use the right page size for vmemmap mapping x86/boot: Add missing bootparam that breaks boot on some platforms xen-netfront: do not assume sk_buff_head list is empty in error handling KVM: coalesced_mmio: add bounds checking serial: sprd: correct the wrong sequence of arguments tty/serial: atmel: reschedule TX after RX was started mwifiex: Fix three heap overflow at parsing element in cfg80211_ap_settings ARM: OMAP2+: Fix missing SYSC_HAS_RESET_STATUS for dra7 epwmss s390/bpf: fix lcgr instruction encoding ARM: OMAP2+: Fix omap4 errata warning on other SoCs s390/bpf: use 32-bit index for tail calls NFSv4: Fix return values for nfs4_file_open() NFS: Fix initialisation of I/O result struct in nfs_pgio_rpcsetup Kconfig: Fix the reference to the IDT77105 Phy driver in the description of ATM_NICSTAR_USE_IDT77105 qed: Add cleanup in qed_slowpath_start() ARM: 8874/1: mm: only adjust sections of valid mm structures batman-adv: Only read OGM2 tvlv_len after buffer len check r8152: Set memory to all 0xFFs on failed reg reads x86/apic: Fix arch_dynirq_lower_bound() bug for DT enabled machines netfilter: nf_conntrack_ftp: Fix debug output NFSv2: Fix eof handling NFSv2: Fix write regression cifs: set domainName when a domain-key is used in multiuser cifs: Use kzfree() to zero out the password ARM: 8901/1: add a criteria for pfn_valid of arm sky2: Disable MSI on yet another ASUS boards (P6Xxxx) perf/x86/intel: Restrict period on Nehalem perf/x86/amd/ibs: Fix sample bias for dispatched micro-ops tools/power turbostat: fix buffer overrun net: seeq: Fix the function used to release some memory in an error handling path dmaengine: ti: dma-crossbar: Fix a memory leak bug dmaengine: ti: omap-dma: Add cleanup in omap_dma_probe() x86/uaccess: Don't leak the AC flags into __get_user() argument evaluation keys: Fix missing null pointer check in request_key_auth_describe() iommu/amd: Fix race in increase_address_space() floppy: fix usercopy direction media: technisat-usb2: break out of loop at end of buffer ARC: export "abort" for modules net_sched: let qdisc_put() accept NULL pointer Linux 4.9.194 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
123 lines
3.3 KiB
C
123 lines
3.3 KiB
C
/*
|
|
* This file is subject to the terms and conditions of the GNU General
|
|
* Public License. See the file "COPYING" in the main directory of this
|
|
* archive for more details.
|
|
*
|
|
* Copyright (C) 2000 - 2001 by Kanoj Sarcar (kanoj@sgi.com)
|
|
* Copyright (C) 2000 - 2001 by Silicon Graphics, Inc.
|
|
* Copyright (C) 2000, 2001, 2002 Ralf Baechle
|
|
* Copyright (C) 2000, 2001 Broadcom Corporation
|
|
*/
|
|
#ifndef __ASM_SMP_H
|
|
#define __ASM_SMP_H
|
|
|
|
#include <linux/bitops.h>
|
|
#include <linux/linkage.h>
|
|
#include <linux/smp.h>
|
|
#include <linux/threads.h>
|
|
#include <linux/cpumask.h>
|
|
|
|
#include <linux/atomic.h>
|
|
#include <asm/smp-ops.h>
|
|
|
|
extern int smp_num_siblings;
|
|
extern cpumask_t cpu_sibling_map[];
|
|
extern cpumask_t cpu_core_map[];
|
|
extern cpumask_t cpu_foreign_map[];
|
|
|
|
static inline int raw_smp_processor_id(void)
|
|
{
|
|
#if defined(__VDSO__)
|
|
extern int vdso_smp_processor_id(void)
|
|
__compiletime_error("VDSO should not call smp_processor_id()");
|
|
return vdso_smp_processor_id();
|
|
#else
|
|
return current_thread_info()->cpu;
|
|
#endif
|
|
}
|
|
#define raw_smp_processor_id raw_smp_processor_id
|
|
|
|
/* Map from cpu id to sequential logical cpu number. This will only
|
|
not be idempotent when cpus failed to come on-line. */
|
|
extern int __cpu_number_map[NR_CPUS];
|
|
#define cpu_number_map(cpu) __cpu_number_map[cpu]
|
|
|
|
/* The reverse map from sequential logical cpu number to cpu id. */
|
|
extern int __cpu_logical_map[NR_CPUS];
|
|
#define cpu_logical_map(cpu) __cpu_logical_map[cpu]
|
|
|
|
#define NO_PROC_ID (-1)
|
|
|
|
#define SMP_RESCHEDULE_YOURSELF 0x1 /* XXX braindead */
|
|
#define SMP_CALL_FUNCTION 0x2
|
|
/* Octeon - Tell another core to flush its icache */
|
|
#define SMP_ICACHE_FLUSH 0x4
|
|
#define SMP_ASK_C0COUNT 0x8
|
|
|
|
/* Mask of CPUs which are currently definitely operating coherently */
|
|
extern cpumask_t cpu_coherent_mask;
|
|
|
|
extern void asmlinkage smp_bootstrap(void);
|
|
|
|
extern void calculate_cpu_foreign_map(void);
|
|
|
|
/*
|
|
* this function sends a 'reschedule' IPI to another CPU.
|
|
* it goes straight through and wastes no time serializing
|
|
* anything. Worst case is that we lose a reschedule ...
|
|
*/
|
|
static inline void smp_send_reschedule(int cpu)
|
|
{
|
|
extern const struct plat_smp_ops *mp_ops; /* private */
|
|
|
|
mp_ops->send_ipi_single(cpu, SMP_RESCHEDULE_YOURSELF);
|
|
}
|
|
|
|
#ifdef CONFIG_HOTPLUG_CPU
|
|
static inline int __cpu_disable(void)
|
|
{
|
|
extern const struct plat_smp_ops *mp_ops; /* private */
|
|
|
|
return mp_ops->cpu_disable();
|
|
}
|
|
|
|
static inline void __cpu_die(unsigned int cpu)
|
|
{
|
|
extern const struct plat_smp_ops *mp_ops; /* private */
|
|
|
|
mp_ops->cpu_die(cpu);
|
|
}
|
|
|
|
extern void play_dead(void);
|
|
#endif
|
|
|
|
/*
|
|
* This function will set up the necessary IPIs for Linux to communicate
|
|
* with the CPUs in mask.
|
|
* Return 0 on success.
|
|
*/
|
|
int mips_smp_ipi_allocate(const struct cpumask *mask);
|
|
|
|
/*
|
|
* This function will free up IPIs allocated with mips_smp_ipi_allocate to the
|
|
* CPUs in mask, which must be a subset of the IPIs that have been configured.
|
|
* Return 0 on success.
|
|
*/
|
|
int mips_smp_ipi_free(const struct cpumask *mask);
|
|
|
|
static inline void arch_send_call_function_single_ipi(int cpu)
|
|
{
|
|
extern const struct plat_smp_ops *mp_ops; /* private */
|
|
|
|
mp_ops->send_ipi_mask(cpumask_of(cpu), SMP_CALL_FUNCTION);
|
|
}
|
|
|
|
static inline void arch_send_call_function_ipi_mask(const struct cpumask *mask)
|
|
{
|
|
extern const struct plat_smp_ops *mp_ops; /* private */
|
|
|
|
mp_ops->send_ipi_mask(mask, SMP_CALL_FUNCTION);
|
|
}
|
|
|
|
#endif /* __ASM_SMP_H */
|