Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
authorLinus Torvalds <torvalds@g5.osdl.org>
Wed, 19 Apr 2006 02:49:42 +0000 (19:49 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 19 Apr 2006 02:49:42 +0000 (19:49 -0700)
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (47 commits)
  [MAINTAINERS] The ham radio code now has website at http://www.linux-ax25.org.
  [MIPS] Use __ffs() instead of ffs() for waybit calculation.
  [MIPS] Fix Makefile bugs for MIPS32/MIPS64 R1 and R2.
  [MIPS] Handle IDE PIO cache aliases on SMP.
  [MIPS] Make mips_srs_init static.
  [MIPS] MIPS boards: Set HZ to 100.
  [MIPS] kgdb: Let gcc compute the array size itself.
  [MIPS] FPU affinity for MT ASE.
  [MIPS] MT: Improved multithreading support.
  [MIPS] kpsd and other AP/SP improvements.
  [MIPS] R2: Instruction hazard barrier.
  [MIPS] Fix genrtc compilation.
  [MIPS] R2: Implement shadow register allocation without spinlock.
  [MIPS] Fix VR41xx build errors.
  [MIPS] Fix tx49_blast_icache32_page_indexed.
  [MIPS] Enable SCHED_NO_NO_OMIT_FRAME_POINTER for MIPS.
  [MIPS] Use "R" constraint for cache_op.
  [MIPS] Rewrite all the assembler interrupt handlers to C.
  [MIPS] Fix the crime against humanity that mipsIRQ.S is.
  [MIPS] Fixup damage done by 22a9835c350782a5c3257343713932af3ac92ee0.
  ...

17 files changed:
Documentation/cpu-freq/index.txt
arch/arm/common/scoop.c
arch/arm/mach-pxa/corgi_ssp.c
arch/i386/kernel/cpu/cpufreq/powernow-k8.c
arch/sparc64/Kconfig
drivers/cpufreq/Kconfig
drivers/cpufreq/cpufreq.c
drivers/cpufreq/cpufreq_conservative.c
drivers/pcmcia/pxa2xx_sharpsl.c
include/net/ipv6.h
net/core/filter.c
net/ipv4/ipcomp.c
net/ipv4/tcp_output.c
net/ipv6/exthdrs.c
net/ipv6/ip6_input.c
net/ipv6/xfrm6_policy.c
net/tipc/name_distr.c

index 5009805f9378b6b60a566da9e9644be0dc34acfc..ffdb5323df378b84963e4f91cd1470ff17865b6d 100644 (file)
@@ -53,4 +53,4 @@ the CPUFreq Mailing list:
 * http://lists.linux.org.uk/mailman/listinfo/cpufreq
 
 Clock and voltage scaling for the SA-1100:
-* http://www.lart.tudelft.nl/projects/scaling
+* http://www.lartmaker.nl/projects/scaling
index 5e830f444c6c6b9d8148b7cd34a505f30bdbf294..314ebd3a1d718c60f2d7f16f2f8a5dcb98239681 100644 (file)
 #include <asm/io.h>
 #include <asm/hardware/scoop.h>
 
+/* PCMCIA to Scoop linkage
+
+   There is no easy way to link multiple scoop devices into one
+   single entity for the pxa2xx_pcmcia device so this structure
+   is used which is setup by the platform code.
+
+   This file is never modular so this symbol is always
+   accessile to the board support files.
+*/
+struct scoop_pcmcia_config *platform_scoop_config;
+EXPORT_SYMBOL(platform_scoop_config);
+
 #define SCOOP_REG(d,adr) (*(volatile unsigned short*)(d +(adr)))
 
 struct  scoop_dev {
index b371d723635f38062d907059d5b9622604148f6b..8a25a1c8019f9bf7685f92561f04b1523a851c1a 100644 (file)
@@ -196,12 +196,9 @@ static int __init corgi_ssp_probe(struct platform_device *dev)
        int ret;
 
        /* Chip Select - Disable All */
-       GPDR(ssp_machinfo->cs_lcdcon) |= GPIO_bit(ssp_machinfo->cs_lcdcon); /* output */
-       GPSR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon);  /* High - Disable LCD Control/Timing Gen */
-       GPDR(ssp_machinfo->cs_max1111) |= GPIO_bit(ssp_machinfo->cs_max1111); /* output */
-       GPSR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111);  /* High - Disable MAX1111*/
-       GPDR(ssp_machinfo->cs_ads7846) |= GPIO_bit(ssp_machinfo->cs_ads7846);  /* output */
-       GPSR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846);   /* High - Disable ADS7846*/
+       pxa_gpio_mode(ssp_machinfo->cs_lcdcon  | GPIO_OUT | GPIO_DFLT_HIGH);
+        pxa_gpio_mode(ssp_machinfo->cs_max1111 | GPIO_OUT | GPIO_DFLT_HIGH);
+        pxa_gpio_mode(ssp_machinfo->cs_ads7846 | GPIO_OUT | GPIO_DFLT_HIGH);
 
        ret = ssp_init(&corgi_ssp_dev, ssp_machinfo->port, 0);
 
index 7c0e160a214503e44a8209fc000900e23b5b9010..71fffa17442530949dccf45aa210c2e371188a59 100644 (file)
@@ -905,14 +905,17 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi
 {
        cpumask_t oldmask = CPU_MASK_ALL;
        struct powernow_k8_data *data = powernow_data[pol->cpu];
-       u32 checkfid = data->currfid;
-       u32 checkvid = data->currvid;
+       u32 checkfid;
+       u32 checkvid;
        unsigned int newstate;
        int ret = -EIO;
 
        if (!data)
                return -EINVAL;
 
+       checkfid = data->currfid;
+       checkvid = data->currvid;
+
        /* only run on specific CPU from here on */
        oldmask = current->cpus_allowed;
        set_cpus_allowed(current, cpumask_of_cpu(pol->cpu));
@@ -1106,9 +1109,6 @@ static unsigned int powernowk8_get (unsigned int cpu)
 
        data = powernow_data[first_cpu(cpu_core_map[cpu])];
 
-       if (!data)
-               return -EINVAL;
-
        if (!data)
                return -EINVAL;
 
index 648047a0bce34ed91d7eace9f05b9d4dfedb9e5b..43a66f5407f45b2b5d04666f0f765f2cd287778b 100644 (file)
@@ -187,7 +187,7 @@ config HUGETLB_PAGE_SIZE_512K
        bool "512K"
 
 config HUGETLB_PAGE_SIZE_64K
-       depends on !SPARC64_PAGE_SIZE_4MB && !SPARC64_PAGE_SIZE_512KB && !SPARC64_PAGE_SIZE_64K
+       depends on !SPARC64_PAGE_SIZE_4MB && !SPARC64_PAGE_SIZE_512KB && !SPARC64_PAGE_SIZE_64KB
        bool "64K"
 
 endchoice
index 60c9be99c6d91244f311dccd2837f49e00b14e87..2cc71b66231ec07e81d7221578f040c6fdcaeed0 100644 (file)
@@ -99,7 +99,7 @@ config CPU_FREQ_GOV_USERSPACE
          Enable this cpufreq governor when you either want to set the
          CPU frequency manually or when an userspace program shall
          be able to set the CPU dynamically, like on LART 
-         <http://www.lart.tudelft.nl/>
+         <http://www.lartmaker.nl/>.
 
          For details, take a look at <file:Documentation/cpu-freq/>.
 
index 9b6ae7dc8b8a3a736666568fad41c3b8b567210d..9759d05b1972742b839b4188d0f8fcaf039859a9 100644 (file)
@@ -319,7 +319,6 @@ out:
        }
        return -EINVAL;
 }
-EXPORT_SYMBOL_GPL(cpufreq_parse_governor);
 
 
 /* drivers/base/cpu.c */
@@ -346,6 +345,8 @@ show_one(scaling_min_freq, min);
 show_one(scaling_max_freq, max);
 show_one(scaling_cur_freq, cur);
 
+static int __cpufreq_set_policy(struct cpufreq_policy *data, struct cpufreq_policy *policy);
+
 /**
  * cpufreq_per_cpu_attr_write() / store_##file_name() - sysfs write access
  */
@@ -364,7 +365,10 @@ static ssize_t store_##file_name                                   \
        if (ret != 1)                                                   \
                return -EINVAL;                                         \
                                                                        \
-       ret = cpufreq_set_policy(&new_policy);                          \
+       mutex_lock(&policy->lock);                                      \
+       ret = __cpufreq_set_policy(policy, &new_policy);                \
+       policy->user_policy.object = policy->object;                    \
+       mutex_unlock(&policy->lock);                                    \
                                                                        \
        return ret ? ret : count;                                       \
 }
@@ -420,7 +424,15 @@ static ssize_t store_scaling_governor (struct cpufreq_policy * policy,
        if (cpufreq_parse_governor(str_governor, &new_policy.policy, &new_policy.governor))
                return -EINVAL;
 
-       ret = cpufreq_set_policy(&new_policy);
+       /* Do not use cpufreq_set_policy here or the user_policy.max
+          will be wrongly overridden */
+       mutex_lock(&policy->lock);
+       ret = __cpufreq_set_policy(policy, &new_policy);
+
+       policy->user_policy.policy = policy->policy;
+       policy->user_policy.governor = policy->governor;
+       mutex_unlock(&policy->lock);
+
        return ret ? ret : count;
 }
 
@@ -685,7 +697,7 @@ static int cpufreq_add_dev (struct sys_device * sys_dev)
                if (!cpu_online(j))
                        continue;
 
-               dprintk("CPU already managed, adding link\n");
+               dprintk("CPU %u already managed, adding link\n", j);
                cpufreq_cpu_get(cpu);
                cpu_sys_dev = get_cpu_sysdev(j);
                sysfs_create_link(&cpu_sys_dev->kobj, &policy->kobj,
@@ -695,9 +707,8 @@ static int cpufreq_add_dev (struct sys_device * sys_dev)
        policy->governor = NULL; /* to assure that the starting sequence is
                                  * run in cpufreq_set_policy */
        mutex_unlock(&policy->lock);
-       
+
        /* set default policy */
-       
        ret = cpufreq_set_policy(&new_policy);
        if (ret) {
                dprintk("setting policy failed\n");
@@ -707,7 +718,7 @@ static int cpufreq_add_dev (struct sys_device * sys_dev)
        module_put(cpufreq_driver->owner);
        dprintk("initialization complete\n");
        cpufreq_debug_enable_ratelimit();
-       
+
        return 0;
 
 
index 037f6bf4543c3c29b98e6401d8cb242b85a2f993..e07a35487bde7cf5b713c0c203a4819a537ae901 100644 (file)
@@ -176,8 +176,7 @@ static ssize_t store_up_threshold(struct cpufreq_policy *unused,
        ret = sscanf (buf, "%u", &input);
 
        mutex_lock(&dbs_mutex);
-       if (ret != 1 || input > 100 || input < 0 ||
-                       input <= dbs_tuners_ins.down_threshold) {
+       if (ret != 1 || input > 100 || input <= dbs_tuners_ins.down_threshold) {
                mutex_unlock(&dbs_mutex);
                return -EINVAL;
        }
@@ -196,8 +195,7 @@ static ssize_t store_down_threshold(struct cpufreq_policy *unused,
        ret = sscanf (buf, "%u", &input);
 
        mutex_lock(&dbs_mutex);
-       if (ret != 1 || input > 100 || input < 0 ||
-                       input >= dbs_tuners_ins.up_threshold) {
+       if (ret != 1 || input > 100 || input >= dbs_tuners_ins.up_threshold) {
                mutex_unlock(&dbs_mutex);
                return -EINVAL;
        }
index fd3647368955f1f68aa8dad0f99ed25994b8ed15..b7b9e149c5b9c73278b095ca99a368af8e8eac51 100644 (file)
 #include "soc_common.h"
 
 #define        NO_KEEP_VS 0x0001
-
-/* PCMCIA to Scoop linkage
-
-   There is no easy way to link multiple scoop devices into one
-   single entity for the pxa2xx_pcmcia device so this structure
-   is used which is setup by the platform code
-*/
-struct scoop_pcmcia_config *platform_scoop_config;
 #define SCOOP_DEV platform_scoop_config->devs
 
 static void sharpsl_pcmcia_init_reset(struct soc_pcmcia_socket *skt)
index 6d6f0634ae41294299324005be723d0ac86a1bf0..4abedb8eaece67a43e4a091cca197477c025cc7a 100644 (file)
@@ -230,7 +230,7 @@ extern int                  ip6_ra_control(struct sock *sk, int sel,
                                               void (*destructor)(struct sock *));
 
 
-extern int                     ipv6_parse_hopopts(struct sk_buff *skb, int);
+extern int                     ipv6_parse_hopopts(struct sk_buff *skb);
 
 extern struct ipv6_txoptions *  ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt);
 extern struct ipv6_txoptions * ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt,
index 93fbd01d225952c66228d228a66340101448166a..5b4486a60cf6bca668bf4f5e7232d6df1a37dbb9 100644 (file)
@@ -34,6 +34,7 @@
 #include <linux/timer.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
+#include <asm/unaligned.h>
 #include <linux/filter.h>
 
 /* No hurry in this branch */
@@ -177,7 +178,7 @@ unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int
 load_w:
                        ptr = load_pointer(skb, k, 4, &tmp);
                        if (ptr != NULL) {
-                               A = ntohl(*(u32 *)ptr);
+                               A = ntohl(get_unaligned((u32 *)ptr));
                                continue;
                        }
                        break;
@@ -186,7 +187,7 @@ load_w:
 load_h:
                        ptr = load_pointer(skb, k, 2, &tmp);
                        if (ptr != NULL) {
-                               A = ntohs(*(u16 *)ptr);
+                               A = ntohs(get_unaligned((u16 *)ptr));
                                continue;
                        }
                        break;
index 04a429465665cd8ff0c377eed4d1caf0d40a4a3a..cd810f41af1a71db684a7787bde2bbc8e5d601f7 100644 (file)
@@ -290,11 +290,8 @@ static void ipcomp_free_scratches(void)
        if (!scratches)
                return;
 
-       for_each_possible_cpu(i) {
-               void *scratch = *per_cpu_ptr(scratches, i);
-               if (scratch)
-                       vfree(scratch);
-       }
+       for_each_possible_cpu(i)
+               vfree(*per_cpu_ptr(scratches, i));
 
        free_percpu(scratches);
 }
index b871db6adc55cd838c07b11b4461bc5e879f5377..44df1db726a37bc77c28dda33d5238b9f40a5a8e 100644 (file)
@@ -551,7 +551,9 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss
        buff = sk_stream_alloc_skb(sk, nsize, GFP_ATOMIC);
        if (buff == NULL)
                return -ENOMEM; /* We'll just try again later. */
-       sk_charge_skb(sk, buff);
+
+       buff->truesize = skb->len - len;
+       skb->truesize -= buff->truesize;
 
        /* Correct the sequence numbers. */
        TCP_SKB_CB(buff)->seq = TCP_SKB_CB(skb)->seq + len;
index 2a1e7e45b890ff9eccb841c3271b3b09e52c8305..a18d4256372cf988e66d1feef51507b7163b8103 100644 (file)
@@ -485,15 +485,27 @@ static struct tlvtype_proc tlvprochopopt_lst[] = {
        { -1, }
 };
 
-int ipv6_parse_hopopts(struct sk_buff *skb, int nhoff)
+int ipv6_parse_hopopts(struct sk_buff *skb)
 {
        struct inet6_skb_parm *opt = IP6CB(skb);
 
+       /*
+        * skb->nh.raw is equal to skb->data, and
+        * skb->h.raw - skb->nh.raw is always equal to
+        * sizeof(struct ipv6hdr) by definition of
+        * hop-by-hop options.
+        */
+       if (!pskb_may_pull(skb, sizeof(struct ipv6hdr) + 8) ||
+           !pskb_may_pull(skb, sizeof(struct ipv6hdr) + ((skb->h.raw[1] + 1) << 3))) {
+               kfree_skb(skb);
+               return -1;
+       }
+
        opt->hop = sizeof(struct ipv6hdr);
        if (ip6_parse_tlv(tlvprochopopt_lst, skb)) {
                skb->h.raw += (skb->h.raw[1]+1)<<3;
                opt->nhoff = sizeof(struct ipv6hdr);
-               return sizeof(struct ipv6hdr);
+               return 1;
        }
        return -1;
 }
index 29f73592e68e51304c7c6859c82eb44248e3a3ae..aceee252503dfe84f5ccb34b950949f284577d0a 100644 (file)
@@ -114,11 +114,10 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt
        }
 
        if (hdr->nexthdr == NEXTHDR_HOP) {
-               if (ipv6_parse_hopopts(skb, IP6CB(skb)->nhoff) < 0) {
+               if (ipv6_parse_hopopts(skb) < 0) {
                        IP6_INC_STATS_BH(IPSTATS_MIB_INHDRERRORS);
                        return 0;
                }
-               hdr = skb->nh.ipv6h;
        }
 
        return NF_HOOK(PF_INET6,NF_IP6_PRE_ROUTING, skb, dev, NULL, ip6_rcv_finish);
index 91cce8b2d7a5643b523c55b12758756a0d374aee..88c840f1beb678a373284799dc6f8a693fd89544 100644 (file)
@@ -191,16 +191,18 @@ error:
 static inline void
 _decode_session6(struct sk_buff *skb, struct flowi *fl)
 {
-       u16 offset = sizeof(struct ipv6hdr);
+       u16 offset = skb->h.raw - skb->nh.raw;
        struct ipv6hdr *hdr = skb->nh.ipv6h;
-       struct ipv6_opt_hdr *exthdr = (struct ipv6_opt_hdr*)(skb->nh.raw + offset);
-       u8 nexthdr = skb->nh.ipv6h->nexthdr;
+       struct ipv6_opt_hdr *exthdr;
+       u8 nexthdr = skb->nh.raw[IP6CB(skb)->nhoff];
 
        memset(fl, 0, sizeof(struct flowi));
        ipv6_addr_copy(&fl->fl6_dst, &hdr->daddr);
        ipv6_addr_copy(&fl->fl6_src, &hdr->saddr);
 
        while (pskb_may_pull(skb, skb->nh.raw + offset + 1 - skb->data)) {
+               exthdr = (struct ipv6_opt_hdr*)(skb->nh.raw + offset);
+
                switch (nexthdr) {
                case NEXTHDR_ROUTING:
                case NEXTHDR_HOP:
index 953307a9df1d852c3eac546d9e1d97e728f0df3e..a3bbc891f95997bf7e186607214aedddc7c1d454 100644 (file)
@@ -229,8 +229,7 @@ static void node_is_down(struct publication *publ)
                                     publ->node, publ->ref, publ->key);
         assert(p == publ);
        write_unlock_bh(&tipc_nametbl_lock);
-       if (publ)
-               kfree(publ);
+       kfree(publ);
 }
 
 /**