Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) /* SPDX-License-Identifier: GPL-2.0-or-later */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3)  * Copyright (C) 2002, Erich Focht, NEC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5)  * All rights reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) #ifndef _ASM_IA64_TOPOLOGY_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) #define _ASM_IA64_TOPOLOGY_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <asm/acpi.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <asm/numa.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <asm/smp.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #ifdef CONFIG_NUMA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) /* Nodes w/o CPUs are preferred for memory allocations, see build_zonelists */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #define PENALTY_FOR_NODE_WITH_CPUS 255
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)  * Nodes within this distance are eligible for reclaim by zone_reclaim() when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)  * zone_reclaim_mode is enabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #define RECLAIM_DISTANCE 15
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)  * Returns a bitmask of CPUs on Node 'node'.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) #define cpumask_of_node(node) ((node) == -1 ?				\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 			       cpu_all_mask :				\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 			       &node_to_cpu_mask[node])
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)  * Determines the node for a given pci bus
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) #define pcibus_to_node(bus) PCI_CONTROLLER(bus)->node
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) void build_cpu_to_node_map(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) #endif /* CONFIG_NUMA */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) #ifdef CONFIG_SMP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) #define topology_physical_package_id(cpu)	(cpu_data(cpu)->socket_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) #define topology_core_id(cpu)			(cpu_data(cpu)->core_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) #define topology_core_cpumask(cpu)		(&cpu_core_map[cpu])
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) #define topology_sibling_cpumask(cpu)		(&per_cpu(cpu_sibling_map, cpu))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) extern void arch_fix_phys_package_id(int num, u32 slot);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) #define cpumask_of_pcibus(bus)	(pcibus_to_node(bus) == -1 ?		\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) 				 cpu_all_mask :				\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) 				 cpumask_of_node(pcibus_to_node(bus)))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) #include <asm-generic/topology.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) #endif /* _ASM_IA64_TOPOLOGY_H */