From d6e4371268975b56408793aaae6533546b927f5d Mon Sep 17 00:00:00 2001 From: t_jeang Date: Tue, 6 Jan 2009 12:05:53 +0000 Subject: [PATCH] imported patch kernel-2.6.18-92.el5-fixes.patch --- arch/i386/kernel/time-xen.c | 2 +- arch/i386/pci/common.c | 26 ++++++++++++++++++++++++++ arch/i386/pci/direct.c | 26 -------------------------- arch/i386/pci/pci.h | 3 +-- drivers/firmware/iscsi_ibft_find.c | 1 + drivers/net/dgrs.c | 2 +- include/asm-i386/mach-xen/asm/setup.h | 2 +- include/linux/elf.h | 2 ++ include/net/icmp.h | 5 ++++- include/net/xfrm.h | 18 ++++++------------ kernel/module.c | 10 +++++----- net/ipv4/icmp.c | 2 +- net/ipv4/udp.c | 1 + 13 files changed, 50 insertions(+), 50 deletions(-) diff --git a/arch/i386/kernel/time-xen.c b/arch/i386/kernel/time-xen.c index 8e4a0501..dd67a063 100644 --- a/arch/i386/kernel/time-xen.c +++ b/arch/i386/kernel/time-xen.c @@ -1168,7 +1168,7 @@ static int __init cpufreq_time_setup(void) core_initcall(cpufreq_time_setup); #endif -#if CONFIG_CPU_FREQ +#ifdef CONFIG_CPU_FREQ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, void *data) { diff --git a/arch/i386/pci/common.c b/arch/i386/pci/common.c index 1838be8d..76aa595d 100644 --- a/arch/i386/pci/common.c +++ b/arch/i386/pci/common.c @@ -58,6 +58,32 @@ int pcibios_scanned; */ DEFINE_SPINLOCK(pci_config_lock); +/* + * Legacy PCI Config read and write routines for buses that can't use + * MMCONFIG accesses in systems where MMCONFIG is the default PCI config + * access mechanism. + */ +struct pci_raw_ops *pci_legacy_conf; + +static int pci_ops_legacy_read(struct pci_bus *bus, unsigned int devfn, + int where, int size, u32 *value) +{ + return pci_legacy_conf->read(0, bus->number, devfn, where, + size, value); +} + +static int pci_ops_legacy_write(struct pci_bus *bus, unsigned int devfn, + int where, int size, u32 value) +{ + return pci_legacy_conf->write(0, bus->number, devfn, where, + size, value); +} + +static struct pci_ops pci_legacy_ops = { + .read = pci_ops_legacy_read, + .write = pci_ops_legacy_write, +}; + /* * Several buggy motherboards address only 16 devices and mirror * them to next 16 IDs. We try to detect this `feature' on all diff --git a/arch/i386/pci/direct.c b/arch/i386/pci/direct.c index 53e6092e..56d5cc2e 100644 --- a/arch/i386/pci/direct.c +++ b/arch/i386/pci/direct.c @@ -175,32 +175,6 @@ static struct pci_raw_ops pci_direct_conf2 = { .write = pci_conf2_write, }; -/* - * Legacy PCI Config read and write routines for buses that can't use - * MMCONFIG accesses in systems where MMCONFIG is the default PCI config - * access mechanism. - */ -static struct pci_raw_ops *pci_legacy_conf; - -static int pci_ops_legacy_read(struct pci_bus *bus, unsigned int devfn, - int where, int size, u32 *value) -{ - return pci_legacy_conf->read(0, bus->number, devfn, where, - size, value); -} - -static int pci_ops_legacy_write(struct pci_bus *bus, unsigned int devfn, - int where, int size, u32 value) -{ - return pci_legacy_conf->write(0, bus->number, devfn, where, - size, value); -} - -struct pci_ops pci_legacy_ops = { - .read = pci_ops_legacy_read, - .write = pci_ops_legacy_write, -}; - /* * Before we decide to use direct hardware access mechanisms, we try to do some * trivial checks to ensure it at least _seems_ to be working -- we just test diff --git a/arch/i386/pci/pci.h b/arch/i386/pci/pci.h index 301a7a59..bf0e5563 100644 --- a/arch/i386/pci/pci.h +++ b/arch/i386/pci/pci.h @@ -48,8 +48,7 @@ enum pci_bf_sort_state { pci_dmi_bf, }; -extern struct pci_ops pci_legacy_ops; /* direct.c */ - +extern struct pci_raw_ops *pci_legacy_conf; /* common.c */ /* pci-i386.c */ extern unsigned int pcibios_max_latency; diff --git a/drivers/firmware/iscsi_ibft_find.c b/drivers/firmware/iscsi_ibft_find.c index 8ef433a8..81504a16 100644 --- a/drivers/firmware/iscsi_ibft_find.c +++ b/drivers/firmware/iscsi_ibft_find.c @@ -16,6 +16,7 @@ * GNU General Public License for more details. */ +#include #include #include #include diff --git a/drivers/net/dgrs.c b/drivers/net/dgrs.c index fa4f0943..18ba834a 100644 --- a/drivers/net/dgrs.c +++ b/drivers/net/dgrs.c @@ -110,7 +110,7 @@ static char version[] __initdata = * DGRS include files */ typedef unsigned char uchar; -typedef unsigned int bool; +//typedef unsigned int bool; #define vol volatile #include "dgrs.h" diff --git a/include/asm-i386/mach-xen/asm/setup.h b/include/asm-i386/mach-xen/asm/setup.h index c729454f..ea0e9fa0 100644 --- a/include/asm-i386/mach-xen/asm/setup.h +++ b/include/asm-i386/mach-xen/asm/setup.h @@ -17,7 +17,7 @@ #endif #define PARAM_SIZE 4096 -#define COMMAND_LINE_SIZE 256 +#define COMMAND_LINE_SIZE 2048 #define OLD_CL_MAGIC_ADDR 0x90020 #define OLD_CL_MAGIC 0xA33F diff --git a/include/linux/elf.h b/include/linux/elf.h index d89ce5bc..b210c7d1 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h @@ -6,6 +6,8 @@ #ifndef __ASSEMBLY__ #include #include +#include + #include #ifndef elf_read_implies_exec diff --git a/include/net/icmp.h b/include/net/icmp.h index 098161d6..6b1f74e2 100644 --- a/include/net/icmp.h +++ b/include/net/icmp.h @@ -72,7 +72,10 @@ extern int sysctl_icmp_errors_use_inbound_ifaddr; extern int sysctl_icmp_ratelimit; extern int sysctl_icmp_ratemask; -extern void xfrm4_decode_session_reverse(struct sk_buff *skb, struct flowi *fl); +#ifdef CONFIG_XFRM extern int xfrm4_icmp_check(struct sk_buff *skb); +#else +static inline int xfrm4_icmp_check(struct sk_buff *skb) { return 1; } +#endif #endif /* _ICMP_H */ diff --git a/include/net/xfrm.h b/include/net/xfrm.h index cdb53ff6..96cf3f64 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -429,8 +429,8 @@ static inline struct audit_buffer *xfrm_audit_start(const char *op) #else #define xfrm_audit_log(a,s,t,r,p,x) do { ; } while (0) #define xfrm_audit_state_replay_overflow(x, s) do { ; } while (0) -#define xfrm_audit_state_replay(s, f, sp, sq) do { ; } while (0) -#define xfrm_naudit_state_replay(s, f, sp, sq) do { ; } while (0) +#define xfrm_audit_state_replay(s, sp, sq) do { ; } while (0) +#define xfrm_naudit_state_replay(s, sp, sq) do { ; } while (0) #define xfrm_audit_state_notfound(s, f, sp, sq) do { ; } while (0) #define xfrm_naudit_state_notfound(s, f, sp, sq) do { ; } while (0) #define xfrm_audit_state_icvfail(x, s, p) do { ; } while (0) @@ -855,16 +855,10 @@ static inline int xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *sk { return 1; } -static inline int xfrm4_decode_session_reverse(struct sk_buff *skb, - struct flowi *fl) -{ - return -ENOSYS; -} -static inline int xfrm6_decode_session_reverse(struct sk_buff *skb, - struct flowi *fl) -{ - return -ENOSYS; -} +static inline void xfrm4_decode_session_reverse(struct sk_buff *skb, + struct flowi *fl) { } +static inline void xfrm6_decode_session_reverse(struct sk_buff *skb, + struct flowi *fl) { } static inline int xfrm4_policy_check_reverse(struct sock *sk, int dir, struct sk_buff *skb) { diff --git a/kernel/module.c b/kernel/module.c index 69ef2fda..40595a57 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -66,6 +66,9 @@ static DEFINE_SPINLOCK(modlist_lock); static DEFINE_MUTEX(module_mutex); static LIST_HEAD(modules); +/* Waiting for a module to finish initializing? */ +static DECLARE_WAIT_QUEUE_HEAD(module_wq); + static BLOCKING_NOTIFIER_HEAD(module_notify_list); int register_module_notifier(struct notifier_block * nb) @@ -538,9 +541,6 @@ static int already_uses(struct module *a, struct module *b) return 0; } -/* Waiting for a module to finish initializing? */ -static DECLARE_WAIT_QUEUE_HEAD(module_wq); - /* Module a uses b */ static int use_module(struct module *a, struct module *b) { @@ -1602,7 +1602,7 @@ static struct module *load_module(void __user *umod, mod = (void *)sechdrs[modindex].sh_addr; mod->gpgsig_ok = gpgsig_ok; -#if CONFIG_MODULE_SIG +#ifdef CONFIG_MODULE_SIG if (!mod->gpgsig_ok) add_taint_module(mod, TAINT_UNSIGNED_MODULE); #endif @@ -2172,7 +2172,7 @@ static char *taint_flags(unsigned int taints, char *buf) buf[bx++] = 'P'; if (taints & TAINT_FORCED_MODULE) buf[bx++] = 'F'; -#if CONFIG_MODULE_SIG +#ifdef CONFIG_MODULE_SIG if (taints & TAINT_UNSIGNED_MODULE) buf[bx++] = 'U'; #endif diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 56558b72..a65bcc84 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c @@ -92,7 +92,7 @@ #include #include #include -#include +#include /* * Build xmit assembly blocks diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index ff041f23..1a3466f7 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -81,6 +81,7 @@ #include #include #include +#include #include #include #include -- 2.39.5