diff options
Diffstat (limited to 'include')
29 files changed, 157 insertions, 108 deletions
diff --git a/include/asm-alpha/numnodes.h b/include/asm-alpha/numnodes.h index 3c370ca3aaa6..cd425827e4f3 100644 --- a/include/asm-alpha/numnodes.h +++ b/include/asm-alpha/numnodes.h @@ -1,6 +1,7 @@ #ifndef _ASM_MAX_NUMNODES_H #define _ASM_MAX_NUMNODES_H -#define MAX_NUMNODES 128 /* Marvel */ +/* Max 128 Nodes - Marvel */ +#define NODES_SHIFT 7 #endif /* _ASM_MAX_NUMNODES_H */ diff --git a/include/asm-arm/arch-clps711x/memory.h b/include/asm-arm/arch-clps711x/memory.h index efa55531eae2..a116a7fa5232 100644 --- a/include/asm-arm/arch-clps711x/memory.h +++ b/include/asm-arm/arch-clps711x/memory.h @@ -109,8 +109,6 @@ * node 3: 0xd8000000 - 0xdfffffff */ -#define NR_NODES 4 - /* * Given a kernel address, find the home node of the underlying memory. */ diff --git a/include/asm-arm/arch-sa1100/memory.h b/include/asm-arm/arch-sa1100/memory.h index 6303e6cce320..076b3a9d41b6 100644 --- a/include/asm-arm/arch-sa1100/memory.h +++ b/include/asm-arm/arch-sa1100/memory.h @@ -74,8 +74,6 @@ * node 3: 0xd8000000 - 0xdfffffff */ -#define NR_NODES 4 - /* * Given a kernel address, find the home node of the underlying memory. */ diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h index 588c47d26338..3d9b777a0349 100644 --- a/include/asm-arm/memory.h +++ b/include/asm-arm/memory.h @@ -84,24 +84,24 @@ static inline void *phys_to_virt(unsigned long x) #define PHYS_TO_NID(addr) (0) -#else +#else /* CONFIG_DISCONTIGMEM */ + /* * This is more complex. We have a set of mem_map arrays spread * around in memory. */ +#include <linux/numa.h> + #define page_to_pfn(page) \ (( (page) - page_zone(page)->zone_mem_map) \ + page_zone(page)->zone_start_pfn) - #define pfn_to_page(pfn) \ (PFN_TO_MAPBASE(pfn) + LOCAL_MAP_NR((pfn) << PAGE_SHIFT)) - -#define pfn_valid(pfn) (PFN_TO_NID(pfn) < NR_NODES) +#define pfn_valid(pfn) (PFN_TO_NID(pfn) < MAX_NUMNODES) #define virt_to_page(kaddr) \ (ADDR_TO_MAPBASE(kaddr) + LOCAL_MAP_NR(kaddr)) - -#define virt_addr_valid(kaddr) (KVADDR_TO_NID(kaddr) < NR_NODES) +#define virt_addr_valid(kaddr) (KVADDR_TO_NID(kaddr) < MAX_NUMNODES) /* * Common discontigmem stuff. @@ -109,7 +109,7 @@ static inline void *phys_to_virt(unsigned long x) */ #define PHYS_TO_NID(addr) PFN_TO_NID((addr) >> PAGE_SHIFT) -#endif +#endif /* !CONFIG_DISCONTIGMEM */ /* * For BIO. "will die". Kill me when bio_to_phys() and bvec_to_phys() die. diff --git a/include/asm-arm/numnodes.h b/include/asm-arm/numnodes.h index 4c12812f73dc..609f73b00b6a 100644 --- a/include/asm-arm/numnodes.h +++ b/include/asm-arm/numnodes.h @@ -10,8 +10,7 @@ #ifndef __ASM_ARM_NUMNODES_H #define __ASM_ARM_NUMNODES_H -#include <asm/memory.h> - -#define MAX_NUMNODES NR_NODES +/* Max 4 Nodes */ +#define NODES_SHIFT 2 #endif diff --git a/include/asm-i386/numaq.h b/include/asm-i386/numaq.h index 13eb04501378..38f710dc37f2 100644 --- a/include/asm-i386/numaq.h +++ b/include/asm-i386/numaq.h @@ -28,7 +28,6 @@ #ifdef CONFIG_X86_NUMAQ -#define MAX_NUMNODES 16 extern int get_memcfg_numaq(void); /* diff --git a/include/asm-i386/numnodes.h b/include/asm-i386/numnodes.h index d77cbdcda572..a61f38c8176f 100644 --- a/include/asm-i386/numnodes.h +++ b/include/asm-i386/numnodes.h @@ -4,11 +4,15 @@ #include <linux/config.h> #ifdef CONFIG_X86_NUMAQ -#include <asm/numaq.h> -#elif CONFIG_ACPI_SRAT -#include <asm/srat.h> -#else -#define MAX_NUMNODES 1 + +/* Max 16 Nodes */ +#define NODES_SHIFT 4 + +#elif defined(CONFIG_ACPI_SRAT) + +/* Max 8 Nodes */ +#define NODES_SHIFT 3 + #endif /* CONFIG_X86_NUMAQ */ #endif /* _ASM_MAX_NUMNODES_H */ diff --git a/include/asm-i386/srat.h b/include/asm-i386/srat.h index 13563f45870e..165ab4bdc02b 100644 --- a/include/asm-i386/srat.h +++ b/include/asm-i386/srat.h @@ -31,7 +31,6 @@ #error CONFIG_ACPI_SRAT not defined, and srat.h header has been included #endif -#define MAX_NUMNODES 8 extern int get_memcfg_from_srat(void); extern unsigned long *get_zholes_size(int); diff --git a/include/asm-ia64/acpi.h b/include/asm-ia64/acpi.h index 66d1a35f2de0..7c3c0edd574a 100644 --- a/include/asm-ia64/acpi.h +++ b/include/asm-ia64/acpi.h @@ -99,7 +99,7 @@ int acpi_get_addr_space (void *obj, u8 type, u64 *base, u64 *length,u64 *tra); /* Proximity bitmap length; _PXM is at most 255 (8 bit)*/ #define MAX_PXM_DOMAINS (256) extern int __initdata pxm_to_nid_map[MAX_PXM_DOMAINS]; -extern int __initdata nid_to_pxm_map[NR_NODES]; +extern int __initdata nid_to_pxm_map[MAX_NUMNODES]; #endif #endif /*__KERNEL__*/ diff --git a/include/asm-ia64/mmzone.h b/include/asm-ia64/mmzone.h index 8ef66c05d2b3..9e060cd61ca4 100644 --- a/include/asm-ia64/mmzone.h +++ b/include/asm-ia64/mmzone.h @@ -92,14 +92,12 @@ extern unsigned long max_low_pfn; -#ifdef CONFIG_IA64_DIG +#if defined(CONFIG_IA64_DIG) /* * Platform definitions for DIG platform with contiguous memory. */ -#define MAX_PHYSNODE_ID 8 /* Maximum node number +1 */ -#define NR_NODES 8 /* Maximum number of nodes in SSI */ - +#define MAX_PHYSNODE_ID 8 /* Maximum node number +1 */ #define MAX_PHYS_MEMORY (1UL << 40) /* 1 TB */ /* @@ -119,37 +117,34 @@ extern unsigned long max_low_pfn; # error Unsupported bank and nodesize! #endif #define BANKSIZE (1UL << BANKSHIFT) -#define BANK_OFFSET(addr) ((unsigned long)(addr) & (BANKSIZE-1)) -#define NR_BANKS (NR_BANKS_PER_NODE * NR_NODES) - -/* - * VALID_MEM_KADDR returns a boolean to indicate if a kaddr is - * potentially a valid cacheable identity mapped RAM memory address. - * Note that the RAM may or may not actually be present!! - */ -#define VALID_MEM_KADDR(kaddr) 1 - -/* - * Given a nodeid & a bank number, find the address of the mem_map - * entry for the first page of the bank. - */ -#define BANK_MEM_MAP_INDEX(kaddr) \ - (((unsigned long)(kaddr) & (MAX_PHYS_MEMORY-1)) >> BANKSHIFT) #elif defined(CONFIG_IA64_SGI_SN2) + /* * SGI SN2 discontig definitions */ #define MAX_PHYSNODE_ID 2048 /* 2048 node ids (also called nasid) */ -#define NR_NODES 128 /* Maximum number of nodes in SSI */ #define MAX_PHYS_MEMORY (1UL << 49) -#define BANKSHIFT 38 #define NR_BANKS_PER_NODE 4 +#define BANKSHIFT 38 #define SN2_NODE_SIZE (64UL*1024*1024*1024) /* 64GB per node */ #define BANKSIZE (SN2_NODE_SIZE/NR_BANKS_PER_NODE) + +#endif /* CONFIG_IA64_DIG */ + +#if defined(CONFIG_IA64_DIG) || defined (CONFIG_IA64_SGI_SN2) +/* Common defines for both platforms */ +#include <asm/numnodes.h> #define BANK_OFFSET(addr) ((unsigned long)(addr) & (BANKSIZE-1)) -#define NR_BANKS (NR_BANKS_PER_NODE * NR_NODES) +#define NR_BANKS (NR_BANKS_PER_NODE * (1 << NODES_SHIFT)) +#define NR_MEMBLKS (NR_BANKS) + +/* + * VALID_MEM_KADDR returns a boolean to indicate if a kaddr is + * potentially a valid cacheable identity mapped RAM memory address. + * Note that the RAM may or may not actually be present!! + */ #define VALID_MEM_KADDR(kaddr) 1 /* @@ -159,5 +154,6 @@ extern unsigned long max_low_pfn; #define BANK_MEM_MAP_INDEX(kaddr) \ (((unsigned long)(kaddr) & (MAX_PHYS_MEMORY-1)) >> BANKSHIFT) -#endif /* CONFIG_IA64_DIG */ +#endif /* CONFIG_IA64_DIG || CONFIG_IA64_SGI_SN2 */ + #endif /* _ASM_IA64_MMZONE_H */ diff --git a/include/asm-ia64/nodedata.h b/include/asm-ia64/nodedata.h index 9acdcb7ffe58..eae5235fa8be 100644 --- a/include/asm-ia64/nodedata.h +++ b/include/asm-ia64/nodedata.h @@ -8,12 +8,10 @@ * Copyright (c) 2002 Erich Focht <efocht@ess.nec.de> * Copyright (c) 2002 Kimio Suganuma <k-suganuma@da.jp.nec.com> */ - - #ifndef _ASM_IA64_NODEDATA_H #define _ASM_IA64_NODEDATA_H - +#include <linux/numa.h> #include <asm/mmzone.h> /* @@ -24,9 +22,9 @@ struct pglist_data; struct ia64_node_data { short active_cpu_count; short node; - struct pglist_data *pg_data_ptrs[NR_NODES]; + struct pglist_data *pg_data_ptrs[MAX_NUMNODES]; struct page *bank_mem_map_base[NR_BANKS]; - struct ia64_node_data *node_data_ptrs[NR_NODES]; + struct ia64_node_data *node_data_ptrs[MAX_NUMNODES]; short node_id_map[NR_BANKS]; }; diff --git a/include/asm-ia64/numa.h b/include/asm-ia64/numa.h index aa5864eff837..8b0d5edad7ba 100644 --- a/include/asm-ia64/numa.h +++ b/include/asm-ia64/numa.h @@ -16,17 +16,11 @@ #ifdef CONFIG_NUMA -#ifdef CONFIG_DISCONTIGMEM -# include <asm/mmzone.h> -# define NR_MEMBLKS (NR_BANKS) -#else -# define NR_NODES (8) -# define NR_MEMBLKS (NR_NODES * 8) -#endif - +#include <linux/numa.h> #include <linux/cache.h> + extern volatile char cpu_to_node_map[NR_CPUS] __cacheline_aligned; -extern volatile cpumask_t node_to_cpu_mask[NR_NODES] __cacheline_aligned; +extern volatile cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned; /* Stuff below this line could be architecture independent */ @@ -60,7 +54,7 @@ extern struct node_cpuid_s node_cpuid[NR_CPUS]; * proportional to the memory access latency ratios. */ -extern u8 numa_slit[NR_NODES * NR_NODES]; +extern u8 numa_slit[MAX_NUMNODES * MAX_NUMNODES]; #define node_distance(from,to) (numa_slit[from * numnodes + to]) extern int paddr_to_nid(unsigned long paddr); diff --git a/include/asm-ia64/numnodes.h b/include/asm-ia64/numnodes.h index 1da4bdaa917f..3b71511f5d2b 100644 --- a/include/asm-ia64/numnodes.h +++ b/include/asm-ia64/numnodes.h @@ -1,7 +1,12 @@ #ifndef _ASM_MAX_NUMNODES_H #define _ASM_MAX_NUMNODES_H -#include <asm/mmzone.h> -#define MAX_NUMNODES NR_NODES +#ifdef CONFIG_IA64_DIG +/* Max 8 Nodes */ +#define NODES_SHIFT 3 +#elif defined(CONFIG_IA64_SGI_SN2) +/* Max 128 Nodes */ +#define NODES_SHIFT 7 +#endif #endif /* _ASM_MAX_NUMNODES_H */ diff --git a/include/asm-ia64/sn/pda.h b/include/asm-ia64/sn/pda.h index 6c605727ea21..7162968474c7 100644 --- a/include/asm-ia64/sn/pda.h +++ b/include/asm-ia64/sn/pda.h @@ -10,6 +10,7 @@ #include <linux/config.h> #include <linux/cache.h> +#include <linux/numa.h> #include <asm/percpu.h> #include <asm/system.h> #include <asm/processor.h> @@ -56,7 +57,7 @@ typedef struct pda_s { unsigned long sn_soft_irr[4]; unsigned long sn_in_service_ivecs[4]; - short cnodeid_to_nasid_table[NR_NODES]; + short cnodeid_to_nasid_table[MAX_NUMNODES]; int sn_lb_int_war_ticks; int sn_last_irq; int sn_first_irq; diff --git a/include/asm-ppc64/numnodes.h b/include/asm-ppc64/numnodes.h index 7c85cfe9ecdd..75ae0b906708 100644 --- a/include/asm-ppc64/numnodes.h +++ b/include/asm-ppc64/numnodes.h @@ -1,6 +1,7 @@ #ifndef _ASM_MAX_NUMNODES_H #define _ASM_MAX_NUMNODES_H -#define MAX_NUMNODES 16 +/* Max 16 Nodes */ +#define NODES_SHIFT 4 #endif /* _ASM_MAX_NUMNODES_H */ diff --git a/include/asm-sh/mmzone.h b/include/asm-sh/mmzone.h index fa323fc66f24..0e7406601fdf 100644 --- a/include/asm-sh/mmzone.h +++ b/include/asm-sh/mmzone.h @@ -10,14 +10,14 @@ #include <linux/config.h> +#ifdef CONFIG_DISCONTIGMEM + /* Currently, just for HP690 */ #define PHYSADDR_TO_NID(phys) ((((phys) - __MEMORY_START) >= 0x01000000)?1:0) -#define NR_NODES 2 -extern pg_data_t discontig_page_data[NR_NODES]; -extern bootmem_data_t discontig_node_bdata[NR_NODES]; +extern pg_data_t discontig_page_data[MAX_NUMNODES]; +extern bootmem_data_t discontig_node_bdata[MAX_NUMNODES]; -#ifdef CONFIG_DISCONTIGMEM /* * Following are macros that each numa implmentation must define. */ @@ -46,7 +46,7 @@ static inline int is_valid_page(struct page *page) { unsigned int i; - for (i = 0; i < NR_NODES; i++) { + for (i = 0; i < MAX_NUMNODES; i++) { if (page >= NODE_MEM_MAP(i) && page < NODE_MEM_MAP(i) + NODE_DATA(i)->node_size) return 1; diff --git a/include/asm-sh/numnodes.h b/include/asm-sh/numnodes.h new file mode 100644 index 000000000000..f73e85b72ecb --- /dev/null +++ b/include/asm-sh/numnodes.h @@ -0,0 +1,7 @@ +#ifndef _ASM_MAX_NUMNODES_H +#define _ASM_MAX_NUMNODES_H + +/* Max 2 Nodes */ +#define NODES_SHIFT 1 + +#endif /* _ASM_MAX_NUMNODES_H */ diff --git a/include/asm-x86_64/mmzone.h b/include/asm-x86_64/mmzone.h index 398c530270c2..1f8ec0b0f10f 100644 --- a/include/asm-x86_64/mmzone.h +++ b/include/asm-x86_64/mmzone.h @@ -10,7 +10,6 @@ #define VIRTUAL_BUG_ON(x) -#include <asm/numnodes.h> #include <asm/smp.h> #define MAXNODE 8 diff --git a/include/asm-x86_64/numnodes.h b/include/asm-x86_64/numnodes.h index 898bf89e1fdb..336011c3d3fd 100644 --- a/include/asm-x86_64/numnodes.h +++ b/include/asm-x86_64/numnodes.h @@ -3,10 +3,7 @@ #include <linux/config.h> -#ifdef CONFIG_DISCONTIGMEM -#define MAX_NUMNODES 8 /* APIC limit currently */ -#else -#define MAX_NUMNODES 1 -#endif +/* Max 8 Nodes - APIC limit currently */ +#define NODES_SHIFT 3 #endif diff --git a/include/linux/compat.h b/include/linux/compat.h index b338ca16f5af..3e8e53bdd42e 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -90,5 +90,12 @@ struct compat_statfs64 { __u32 f_spare[5]; }; +struct compat_dirent { + u32 d_ino; + compat_off_t d_off; + u16 d_reclen; + char d_name[256]; +}; + #endif /* CONFIG_COMPAT */ #endif /* _LINUX_COMPAT_H */ diff --git a/include/linux/eisa.h b/include/linux/eisa.h index dc76d57b10d0..4079242dced8 100644 --- a/include/linux/eisa.h +++ b/include/linux/eisa.h @@ -4,16 +4,6 @@ #include <linux/ioport.h> #include <linux/device.h> -#ifdef CONFIG_EISA -# ifdef CONFIG_EISA_ALWAYS -# define EISA_bus 1 -# else - extern int EISA_bus; -# endif -#else -# define EISA_bus 0 -#endif - #define EISA_SIG_LEN 8 #define EISA_MAX_SLOTS 8 @@ -108,4 +98,10 @@ struct eisa_root_device { int eisa_root_register (struct eisa_root_device *root); +#ifdef CONFIG_EISA +extern int EISA_bus; +#else +# define EISA_bus 0 +#endif + #endif diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h index 1181cfae7142..7451cdcfb9da 100644 --- a/include/linux/ext3_fs_i.h +++ b/include/linux/ext3_fs_i.h @@ -106,7 +106,7 @@ struct ext3_inode_info { * during recovery. Hence we must fix the get_block-vs-truncate race * by other means, so we have truncate_sem. */ - struct rw_semaphore truncate_sem; + struct semaphore truncate_sem; struct inode vfs_inode; }; diff --git a/include/linux/list.h b/include/linux/list.h index 9e218f0e471c..5fdf945bbf93 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -449,7 +449,7 @@ static __inline__ void hlist_del(struct hlist_node *n) /** * hlist_del_rcu - deletes entry from hash list without re-initialization - * @entry: the element to delete from the hash list. + * @n: the element to delete from the hash list. * * Note: list_unhashed() on entry does not return true after this, * the entry is in an undefined state. It is useful for RCU based diff --git a/include/linux/mm.h b/include/linux/mm.h index ca006021a13e..f72772e17665 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -323,7 +323,6 @@ static inline void put_page(struct page *page) * The zone field is never updated after free_area_init_core() * sets it, so none of the operations on it need to be atomic. */ -#define NODE_SHIFT 4 #define ZONE_SHIFT (BITS_PER_LONG - 8) struct zone; diff --git a/include/linux/mman.h b/include/linux/mman.h index cfb6ac61bbde..07da84fcbd15 100644 --- a/include/linux/mman.h +++ b/include/linux/mman.h @@ -28,8 +28,13 @@ static inline void vm_unacct_memory(long pages) vm_acct_memory(-pages); } -/* Optimisation macro. */ -#define _calc_vm_trans(x,bit1,bit2) \ +/* + * Optimisation macro. It is equivalent to: + * (x & bit1) ? bit2 : 0 + * but this version is faster. + * ("bit1" and "bit2" must be single bits) + */ +#define _calc_vm_trans(x, bit1, bit2) \ ((bit1) <= (bit2) ? ((x) & (bit1)) * ((bit2) / (bit1)) \ : ((x) & (bit1)) / ((bit1) / (bit2))) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index c66551a52d2a..bea51c4f5b22 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -10,13 +10,8 @@ #include <linux/wait.h> #include <linux/cache.h> #include <linux/threads.h> +#include <linux/numa.h> #include <asm/atomic.h> -#ifdef CONFIG_DISCONTIGMEM -#include <asm/numnodes.h> -#endif -#ifndef MAX_NUMNODES -#define MAX_NUMNODES 1 -#endif /* Free memory management - zoned buddy allocator. */ #ifndef CONFIG_FORCE_MAX_ZONEORDER @@ -303,19 +298,34 @@ extern void setup_per_zone_pages_min(void); #define numa_node_id() (cpu_to_node(smp_processor_id())) #ifndef CONFIG_DISCONTIGMEM + extern struct pglist_data contig_page_data; #define NODE_DATA(nid) (&contig_page_data) #define NODE_MEM_MAP(nid) mem_map -#define MAX_NR_NODES 1 +#define MAX_NODES_SHIFT 0 + #else /* CONFIG_DISCONTIGMEM */ #include <asm/mmzone.h> -/* page->zone is currently 8 bits ... */ -#define MAX_NR_NODES (255 / MAX_NR_ZONES) +#if BITS_PER_LONG == 32 +/* + * with 32 bit flags field, page->zone is currently 8 bits. + * there are 3 zones (2 bits) and this leaves 8-2=6 bits for nodes. + */ +#define MAX_NODES_SHIFT 6 +#elif BITS_PER_LONG == 64 +/* + * with 64 bit flags field, there's plenty of room. + */ +#define MAX_NODES_SHIFT 10 +#endif #endif /* !CONFIG_DISCONTIGMEM */ +#if NODES_SHIFT > MAX_NODES_SHIFT +#error NODES_SHIFT > MAX_NODES_SHIFT +#endif extern DECLARE_BITMAP(node_online_map, MAX_NUMNODES); extern DECLARE_BITMAP(memblk_online_map, MAX_NR_MEMBLKS); diff --git a/include/linux/numa.h b/include/linux/numa.h new file mode 100644 index 000000000000..bd0c8c4e9a95 --- /dev/null +++ b/include/linux/numa.h @@ -0,0 +1,16 @@ +#ifndef _LINUX_NUMA_H +#define _LINUX_NUMA_H + +#include <linux/config.h> + +#ifdef CONFIG_DISCONTIGMEM +#include <asm/numnodes.h> +#endif + +#ifndef NODES_SHIFT +#define NODES_SHIFT 0 +#endif + +#define MAX_NUMNODES (1 << NODES_SHIFT) + +#endif /* _LINUX_NUMA_H */ diff --git a/include/linux/sched.h b/include/linux/sched.h index 21a1c416594c..a504b6a92ccf 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -264,6 +264,15 @@ struct signal_struct { /* thread group stop support, overloads group_exit_code too */ int group_stop_count; + + /* job control IDs */ + pid_t pgrp; + pid_t tty_old_pgrp; + pid_t session; + /* boolean value for session group leader */ + int leader; + + struct tty_struct *tty; /* NULL if no tty */ }; /* @@ -366,12 +375,7 @@ struct task_struct { unsigned long personality; int did_exec:1; pid_t pid; - pid_t __pgrp; /* Accessed via process_group() */ - pid_t tty_old_pgrp; - pid_t session; pid_t tgid; - /* boolean value for session group leader */ - int leader; /* * pointers to (original) parent process, youngest child, younger sibling, * older sibling, respectively. (p->father can be replaced with @@ -415,7 +419,6 @@ struct task_struct { char comm[16]; /* file system info */ int link_count, total_link_count; - struct tty_struct *tty; /* NULL if no tty */ unsigned int locks; /* How many file locks are being held */ /* ipc stuff */ struct sysv_sem sysvsem; @@ -469,7 +472,22 @@ struct task_struct { static inline pid_t process_group(struct task_struct *tsk) { - return tsk->group_leader->__pgrp; + return tsk->signal->pgrp; +} + +static inline pid_t process_session(struct task_struct *tsk) +{ + return tsk->signal->session; +} + +static inline int process_session_leader(struct task_struct *tsk) +{ + return tsk->signal->leader; +} + +static inline struct tty_struct *process_tty(struct task_struct *tsk) +{ + return tsk->signal->tty; } extern void __put_task_struct(struct task_struct *tsk); diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 81b3289dbe68..2aeb35d62c2d 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -152,6 +152,7 @@ struct skb_shared_info { * @sk: Socket we are owned by * @stamp: Time we arrived * @dev: Device we arrived on/are leaving by + * @real_dev: The real device we are using * @h: Transport layer header * @nh: Network layer header * @mac: Link layer header @@ -179,6 +180,7 @@ struct skb_shared_info { * @nfct: Associated connection, if any * @nf_debug: Netfilter debugging * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c + * @private: Data which is private to the HIPPI implementation * @tc_index: Traffic control index */ |
