mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
A small boring set of cleanups for the SMP and CPU hotplug code.
-----BEGIN PGP SIGNATURE----- iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAmXt8METHHRnbHhAbGlu dXRyb25peC5kZQAKCRCmGPVMDXSYoeSoD/4hdN591SZekKLJ4HhGRS+EjXaAUxB7 3o48nrgd6JlpLXoJUZumd7gXwhxzch8uobin4uirqI/mckzmaMJDBsvpOmM7uasa vWWkj3BNUq5zgV2RP+DhcUUbSdTd/TCbJww2EQj2wc7h6+XTv9rdQCL6I/KnG4JT BlPNH0qQSDUCf+/vEwmOTC9zLYsg8/Dd9hd/ayAETWMetLSER6rX3yq/jiM1nh1K rcMuTPNSuJ18YzJMc9Pk5Dq7j1m0CR7FpYnGQ813RFxvHfjz1oinWPsJEwU7h9pf ehffH5on4JmgzidJQIeQCQ/3RmV45rTIMitKP8TQ1jEPnbtnskOm+OVns0dx7Yo8 OSq3Cs/QqBH0qZyXrWJsaVOIOUfIbqBICGI6gc9oUU5ilNgPmnyr/etMsyHcBF5A 1ymqRexvdcH2pUtbBeWZaerd5ZFvfacH34gKrz4dVuIaCZ5nQwApIihPwjHzyRSK FUxngbYVvJNlLwloqw/Z2TR7e1IcyfZjF2mZTUdx0hXm/X/lXHsuoKpvV9mSVzAj RWwuh+3XMU+T2hgIKrFKVkkXAi1tl4Qy8NQCerixRpRpBrKVTI9wTANypcayZ8RF v5lmaYEA0bVMy1bTwAvbtnHA/vh2RbHefPOuHAUMGsMCEWcKxXASO/cxXxy0xcOz TaHNlvVVZhC0Jg== =vzxP -----END PGP SIGNATURE----- Merge tag 'smp-core-2024-03-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull cpu core updates from Thomas Gleixner: "A small boring set of cleanups for the SMP and CPU hotplug code" * tag 'smp-core-2024-03-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: cpu: Remove stray semicolon smp: Make __smp_processor_id() 0-argument macro cpu: Mark cpu_possible_mask as __ro_after_init kernel/cpu: Convert snprintf() to sysfs_emit() cpu/hotplug: Delete an extraneous kernel-doc description
This commit is contained in:
commit
397935e3dd
@ -261,7 +261,7 @@ static inline int get_boot_cpu_id(void)
|
||||
* regular asm read for the stable.
|
||||
*/
|
||||
#ifndef __smp_processor_id
|
||||
#define __smp_processor_id(x) raw_smp_processor_id(x)
|
||||
#define __smp_processor_id() raw_smp_processor_id()
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_PREEMPT
|
||||
|
@ -54,7 +54,6 @@
|
||||
* @rollback: Perform a rollback
|
||||
* @single: Single callback invocation
|
||||
* @bringup: Single callback bringup or teardown selector
|
||||
* @cpu: CPU number
|
||||
* @node: Remote CPU node; for multi-instance, do a
|
||||
* single entry callback for install/remove
|
||||
* @last: For multi-instance rollback, remember how far we got
|
||||
@ -3005,7 +3004,7 @@ static ssize_t control_show(struct device *dev,
|
||||
return sysfs_emit(buf, "%d\n", cpu_smt_num_threads);
|
||||
#endif
|
||||
|
||||
return snprintf(buf, PAGE_SIZE - 2, "%s\n", state);
|
||||
return sysfs_emit(buf, "%s\n", state);
|
||||
}
|
||||
|
||||
static ssize_t control_store(struct device *dev, struct device_attribute *attr,
|
||||
@ -3018,7 +3017,7 @@ static DEVICE_ATTR_RW(control);
|
||||
static ssize_t active_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
return snprintf(buf, PAGE_SIZE - 2, "%d\n", sched_smt_active());
|
||||
return sysfs_emit(buf, "%d\n", sched_smt_active());
|
||||
}
|
||||
static DEVICE_ATTR_RO(active);
|
||||
|
||||
@ -3107,10 +3106,10 @@ const DECLARE_BITMAP(cpu_all_bits, NR_CPUS) = CPU_BITS_ALL;
|
||||
EXPORT_SYMBOL(cpu_all_bits);
|
||||
|
||||
#ifdef CONFIG_INIT_ALL_POSSIBLE
|
||||
struct cpumask __cpu_possible_mask __read_mostly
|
||||
struct cpumask __cpu_possible_mask __ro_after_init
|
||||
= {CPU_BITS_ALL};
|
||||
#else
|
||||
struct cpumask __cpu_possible_mask __read_mostly;
|
||||
struct cpumask __cpu_possible_mask __ro_after_init;
|
||||
#endif
|
||||
EXPORT_SYMBOL(__cpu_possible_mask);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user