mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-09-04 20:19:47 +08:00 
			
		
		
		
	 028c221ed1
			
		
	
	
		028c221ed1
		
	
	
	
	
		
			
			AMD systems provide a "NodeId" value that represents a global ID indicating to which "Node" a logical CPU belongs. The "Node" is a physical structure equivalent to a Die, and it should not be confused with logical structures like NUMA nodes. Logical nodes can be adjusted based on firmware or other settings whereas the physical nodes/dies are fixed based on hardware topology. The NodeId value can be used when a physical ID is needed by software. Save the AMD NodeId to struct cpuinfo_x86.cpu_die_id. Use the value from CPUID or MSR as appropriate. Default to phys_proc_id otherwise. Do so for both AMD and Hygon systems. Drop the node_id parameter from cacheinfo_*_init_llc_id() as it is no longer needed. Update the x86 topology documentation. Suggested-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20201109210659.754018-2-Yazen.Ghannam@amd.com
		
			
				
	
	
		
			9 lines
		
	
	
		
			263 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			9 lines
		
	
	
		
			263 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /* SPDX-License-Identifier: GPL-2.0 */
 | |
| #ifndef _ASM_X86_CACHEINFO_H
 | |
| #define _ASM_X86_CACHEINFO_H
 | |
| 
 | |
| void cacheinfo_amd_init_llc_id(struct cpuinfo_x86 *c, int cpu);
 | |
| void cacheinfo_hygon_init_llc_id(struct cpuinfo_x86 *c, int cpu);
 | |
| 
 | |
| #endif /* _ASM_X86_CACHEINFO_H */
 |