Commit 26af245f authored by Anton Blanchard's avatar Anton Blanchard

Merge samba.org:/scratch/anton/linux-2.5_ppc64_Makefilecleanup

into samba.org:/scratch/anton/linux-2.5_ppc64_new
parents 51fc6594 b67c0d12
......@@ -90,7 +90,9 @@ _STATIC(__start)
* between physical addresses and absolute addresses) and
* to the pidhash table (also used by the debugger) */
.llong msChunks-KERNELBASE
#ifdef CONFIG_PPC_ISERIES
.llong pidhash-KERNELBASE
#endif
/* Offset 0x38 - Pointer to start of embedded System.map */
.globl embedded_sysmap_start
......
......@@ -213,7 +213,7 @@ asmlinkage long sys32_readv(u32 fd, struct iovec32 *vector, u32 count)
goto bad_file;
if (file->f_op && (file->f_mode & FMODE_READ) &&
(file->f_op->readv || file->f_op->read))
(file->f_op->readv || file->f_op->read))
ret = do_readv_writev32(VERIFY_WRITE, file, vector, count);
fput(file);
......@@ -238,8 +238,6 @@ asmlinkage long sys32_writev(u32 fd, struct iovec32 *vector, u32 count)
return ret;
}
static inline int get_flock(struct flock *kfl, struct flock32 *ufl)
{
int err;
......@@ -656,8 +654,8 @@ asmlinkage long sys32_select(int n, u32 *inp, u32 *outp, u32 *exp, u32 tvp_x)
char *bits;
unsigned long nn;
long timeout;
int ret, size;
int ret, size, max_fdset;
timeout = MAX_SCHEDULE_TIMEOUT;
if (tvp) {
time_t sec, usec;
......@@ -679,8 +677,11 @@ asmlinkage long sys32_select(int n, u32 *inp, u32 *outp, u32 *exp, u32 tvp_x)
ret = -EINVAL;
if (n < 0)
goto out_nofds;
if (n > current->files->max_fdset)
n = current->files->max_fdset;
/* max_fdset can increase, so grab it once to avoid race */
max_fdset = current->files->max_fdset;
if (n > max_fdset)
n = max_fdset;
/*
* We need 6 bitmaps (in/out/ex for both incoming and outgoing),
......
......@@ -469,11 +469,6 @@ void __init time_init(void)
last_rtc_update = xtime.tv_sec;
write_unlock_irqrestore(&xtime_lock, flags);
#ifdef CONFIG_PPC_ISERIES
/* HACK HACK This allows the iSeries profiling to use /proc/profile */
prof_shift = 0;
#endif
/* Not exact, but the timer interrupt takes care of this */
set_dec(tb_ticks_per_jiffy);
}
......
......@@ -99,23 +99,26 @@ mmu_gather_t mmu_gathers[NR_CPUS];
void show_mem(void)
{
int pfn, total = 0, reserved = 0;
int total = 0, reserved = 0;
int shared = 0, cached = 0;
struct page *page;
pg_data_t *pgdat;
unsigned long i;
printk("Mem-info:\n");
show_free_areas();
printk("Free swap: %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
pfn = max_mapnr;
while (pfn-- > 0) {
page = pfn_to_page(pfn);
total++;
if (PageReserved(page))
reserved++;
else if (PageSwapCache(page))
cached++;
else if (page_count(page))
shared += page_count(page) - 1;
for_each_pgdat(pgdat) {
for (i = 0; i < pgdat->node_size; i++) {
page = pgdat->node_mem_map + i;
total++;
if (PageReserved(page))
reserved++;
else if (PageSwapCache(page))
cached++;
else if (page_count(page))
shared += page_count(page) - 1;
}
}
printk("%d pages of RAM\n",total);
printk("%d reserved pages\n",reserved);
......@@ -498,13 +501,6 @@ void __init paging_init(void)
}
#endif
extern unsigned long prof_shift;
extern unsigned long prof_len;
extern unsigned int * prof_buffer;
extern unsigned long dprof_shift;
extern unsigned long dprof_len;
extern unsigned int * dprof_buffer;
void initialize_paca_hardware_interrupt_stack(void);
void __init mem_init(void)
......@@ -518,9 +514,8 @@ void __init mem_init(void)
int datapages = 0;
int initpages = 0;
max_mapnr = max_low_pfn;
num_physpages = max_low_pfn; /* RAM is assumed contiguous */
high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
num_physpages = max_mapnr; /* RAM is assumed contiguous */
max_pfn = max_low_pfn;
#ifdef CONFIG_DISCONTIGMEM
......@@ -542,6 +537,8 @@ void __init mem_init(void)
PAGE_OFFSET, (unsigned long)__va(lmb_end_of_DRAM()));
}
#else
max_mapnr = num_physpages;
totalram_pages += free_all_bootmem();
if ( sysmap_size )
......@@ -577,10 +574,6 @@ void __init mem_init(void)
#ifdef CONFIG_PPC_ISERIES
create_virtual_bus_tce_table();
/* HACK HACK This allows the iSeries profiling to use /proc/profile */
prof_shift = dprof_shift;
prof_len = dprof_len;
prof_buffer = dprof_buffer;
#endif
}
......
......@@ -8,6 +8,7 @@
#define _ASM_MMZONE_H_
#include <linux/config.h>
#include <asm/smp.h>
#ifdef CONFIG_DISCONTIGMEM
......@@ -21,7 +22,6 @@ extern int numa_node_exists[];
extern int numa_cpu_lookup_table[];
extern int numa_memory_lookup_table[];
#define MAX_NUMNODES 16
#define MAX_MEMORY (1UL << 41)
/* 256MB regions */
#define MEMORY_INCREMENT_SHIFT 28
......@@ -53,7 +53,6 @@ static inline int pa_to_nid(unsigned long pa)
*/
#define NODE_DATA(nid) (&node_data[nid])
#define node_startnr(nid) (NODE_DATA(nid)->node_start_mapnr)
#define node_size(nid) (NODE_DATA(nid)->node_size)
#define node_localnr(pfn, nid) ((pfn) - NODE_DATA(nid)->node_start_pfn)
......@@ -87,6 +86,7 @@ static inline int __cpu_to_node(int cpu)
#define node_mem_map(nid) (NODE_DATA(nid)->node_mem_map)
#define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn)
#define node_end_pfn(nid) (NODE_DATA(nid)->node_end_pfn)
#define local_mapnr(kvaddr) \
( (__pa(kvaddr) >> PAGE_SHIFT) - node_start_pfn(kvaddr_to_nid(kvaddr))
......@@ -112,5 +112,8 @@ static inline int __cpu_to_node(int cpu)
page_zone(__tmp)->zone_start_pfn); \
})
/* XXX fix for discontiguous physical memory */
#define discontigmem_pfn_valid(pfn) ((pfn) < num_physpages)
#endif /* CONFIG_DISCONTIGMEM */
#endif /* _ASM_MMZONE_H_ */
#ifndef _ASM_MAX_NUMNODES_H
#define _ASM_MAX_NUMNODES_H
#define MAX_NUMNODES 16
#endif /* _ASM_MAX_NUMNODES_H */
......@@ -207,13 +207,15 @@ static inline int get_order(unsigned long size)
#ifdef CONFIG_DISCONTIGMEM
#define page_to_pfn(page) discontigmem_page_to_pfn(page)
#define pfn_to_page(pfn) discontigmem_pfn_to_page(pfn)
#define pfn_valid(pfn) discontigmem_pfn_valid(pfn)
#else
#define pfn_to_page(pfn) (mem_map + (pfn))
#define page_to_pfn(page) ((unsigned long)((page) - mem_map))
#define pfn_valid(pfn) ((pfn) < max_mapnr)
#endif
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
#define pfn_valid(pfn) ((pfn) < max_mapnr)
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
......
......@@ -35,12 +35,7 @@
#define PTRS_PER_PMD (1 << PMD_INDEX_SIZE)
#define PTRS_PER_PGD (1 << PGD_INDEX_SIZE)
#if 0
/* DRENG / PPPBBB This is a compiler bug!!! */
#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)
#else
#define USER_PTRS_PER_PGD (1024)
#endif
#define USER_PTRS_PER_PGD (TASK_SIZE_USER64 / PGDIR_SIZE)
#define FIRST_USER_PGD_NR 0
#define EADDR_SIZE (PTE_INDEX_SIZE + PMD_INDEX_SIZE + \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment