~ubuntu-branches/ubuntu/lucid/linux-ec2/lucid-updates

« back to all changes in this revision

Viewing changes to mm/percpu.c

  • Committer: Package Import Robot
  • Author(s): Stefan Bader, Stefan Bader, Ubuntu: 2.6.32-38.83, Ubuntu: 2.6.32-38.82
  • Date: 2012-01-04 17:57:42 UTC
  • Revision ID: package-import@ubuntu.com-20120104175742-d8r2jwn08jq6sv5e
Tags: 2.6.32-342.43
[ Stefan Bader ]

* Rebased to Ubuntu-2.6.32-38.83
* XEN: x86/mpparse: Account for bus types other than ISA and PCI
  - LP: #902317
* Release Tracking Bug
  - LP: #911230

[ Ubuntu: 2.6.32-38.83 ]

* Revert "clockevents: Set noop handler in clockevents_exchange_device()"
  - LP: #911392
* Linux 2.6.32.52
  - LP: #911392

[ Ubuntu: 2.6.32-38.82 ]

* SAUCE: netns: Add quota for number of NET_NS instances.
* [Config] CONFIG_NET_NS=y
  - LP: #790863
* Revert "core: Fix memory leak/corruption on VLAN GRO_DROP,
  CVE-2011-1576"
* hfs: fix hfs_find_init() sb->ext_tree NULL ptr oops, CVE-2011-2203
  - LP: #899466
  - CVE-2011-2203
* net: ipv4: relax AF_INET check in bind()
  - LP: #900396
* KEYS: Fix a NULL pointer deref in the user-defined key type,
  CVE-2011-4110
  - LP: #894369
  - CVE-2011-4110
* i2c-algo-bit: Generate correct i2c address sequence for 10-bit target
  - LP: #902317
* eCryptfs: Extend array bounds for all filename chars
  - LP: #902317
* PCI hotplug: shpchp: don't blindly claim non-AMD 0x7450 device IDs
  - LP: #902317
* ARM: 7161/1: errata: no automatic store buffer drain
  - LP: #902317
* ALSA: lx6464es - fix device communication via command bus
  - LP: #902317
* SUNRPC: Ensure we return EAGAIN in xs_nospace if congestion is cleared
  - LP: #902317
* timekeeping: add arch_offset hook to ktime_get functions
  - LP: #902317
* p54spi: Add missing spin_lock_init
  - LP: #902317
* p54spi: Fix workqueue deadlock
  - LP: #902317
* nl80211: fix MAC address validation
  - LP: #902317
* gro: reset vlan_tci on reuse
  - LP: #902317
* staging: usbip: bugfix for deadlock
  - LP: #902317
* staging: comedi: fix oops for USB DAQ devices.
  - LP: #902317
* Staging: comedi: fix signal handling in read and write
  - LP: #902317
* USB: whci-hcd: fix endian conversion in qset_clear()
  - LP: #902317
* usb: ftdi_sio: add PID for Propox ISPcable III
  - LP: #902317
* usb: option: add SIMCom SIM5218
  - LP: #902317
* USB: usb-storage: unusual_devs entry for Kingston DT 101 G2
  - LP: #902317
* SCSI: scsi_lib: fix potential NULL dereference
  - LP: #902317
* SCSI: Silencing 'killing requests for dead queue'
  - LP: #902317
* cifs: fix cifs stable patch cifs-fix-oplock-break-handling-try-2.patch
  - LP: #902317
* sched, x86: Avoid unnecessary overflow in sched_clock
  - LP: #902317
* x86/mpparse: Account for bus types other than ISA and PCI
  - LP: #902317
* oprofile, x86: Fix crash when unloading module (nmi timer mode)
  - LP: #902317
* genirq: Fix race condition when stopping the irq thread
  - LP: #902317
* tick-broadcast: Stop active broadcast device when replacing it
  - LP: #902317
* clockevents: Set noop handler in clockevents_exchange_device()
  - LP: #902317
* Linux 2.6.32.50
  - LP: #902317
* nfsd4: permit read opens of executable-only files
  - LP: #833300
* ipv6: Allow inet6_dump_addr() to handle more than 64 addresses
  - LP: #863394
* ALSA: sis7019 - give slow codecs more time to reset
  - LP: #907774
* ALSA: hda/realtek - Fix Oops in alc_mux_select()
  - LP: #907774
* ARM: davinci: dm646x evm: wrong register used in
  setup_vpif_input_channel_mode
  - LP: #907774
* oprofile: Free potentially owned tasks in case of errors
  - LP: #907774
* oprofile: Fix locking dependency in sync_start()
  - LP: #907774
* percpu: fix chunk range calculation
  - LP: #907774
* xfrm: Fix key lengths for rfc3686(ctr(aes))
  - LP: #907774
* linux/log2.h: Fix rounddown_pow_of_two(1)
  - LP: #907774
* jbd/jbd2: validate sb->s_first in journal_get_superblock()
  - LP: #907774
* hfs: fix hfs_find_init() sb->ext_tree NULL ptr oops
  - LP: #907774
* export __get_user_pages_fast() function
  - LP: #907774
* oprofile, x86: Fix nmi-unsafe callgraph support
  - LP: #907774
* oprofile, x86: Fix crash when unloading module (timer mode)
  - LP: #907774
* ext4: avoid hangs in ext4_da_should_update_i_disksize()
  - LP: #907774
* USB: cdc-acm: add IDs for Motorola H24 HSPA USB module.
  - LP: #907774
* Linux 2.6.32.51
  - LP: #907774

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
static int pcpu_nr_slots __read_mostly;
111
111
static size_t pcpu_chunk_struct_size __read_mostly;
112
112
 
113
 
/* cpus with the lowest and highest unit numbers */
114
 
static unsigned int pcpu_first_unit_cpu __read_mostly;
115
 
static unsigned int pcpu_last_unit_cpu __read_mostly;
 
113
/* cpus with the lowest and highest unit addresses */
 
114
static unsigned int pcpu_low_unit_cpu __read_mostly;
 
115
static unsigned int pcpu_high_unit_cpu __read_mostly;
116
116
 
117
117
/* the address of the first chunk which starts with the kernel static area */
118
118
void *pcpu_base_addr __read_mostly;
746
746
                                 int page_start, int page_end)
747
747
{
748
748
        flush_cache_vunmap(
749
 
                pcpu_chunk_addr(chunk, pcpu_first_unit_cpu, page_start),
750
 
                pcpu_chunk_addr(chunk, pcpu_last_unit_cpu, page_end));
 
749
                pcpu_chunk_addr(chunk, pcpu_low_unit_cpu, page_start),
 
750
                pcpu_chunk_addr(chunk, pcpu_high_unit_cpu, page_end));
751
751
}
752
752
 
753
753
static void __pcpu_unmap_pages(unsigned long addr, int nr_pages)
809
809
                                      int page_start, int page_end)
810
810
{
811
811
        flush_tlb_kernel_range(
812
 
                pcpu_chunk_addr(chunk, pcpu_first_unit_cpu, page_start),
813
 
                pcpu_chunk_addr(chunk, pcpu_last_unit_cpu, page_end));
 
812
                pcpu_chunk_addr(chunk, pcpu_low_unit_cpu, page_start),
 
813
                pcpu_chunk_addr(chunk, pcpu_high_unit_cpu, page_end));
814
814
}
815
815
 
816
816
static int __pcpu_map_pages(unsigned long addr, struct page **pages,
887
887
                                int page_start, int page_end)
888
888
{
889
889
        flush_cache_vmap(
890
 
                pcpu_chunk_addr(chunk, pcpu_first_unit_cpu, page_start),
891
 
                pcpu_chunk_addr(chunk, pcpu_last_unit_cpu, page_end));
 
890
                pcpu_chunk_addr(chunk, pcpu_low_unit_cpu, page_start),
 
891
                pcpu_chunk_addr(chunk, pcpu_high_unit_cpu, page_end));
892
892
}
893
893
 
894
894
/**
1680
1680
 
1681
1681
        for (cpu = 0; cpu < nr_cpu_ids; cpu++)
1682
1682
                unit_map[cpu] = UINT_MAX;
1683
 
        pcpu_first_unit_cpu = NR_CPUS;
 
1683
 
 
1684
        pcpu_low_unit_cpu = NR_CPUS;
 
1685
        pcpu_high_unit_cpu = NR_CPUS;
1684
1686
 
1685
1687
        for (group = 0, unit = 0; group < ai->nr_groups; group++, unit += i) {
1686
1688
                const struct pcpu_group_info *gi = &ai->groups[group];
1700
1702
                        unit_map[cpu] = unit + i;
1701
1703
                        unit_off[cpu] = gi->base_offset + i * ai->unit_size;
1702
1704
 
1703
 
                        if (pcpu_first_unit_cpu == NR_CPUS)
1704
 
                                pcpu_first_unit_cpu = cpu;
1705
 
                        pcpu_last_unit_cpu = cpu;
 
1705
                        /* determine low/high unit_cpu */
 
1706
                        if (pcpu_low_unit_cpu == NR_CPUS ||
 
1707
                            unit_off[cpu] < unit_off[pcpu_low_unit_cpu])
 
1708
                                pcpu_low_unit_cpu = cpu;
 
1709
                        if (pcpu_high_unit_cpu == NR_CPUS ||
 
1710
                            unit_off[cpu] > unit_off[pcpu_high_unit_cpu])
 
1711
                                pcpu_high_unit_cpu = cpu;
1706
1712
                }
1707
1713
        }
1708
1714
        pcpu_nr_units = unit;