From: ishubist@gmail.com (Abhishek Bist) Date: Tue, 5 May 2015 19:30:11 +0530 Subject: Calling architecture specific headers files? Message-ID: <20150505140011.GA17361@localhost.localdomain> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi, I am searching the way out that how an architecture specific header's file come into existence.For example the generic defination of spinlock is supposed to call architecture specific spinlock. (linux/spinlock_types.h) typedef struct raw_spinlock { arch_spinlock_t raw_lock; <<<< #ifdef CONFIG_GENERIC_LOCKBREAK unsigned int break_lock; #endif #ifdef CONFIG_DEBUG_SPINLOCK unsigned int magic, owner_cpu; void *owner; #endif #ifdef CONFIG_DEBUG_LOCK_ALLOC struct lockdep_map dep_map; #endif } raw_spinlock_t; (x86/include/asm/spinlock_types.h) typedef struct arch_spinlock { union { __ticketpair_t head_tail; struct __raw_tickets { __ticket_t head, tail; } tickets; }; } arch_spinlock_t; what is there which makes to load the architecture specific spinlock (x86) in my case.