Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22669
b: refs/heads/master
c: 14778d9
h: refs/heads/master
i:
  22667: 1748baa
v: v3
  • Loading branch information
David S. Miller committed Mar 22, 2006
1 parent 5b8ef34 commit d478cf1
Show file tree
Hide file tree
Showing 279 changed files with 44,883 additions and 38,342 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 36177ba655c238e33400cc2837a28720b62784bd
refs/heads/master: 14778d9072e53d2171f66ffd9657daff41acfaed
2 changes: 1 addition & 1 deletion trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2145,7 +2145,7 @@ S: Maintained

QLOGIC QLA2XXX FC-SCSI DRIVER
P: Andrew Vasquez
M: linux-driver@qlogic.com
M: andrew.vasquez@qlogic.com
L: linux-scsi@vger.kernel.org
S: Supported

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/alpha/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ free_reserved_mem(void *start, void *end)
void *__start = start;
for (; __start < end; __start += PAGE_SIZE) {
ClearPageReserved(virt_to_page(__start));
init_page_count(virt_to_page(__start));
set_page_count(virt_to_page(__start), 1);
free_page((long)__start);
totalram_pages++;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/mm/consistent.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,6 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp,
pte = consistent_pte[idx] + off;
c->vm_pages = page;

split_page(page, order);

/*
* Set the "dma handle"
*/
Expand All @@ -233,6 +231,7 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp,
do {
BUG_ON(!pte_none(*pte));

set_page_count(page, 1);
/*
* x86 does not mark the pages reserved...
*/
Expand All @@ -251,6 +250,7 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp,
* Free the otherwise unused pages.
*/
while (page < end) {
set_page_count(page, 1);
__free_page(page);
page++;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ static inline void free_area(unsigned long addr, unsigned long end, char *s)
for (; addr < end; addr += PAGE_SIZE) {
struct page *page = virt_to_page(addr);
ClearPageReserved(page);
init_page_count(page);
set_page_count(page, 1);
free_page(addr);
totalram_pages++;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm26/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ static inline void free_area(unsigned long addr, unsigned long end, char *s)
for (; addr < end; addr += PAGE_SIZE) {
struct page *page = virt_to_page(addr);
ClearPageReserved(page);
init_page_count(page);
set_page_count(page, 1);
free_page(addr);
totalram_pages++;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/cris/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ free_initmem(void)
addr = (unsigned long)(&__init_begin);
for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) {
ClearPageReserved(virt_to_page(addr));
init_page_count(virt_to_page(addr));
set_page_count(virt_to_page(addr), 1);
free_page(addr);
totalram_pages++;
}
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/frv/kernel/frv_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ EXPORT_SYMBOL(__ioremap);
EXPORT_SYMBOL(iounmap);

EXPORT_SYMBOL(strnlen);
EXPORT_SYMBOL(strpbrk);
EXPORT_SYMBOL(strrchr);
EXPORT_SYMBOL(strstr);
EXPORT_SYMBOL(strchr);
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/frv/mm/dma-alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *dma_handle)
*/
if (order > 0) {
struct page *rpage = virt_to_page(page);
split_page(rpage, order);

for (i = 1; i < (1 << order); i++)
set_page_count(rpage + i, 1);
}

err = 0;
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/frv/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ void __init mem_init(void)
struct page *page = &mem_map[pfn];

ClearPageReserved(page);
init_page_count(page);
set_page_count(page, 1);
__free_page(page);
totalram_pages++;
}
Expand Down Expand Up @@ -210,7 +210,7 @@ void __init free_initmem(void)
/* next to check that the page we free is not a partial page */
for (addr = start; addr < end; addr += PAGE_SIZE) {
ClearPageReserved(virt_to_page(addr));
init_page_count(virt_to_page(addr));
set_page_count(virt_to_page(addr), 1);
free_page(addr);
totalram_pages++;
}
Expand All @@ -230,7 +230,7 @@ void __init free_initrd_mem(unsigned long start, unsigned long end)
int pages = 0;
for (; start < end; start += PAGE_SIZE) {
ClearPageReserved(virt_to_page(start));
init_page_count(virt_to_page(start));
set_page_count(virt_to_page(start), 1);
free_page(start);
totalram_pages++;
pages++;
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/h8300/kernel/h8300_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ extern char h8300_debug_device[];
/* platform dependent support */

EXPORT_SYMBOL(strnlen);
EXPORT_SYMBOL(strpbrk);
EXPORT_SYMBOL(strrchr);
EXPORT_SYMBOL(strstr);
EXPORT_SYMBOL(strchr);
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/h8300/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ void free_initrd_mem(unsigned long start, unsigned long end)
int pages = 0;
for (; start < end; start += PAGE_SIZE) {
ClearPageReserved(virt_to_page(start));
init_page_count(virt_to_page(start));
set_page_count(virt_to_page(start), 1);
free_page(start);
totalram_pages++;
pages++;
Expand All @@ -219,7 +219,7 @@ free_initmem()
/* next to check that the page we free is not a partial page */
for (; addr + PAGE_SIZE < (unsigned long)(&__init_end); addr +=PAGE_SIZE) {
ClearPageReserved(virt_to_page(addr));
init_page_count(virt_to_page(addr));
set_page_count(virt_to_page(addr), 1);
free_page(addr);
totalram_pages++;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/i386/kernel/efi.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ static void efi_call_phys_epilog(void)
unsigned long cr4;
struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, 0);

cpu_gdt_descr->address = (unsigned long)__va(cpu_gdt_descr->address);
cpu_gdt_descr->address = __va(cpu_gdt_descr->address);
load_gdt(cpu_gdt_descr);

cr4 = read_cr4();
Expand Down
28 changes: 16 additions & 12 deletions trunk/arch/i386/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,23 +504,27 @@ void unlock_ipi_call_lock(void)
spin_unlock_irq(&call_lock);
}

static struct call_data_struct *call_data;

/**
* smp_call_function(): Run a function on all other CPUs.
* @func: The function to run. This must be fast and non-blocking.
* @info: An arbitrary pointer to pass to the function.
* @nonatomic: currently unused.
* @wait: If true, wait (atomically) until function has completed on other CPUs.
*
* Returns 0 on success, else a negative status code. Does not return until
static struct call_data_struct * call_data;

/*
* this function sends a 'generic call function' IPI to all other CPUs
* in the system.
*/

int smp_call_function (void (*func) (void *info), void *info, int nonatomic,
int wait)
/*
* [SUMMARY] Run a function on all other CPUs.
* <func> The function to run. This must be fast and non-blocking.
* <info> An arbitrary pointer to pass to the function.
* <nonatomic> currently unused.
* <wait> If true, wait (atomically) until function has completed on other CPUs.
* [RETURNS] 0 on success, else a negative status code. Does not return until
* remote CPUs are nearly ready to execute <<func>> or are or have executed.
*
* You must not call this function with disabled interrupts or from a
* hardware interrupt handler or from a bottom half handler.
*/
int smp_call_function (void (*func) (void *info), void *info, int nonatomic,
int wait)
{
struct call_data_struct data;
int cpus;
Expand Down
25 changes: 16 additions & 9 deletions trunk/arch/i386/kernel/sys_i386.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@ asmlinkage int sys_pipe(unsigned long __user * fildes)
return error;
}

asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags,
unsigned long fd, unsigned long pgoff)
/* common code for old and new mmaps */
static inline long do_mmap2(
unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags,
unsigned long fd, unsigned long pgoff)
{
int error = -EBADF;
struct file *file = NULL;
struct mm_struct *mm = current->mm;
struct file * file = NULL;

flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
if (!(flags & MAP_ANONYMOUS)) {
Expand All @@ -55,16 +56,23 @@ asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
goto out;
}

down_write(&mm->mmap_sem);
down_write(&current->mm->mmap_sem);
error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
up_write(&mm->mmap_sem);
up_write(&current->mm->mmap_sem);

if (file)
fput(file);
out:
return error;
}

asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags,
unsigned long fd, unsigned long pgoff)
{
return do_mmap2(addr, len, prot, flags, fd, pgoff);
}

/*
* Perform the select(nd, in, out, ex, tv) and mmap() system
* calls. Linux/i386 didn't use to be able to handle more than
Expand Down Expand Up @@ -93,8 +101,7 @@ asmlinkage int old_mmap(struct mmap_arg_struct __user *arg)
if (a.offset & ~PAGE_MASK)
goto out;

err = sys_mmap2(a.addr, a.len, a.prot, a.flags,
a.fd, a.offset >> PAGE_SHIFT);
err = do_mmap2(a.addr, a.len, a.prot, a.flags, a.fd, a.offset >> PAGE_SHIFT);
out:
return err;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/i386/kernel/timers/timer_hpet.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static seqlock_t monotonic_lock = SEQLOCK_UNLOCKED;
*
* -johnstul@us.ibm.com "math is hard, lets go shopping!"
*/
static unsigned long cyc2ns_scale __read_mostly;
static unsigned long cyc2ns_scale;
#define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */

static inline void set_cyc2ns_scale(unsigned long cpu_khz)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/i386/kernel/timers/timer_tsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ late_initcall(start_lost_tick_compensation);
*
* -johnstul@us.ibm.com "math is hard, lets go shopping!"
*/
static unsigned long cyc2ns_scale __read_mostly;
static unsigned long cyc2ns_scale;
#define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */

static inline void set_cyc2ns_scale(unsigned long cpu_khz)
Expand Down
12 changes: 12 additions & 0 deletions trunk/arch/i386/mm/hugetlbpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr)
return (pte_t *) pmd;
}

/*
* This function checks for proper alignment of input addr and len parameters.
*/
int is_aligned_hugepage_range(unsigned long addr, unsigned long len)
{
if (len & ~HPAGE_MASK)
return -EINVAL;
if (addr & ~HPAGE_MASK)
return -EINVAL;
return 0;
}

#if 0 /* This is just for testing */
struct page *
follow_huge_addr(struct mm_struct *mm, unsigned long address, int write)
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/i386/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ static void __init permanent_kmaps_init(pgd_t *pgd_base)

static void __meminit free_new_highpage(struct page *page)
{
init_page_count(page);
set_page_count(page, 1);
__free_page(page);
totalhigh_pages++;
}
Expand Down Expand Up @@ -727,7 +727,7 @@ void free_initmem(void)
addr = (unsigned long)(&__init_begin);
for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) {
ClearPageReserved(virt_to_page(addr));
init_page_count(virt_to_page(addr));
set_page_count(virt_to_page(addr), 1);
memset((void *)addr, 0xcc, PAGE_SIZE);
free_page(addr);
totalram_pages++;
Expand Down Expand Up @@ -766,7 +766,7 @@ void free_initrd_mem(unsigned long start, unsigned long end)
printk (KERN_INFO "Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
for (; start < end; start += PAGE_SIZE) {
ClearPageReserved(virt_to_page(start));
init_page_count(virt_to_page(start));
set_page_count(virt_to_page(start), 1);
free_page(start);
totalram_pages++;
}
Expand Down
20 changes: 7 additions & 13 deletions trunk/arch/i386/mm/pageattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@ static struct page *split_large_page(unsigned long address, pgprot_t prot,
if (!base)
return NULL;

/*
* page_private is used to track the number of entries in
* the page table page that have non standard attributes.
*/
SetPagePrivate(base);
page_private(base) = 0;

address = __pa(address);
addr = address & LARGE_PAGE_MASK;
pbase = (pte_t *)page_address(base);
Expand Down Expand Up @@ -150,12 +143,11 @@ __change_page_attr(struct page *page, pgprot_t prot)
return -ENOMEM;
set_pmd_pte(kpte,address,mk_pte(split, ref_prot));
kpte_page = split;
}
page_private(kpte_page)++;
}
get_page(kpte_page);
} else if ((pte_val(*kpte) & _PAGE_PSE) == 0) {
set_pte_atomic(kpte, mk_pte(page, PAGE_KERNEL));
BUG_ON(page_private(kpte_page) == 0);
page_private(kpte_page)--;
__put_page(kpte_page);
} else
BUG();

Expand All @@ -165,8 +157,10 @@ __change_page_attr(struct page *page, pgprot_t prot)
* replace it with a largepage.
*/
if (!PageReserved(kpte_page)) {
if (cpu_has_pse && (page_private(kpte_page) == 0)) {
ClearPagePrivate(kpte_page);
/* memleak and potential failed 2M page regeneration */
BUG_ON(!page_count(kpte_page));

if (cpu_has_pse && (page_count(kpte_page) == 1)) {
list_add(&kpte_page->lru, &df_list);
revert_page(kpte_page, address);
}
Expand Down
5 changes: 2 additions & 3 deletions trunk/arch/ia64/mm/hugetlbpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,9 @@ huge_pte_offset (struct mm_struct *mm, unsigned long addr)
#define mk_pte_huge(entry) { pte_val(entry) |= _PAGE_P; }

/*
* Don't actually need to do any preparation, but need to make sure
* the address is in the right region.
* This function checks for proper alignment of input addr and len parameters.
*/
int prepare_hugepage_range(unsigned long addr, unsigned long len)
int is_aligned_hugepage_range(unsigned long addr, unsigned long len)
{
if (len & ~HPAGE_MASK)
return -EINVAL;
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/ia64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ free_initmem (void)
eaddr = (unsigned long) ia64_imva(__init_end);
while (addr < eaddr) {
ClearPageReserved(virt_to_page(addr));
init_page_count(virt_to_page(addr));
set_page_count(virt_to_page(addr), 1);
free_page(addr);
++totalram_pages;
addr += PAGE_SIZE;
Expand Down Expand Up @@ -252,7 +252,7 @@ free_initrd_mem (unsigned long start, unsigned long end)
continue;
page = virt_to_page(start);
ClearPageReserved(page);
init_page_count(page);
set_page_count(page, 1);
free_page(start);
++totalram_pages;
}
Expand Down Expand Up @@ -640,7 +640,7 @@ mem_init (void)
void online_page(struct page *page)
{
ClearPageReserved(page);
init_page_count(page);
set_page_count(page, 1);
__free_page(page);
totalram_pages++;
num_physpages++;
Expand Down
Loading

0 comments on commit d478cf1

Please sign in to comment.