Commit 31d22703 authored by David S. Miller's avatar David S. Miller

Merge nuts.ninka.net:/disk1/davem/BK/sparcwork-2.6

into nuts.ninka.net:/disk1/davem/BK/sparc-2.6
parents 0c8ad9d0 6952db3d
...@@ -540,6 +540,13 @@ config MAGIC_SYSRQ ...@@ -540,6 +540,13 @@ config MAGIC_SYSRQ
config DEBUG_SPINLOCK config DEBUG_SPINLOCK
bool "Spinlock debugging" bool "Spinlock debugging"
config DEBUG_HIGHMEM
bool "Highmem debugging"
depends on DEBUG_KERNEL && HIGHMEM
help
This options enables addition error checking for high memory systems.
Disable for production systems.
config DEBUG_SPINLOCK_SLEEP config DEBUG_SPINLOCK_SLEEP
bool "Sleep-inside-spinlock checking" bool "Sleep-inside-spinlock checking"
help help
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#define ELEMENTS(arr) (sizeof (arr)/sizeof (arr[0])) #define ELEMENTS(arr) (sizeof (arr)/sizeof (arr[0]))
extern struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS]; extern struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS+1];
extern int prom_node_root; extern int prom_node_root;
/* At boot time we determine these two values necessary for setting /* At boot time we determine these two values necessary for setting
...@@ -72,7 +72,7 @@ int prom_probe_memory (void) ...@@ -72,7 +72,7 @@ int prom_probe_memory (void)
mlist = mlist->theres_more; mlist = mlist->theres_more;
bytes = mlist->num_bytes; bytes = mlist->num_bytes;
tally += bytes; tally += bytes;
if (i >= SPARC_PHYS_BANKS-1) { if (i > SPARC_PHYS_BANKS-1) {
printk ("The machine has more banks than " printk ("The machine has more banks than "
"this kernel can support\n" "this kernel can support\n"
"Increase the SPARC_PHYS_BANKS " "Increase the SPARC_PHYS_BANKS "
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <asm/fixmap.h>
void *kmap_atomic(struct page *page, enum km_type type) void *kmap_atomic(struct page *page, enum km_type type)
{ {
...@@ -39,7 +40,7 @@ void *kmap_atomic(struct page *page, enum km_type type) ...@@ -39,7 +40,7 @@ void *kmap_atomic(struct page *page, enum km_type type)
return page_address(page); return page_address(page);
idx = type + KM_TYPE_NR*smp_processor_id(); idx = type + KM_TYPE_NR*smp_processor_id();
vaddr = fix_kmap_begin + idx * PAGE_SIZE; vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
/* XXX Fix - Anton */ /* XXX Fix - Anton */
#if 0 #if 0
...@@ -48,11 +49,10 @@ void *kmap_atomic(struct page *page, enum km_type type) ...@@ -48,11 +49,10 @@ void *kmap_atomic(struct page *page, enum km_type type)
flush_cache_all(); flush_cache_all();
#endif #endif
#if HIGHMEM_DEBUG #ifdef CONFIG_DEBUG_HIGHMEM
if (!pte_none(*(kmap_pte+idx))) BUG_ON(!pte_none(*(kmap_pte-idx)));
BUG();
#endif #endif
set_pte(kmap_pte+idx, mk_pte(page, kmap_prot)); set_pte(kmap_pte-idx, mk_pte(page, kmap_prot));
/* XXX Fix - Anton */ /* XXX Fix - Anton */
#if 0 #if 0
__flush_tlb_one(vaddr); __flush_tlb_one(vaddr);
...@@ -65,17 +65,17 @@ void *kmap_atomic(struct page *page, enum km_type type) ...@@ -65,17 +65,17 @@ void *kmap_atomic(struct page *page, enum km_type type)
void kunmap_atomic(void *kvaddr, enum km_type type) void kunmap_atomic(void *kvaddr, enum km_type type)
{ {
unsigned long vaddr = (unsigned long) kvaddr; #ifdef CONFIG_DEBUG_HIGHMEM
unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK;
unsigned long idx = type + KM_TYPE_NR*smp_processor_id(); unsigned long idx = type + KM_TYPE_NR*smp_processor_id();
if (vaddr < fix_kmap_begin) { // FIXME if (vaddr < FIXADDR_START) { // FIXME
dec_preempt_count(); dec_preempt_count();
preempt_check_resched(); preempt_check_resched();
return; return;
} }
if (vaddr != fix_kmap_begin + idx * PAGE_SIZE) BUG_ON(vaddr != __fix_to_virt(FIX_KMAP_BEGIN+idx));
BUG();
/* XXX Fix - Anton */ /* XXX Fix - Anton */
#if 0 #if 0
...@@ -84,12 +84,11 @@ void kunmap_atomic(void *kvaddr, enum km_type type) ...@@ -84,12 +84,11 @@ void kunmap_atomic(void *kvaddr, enum km_type type)
flush_cache_all(); flush_cache_all();
#endif #endif
#ifdef HIGHMEM_DEBUG
/* /*
* force other mappings to Oops if they'll try to access * force other mappings to Oops if they'll try to access
* this pte without first remap it * this pte without first remap it
*/ */
pte_clear(kmap_pte+idx); pte_clear(kmap_pte-idx);
/* XXX Fix - Anton */ /* XXX Fix - Anton */
#if 0 #if 0
__flush_tlb_one(vaddr); __flush_tlb_one(vaddr);
...@@ -97,6 +96,25 @@ void kunmap_atomic(void *kvaddr, enum km_type type) ...@@ -97,6 +96,25 @@ void kunmap_atomic(void *kvaddr, enum km_type type)
flush_tlb_all(); flush_tlb_all();
#endif #endif
#endif #endif
dec_preempt_count(); dec_preempt_count();
preempt_check_resched(); preempt_check_resched();
} }
/* We may be fed a pagetable here by ptep_to_xxx and others. */
struct page *kmap_atomic_to_page(void *ptr)
{
unsigned long idx, vaddr = (unsigned long)ptr;
pte_t *pte;
if (vaddr < SRMMU_NOCACHE_VADDR)
return virt_to_page(ptr);
if (vaddr < PKMAP_BASE)
return pfn_to_page(__nocache_pa(vaddr) >> PAGE_SHIFT);
BUG_ON(vaddr < FIXADDR_START);
BUG_ON(vaddr > FIXADDR_TOP);
idx = virt_to_fix(vaddr);
pte = kmap_pte - (idx - FIX_KMAP_BEGIN);
return pte_page(*pte);
}
...@@ -41,7 +41,7 @@ unsigned long phys_base; ...@@ -41,7 +41,7 @@ unsigned long phys_base;
unsigned long page_kernel; unsigned long page_kernel;
struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS]; struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS+1];
unsigned long sparc_unmapped_base; unsigned long sparc_unmapped_base;
struct pgtable_cache_struct pgt_quicklists; struct pgtable_cache_struct pgt_quicklists;
...@@ -61,17 +61,13 @@ pgprot_t kmap_prot; ...@@ -61,17 +61,13 @@ pgprot_t kmap_prot;
EXPORT_SYMBOL(kmap_prot); EXPORT_SYMBOL(kmap_prot);
EXPORT_SYMBOL(kmap_pte); EXPORT_SYMBOL(kmap_pte);
/* These are set in {srmmu,sun4c}_paging_init() */ #define kmap_get_fixmap_pte(vaddr) \
unsigned long fix_kmap_begin;
unsigned long fix_kmap_end;
#define kmap_get_fixed_pte(vaddr) \
pte_offset_kernel(pmd_offset(pgd_offset_k(vaddr), (vaddr)), (vaddr)) pte_offset_kernel(pmd_offset(pgd_offset_k(vaddr), (vaddr)), (vaddr))
void __init kmap_init(void) void __init kmap_init(void)
{ {
/* cache the first kmap pte */ /* cache the first kmap pte */
kmap_pte = kmap_get_fixed_pte(fix_kmap_begin); kmap_pte = kmap_get_fixmap_pte(__fix_to_virt(FIX_KMAP_BEGIN));
kmap_prot = __pgprot(SRMMU_ET_PTE | SRMMU_PRIV | SRMMU_CACHE); kmap_prot = __pgprot(SRMMU_ET_PTE | SRMMU_PRIV | SRMMU_CACHE);
} }
...@@ -385,12 +381,12 @@ void map_high_region(unsigned long start_pfn, unsigned long end_pfn) ...@@ -385,12 +381,12 @@ void map_high_region(unsigned long start_pfn, unsigned long end_pfn)
{ {
unsigned long tmp; unsigned long tmp;
#ifdef DEBUG_HIGHMEM #ifdef CONFIG_DEBUG_HIGHMEM
printk("mapping high region %08lx - %08lx\n", start_pfn, end_pfn); printk("mapping high region %08lx - %08lx\n", start_pfn, end_pfn);
#endif #endif
for (tmp = start_pfn; tmp < end_pfn; tmp++) { for (tmp = start_pfn; tmp < end_pfn; tmp++) {
struct page *page = mem_map + tmp; struct page *page = pfn_to_page(tmp);
ClearPageReserved(page); ClearPageReserved(page);
set_bit(PG_highmem, &page->flags); set_bit(PG_highmem, &page->flags);
...@@ -407,7 +403,18 @@ void __init mem_init(void) ...@@ -407,7 +403,18 @@ void __init mem_init(void)
int initpages = 0; int initpages = 0;
int i; int i;
highmem_start_page = mem_map + highstart_pfn; highmem_start_page = pfn_to_page(highstart_pfn);
if (PKMAP_BASE+LAST_PKMAP*PAGE_SIZE >= FIXADDR_START) {
prom_printf("BUG: fixmap and pkmap areas overlap\n");
prom_printf("pkbase: 0x%lx pkend: 0x%lx fixstart 0x%lx\n",
PKMAP_BASE,
(unsigned long)PKMAP_BASE+LAST_PKMAP*PAGE_SIZE,
FIXADDR_START);
prom_printf("Please mail sparclinux@vger.kernel.org.\n");
prom_halt();
}
/* Saves us work later. */ /* Saves us work later. */
memset((void *)&empty_zero_page, 0, PAGE_SIZE); memset((void *)&empty_zero_page, 0, PAGE_SIZE);
......
...@@ -65,7 +65,7 @@ iounit_init(int sbi_node, int io_node, struct sbus_bus *sbus) ...@@ -65,7 +65,7 @@ iounit_init(int sbi_node, int io_node, struct sbus_bus *sbus)
for (xptend = iounit->page_table + (16 * PAGE_SIZE) / sizeof(iopte_t); for (xptend = iounit->page_table + (16 * PAGE_SIZE) / sizeof(iopte_t);
xpt < xptend;) xpt < xptend;)
*xpt++ = 0; iopte_val(*xpt++) = 0;
} }
/* One has to hold iounit->lock to call this */ /* One has to hold iounit->lock to call this */
...@@ -199,7 +199,7 @@ static int iounit_map_dma_area(dma_addr_t *pba, unsigned long va, __u32 addr, in ...@@ -199,7 +199,7 @@ static int iounit_map_dma_area(dma_addr_t *pba, unsigned long va, __u32 addr, in
pmdp = pmd_offset(pgdp, addr); pmdp = pmd_offset(pgdp, addr);
ptep = pte_offset_map(pmdp, addr); ptep = pte_offset_map(pmdp, addr);
set_pte(ptep, pte_val(mk_pte(virt_to_page(page), dvma_prot))); set_pte(ptep, mk_pte(virt_to_page(page), dvma_prot));
i = ((addr - IOUNIT_DMA_BASE) >> PAGE_SHIFT); i = ((addr - IOUNIT_DMA_BASE) >> PAGE_SHIFT);
...@@ -207,7 +207,7 @@ static int iounit_map_dma_area(dma_addr_t *pba, unsigned long va, __u32 addr, in ...@@ -207,7 +207,7 @@ static int iounit_map_dma_area(dma_addr_t *pba, unsigned long va, __u32 addr, in
struct iounit_struct *iounit = (struct iounit_struct *)sbus->iommu; struct iounit_struct *iounit = (struct iounit_struct *)sbus->iommu;
iopte = (iopte_t *)(iounit->page_table + i); iopte = (iopte_t *)(iounit->page_table + i);
*iopte = __iopte(MKIOPTE(__pa(page))); *iopte = MKIOPTE(__pa(page));
} }
} }
addr += PAGE_SIZE; addr += PAGE_SIZE;
......
...@@ -405,7 +405,7 @@ static struct page *iommu_translate_dvma(unsigned long busa) ...@@ -405,7 +405,7 @@ static struct page *iommu_translate_dvma(unsigned long busa)
iopte_t *iopte = iommu->page_table; iopte_t *iopte = iommu->page_table;
iopte += ((busa - iommu->start) >> PAGE_SHIFT); iopte += ((busa - iommu->start) >> PAGE_SHIFT);
return pfn_to_page((pte_val(*iopte) & IOPTE_PAGE) >> (PAGE_SHIFT-4)); return pfn_to_page((iopte_val(*iopte) & IOPTE_PAGE) >> (PAGE_SHIFT-4));
} }
#endif #endif
......
...@@ -139,10 +139,6 @@ int srmmu_cache_pagetables; ...@@ -139,10 +139,6 @@ int srmmu_cache_pagetables;
/* these will be initialized in srmmu_nocache_calcsize() */ /* these will be initialized in srmmu_nocache_calcsize() */
unsigned long srmmu_nocache_size; unsigned long srmmu_nocache_size;
unsigned long srmmu_nocache_end; unsigned long srmmu_nocache_end;
unsigned long pkmap_base;
unsigned long pkmap_base_end;
extern unsigned long fix_kmap_begin;
extern unsigned long fix_kmap_end;
/* 1 bit <=> 256 bytes of nocache <=> 64 PTEs */ /* 1 bit <=> 256 bytes of nocache <=> 64 PTEs */
#define SRMMU_NOCACHE_BITMAP_SHIFT (PAGE_SHIFT - 4) #define SRMMU_NOCACHE_BITMAP_SHIFT (PAGE_SHIFT - 4)
...@@ -154,11 +150,6 @@ void *srmmu_nocache_pool; ...@@ -154,11 +150,6 @@ void *srmmu_nocache_pool;
void *srmmu_nocache_bitmap; void *srmmu_nocache_bitmap;
static struct bit_map srmmu_nocache_map; static struct bit_map srmmu_nocache_map;
/* This makes sense. Honest it does - Anton */
#define __nocache_pa(VADDR) (((unsigned long)VADDR) - SRMMU_NOCACHE_VADDR + __pa((unsigned long)srmmu_nocache_pool))
#define __nocache_va(PADDR) (__va((unsigned long)PADDR) - (unsigned long)srmmu_nocache_pool + SRMMU_NOCACHE_VADDR)
#define __nocache_fix(VADDR) __va(__nocache_pa(VADDR))
static unsigned long srmmu_pte_pfn(pte_t pte) static unsigned long srmmu_pte_pfn(pte_t pte)
{ {
if (srmmu_device_memory(pte_val(pte))) { if (srmmu_device_memory(pte_val(pte))) {
...@@ -322,10 +313,7 @@ static unsigned long __srmmu_get_nocache(int size, int align) ...@@ -322,10 +313,7 @@ static unsigned long __srmmu_get_nocache(int size, int align)
printk("Size 0x%x unaligned int nocache request\n", size); printk("Size 0x%x unaligned int nocache request\n", size);
size += SRMMU_NOCACHE_BITMAP_SHIFT-1; size += SRMMU_NOCACHE_BITMAP_SHIFT-1;
} }
if (align > SRMMU_NOCACHE_ALIGN_MAX) { BUG_ON(align > SRMMU_NOCACHE_ALIGN_MAX);
BUG();
return 0;
}
offset = bit_map_string_get(&srmmu_nocache_map, offset = bit_map_string_get(&srmmu_nocache_map,
size >> SRMMU_NOCACHE_BITMAP_SHIFT, size >> SRMMU_NOCACHE_BITMAP_SHIFT,
...@@ -361,7 +349,7 @@ void srmmu_free_nocache(unsigned long vaddr, int size) ...@@ -361,7 +349,7 @@ void srmmu_free_nocache(unsigned long vaddr, int size)
vaddr, (unsigned long)SRMMU_NOCACHE_VADDR); vaddr, (unsigned long)SRMMU_NOCACHE_VADDR);
BUG(); BUG();
} }
if (vaddr >= srmmu_nocache_end) { if (vaddr+size >= srmmu_nocache_end) {
printk("Vaddr %lx is bigger than nocache end 0x%lx\n", printk("Vaddr %lx is bigger than nocache end 0x%lx\n",
vaddr, srmmu_nocache_end); vaddr, srmmu_nocache_end);
BUG(); BUG();
...@@ -403,17 +391,15 @@ void srmmu_nocache_calcsize(void) ...@@ -403,17 +391,15 @@ void srmmu_nocache_calcsize(void)
/* P3 XXX The 4x overuse: corroborated by /proc/meminfo. */ /* P3 XXX The 4x overuse: corroborated by /proc/meminfo. */
// if (srmmu_nocache_npages < 256) srmmu_nocache_npages = 256; // if (srmmu_nocache_npages < 256) srmmu_nocache_npages = 256;
if (srmmu_nocache_npages < 550) srmmu_nocache_npages = 550; if (srmmu_nocache_npages < SRMMU_MIN_NOCACHE_PAGES)
srmmu_nocache_npages = SRMMU_MIN_NOCACHE_PAGES;
/* anything above 1280 blows up */ /* anything above 1280 blows up */
if (srmmu_nocache_npages > 1280) srmmu_nocache_npages = 1280; if (srmmu_nocache_npages > SRMMU_MAX_NOCACHE_PAGES)
srmmu_nocache_npages = SRMMU_MAX_NOCACHE_PAGES;
srmmu_nocache_size = srmmu_nocache_npages * PAGE_SIZE; srmmu_nocache_size = srmmu_nocache_npages * PAGE_SIZE;
srmmu_nocache_end = SRMMU_NOCACHE_VADDR + srmmu_nocache_size; srmmu_nocache_end = SRMMU_NOCACHE_VADDR + srmmu_nocache_size;
fix_kmap_begin = srmmu_nocache_end;
fix_kmap_end = fix_kmap_begin + (KM_TYPE_NR * NR_CPUS - 1) * PAGE_SIZE;
pkmap_base = SRMMU_NOCACHE_VADDR + srmmu_nocache_size + 0x40000;
pkmap_base_end = pkmap_base + LAST_PKMAP * PAGE_SIZE;
} }
void srmmu_nocache_init(void) void srmmu_nocache_init(void)
...@@ -453,7 +439,7 @@ void srmmu_nocache_init(void) ...@@ -453,7 +439,7 @@ void srmmu_nocache_init(void)
if (srmmu_cache_pagetables) if (srmmu_cache_pagetables)
pteval |= SRMMU_CACHE; pteval |= SRMMU_CACHE;
srmmu_set_pte(__nocache_fix(pte), pteval); srmmu_set_pte(__nocache_fix(pte), __pte(pteval));
vaddr += PAGE_SIZE; vaddr += PAGE_SIZE;
paddr += PAGE_SIZE; paddr += PAGE_SIZE;
...@@ -1083,6 +1069,8 @@ void __init srmmu_early_allocate_ptable_skeleton(unsigned long start, unsigned l ...@@ -1083,6 +1069,8 @@ void __init srmmu_early_allocate_ptable_skeleton(unsigned long start, unsigned l
memset(__nocache_fix(ptep), 0, SRMMU_PTE_SZ_SOFT); memset(__nocache_fix(ptep), 0, SRMMU_PTE_SZ_SOFT);
srmmu_pmd_set(__nocache_fix(pmdp), ptep); srmmu_pmd_set(__nocache_fix(pmdp), ptep);
} }
if (start > (0xffffffffUL - SRMMU_PMD_SIZE_SOFT))
break;
start = (start + SRMMU_PMD_SIZE) & SRMMU_PMD_MASK; start = (start + SRMMU_PMD_SIZE) & SRMMU_PMD_MASK;
} }
} }
...@@ -1111,6 +1099,8 @@ void __init srmmu_allocate_ptable_skeleton(unsigned long start, unsigned long en ...@@ -1111,6 +1099,8 @@ void __init srmmu_allocate_ptable_skeleton(unsigned long start, unsigned long en
memset(ptep, 0, SRMMU_PTE_SZ_SOFT); memset(ptep, 0, SRMMU_PTE_SZ_SOFT);
srmmu_pmd_set(pmdp, ptep); srmmu_pmd_set(pmdp, ptep);
} }
if (start > (0xffffffffUL - SRMMU_PMD_SIZE_SOFT))
break;
start = (start + SRMMU_PMD_SIZE) & SRMMU_PMD_MASK; start = (start + SRMMU_PMD_SIZE) & SRMMU_PMD_MASK;
} }
} }
...@@ -1315,12 +1305,13 @@ void __init srmmu_paging_init(void) ...@@ -1315,12 +1305,13 @@ void __init srmmu_paging_init(void)
srmmu_allocate_ptable_skeleton(DVMA_VADDR, DVMA_END); srmmu_allocate_ptable_skeleton(DVMA_VADDR, DVMA_END);
#endif #endif
srmmu_allocate_ptable_skeleton(fix_kmap_begin, fix_kmap_end); srmmu_allocate_ptable_skeleton(
srmmu_allocate_ptable_skeleton(pkmap_base, pkmap_base_end); __fix_to_virt(__end_of_fixed_addresses - 1), FIXADDR_TOP);
srmmu_allocate_ptable_skeleton(PKMAP_BASE, PKMAP_END);
pgd = pgd_offset_k(pkmap_base); pgd = pgd_offset_k(PKMAP_BASE);
pmd = srmmu_pmd_offset(pgd, pkmap_base); pmd = srmmu_pmd_offset(pgd, PKMAP_BASE);
pte = srmmu_pte_offset(pmd, pkmap_base); pte = srmmu_pte_offset(pmd, PKMAP_BASE);
pkmap_page_table = pte; pkmap_page_table = pte;
flush_cache_all(); flush_cache_all();
......
...@@ -2028,9 +2028,6 @@ extern unsigned long end; ...@@ -2028,9 +2028,6 @@ extern unsigned long end;
extern unsigned long bootmem_init(unsigned long *pages_avail); extern unsigned long bootmem_init(unsigned long *pages_avail);
extern unsigned long last_valid_pfn; extern unsigned long last_valid_pfn;
extern unsigned long fix_kmap_begin;
extern unsigned long fix_kmap_end;
void __init sun4c_paging_init(void) void __init sun4c_paging_init(void)
{ {
int i, cnt; int i, cnt;
...@@ -2038,9 +2035,6 @@ void __init sun4c_paging_init(void) ...@@ -2038,9 +2035,6 @@ void __init sun4c_paging_init(void)
extern struct resource sparc_iomap; extern struct resource sparc_iomap;
unsigned long end_pfn, pages_avail; unsigned long end_pfn, pages_avail;
fix_kmap_begin = KERNBASE + SRMMU_MAXMEM; /* Why bother with SRMMU_MAXMEM? */
fix_kmap_end = fix_kmap_begin + ((KM_TYPE_NR*NR_CPUS)-1)*PAGE_SIZE;
kernel_end = (unsigned long) &end; kernel_end = (unsigned long) &end;
kernel_end += (SUN4C_REAL_PGDIR_SIZE * 4); kernel_end += (SUN4C_REAL_PGDIR_SIZE * 4);
kernel_end = SUN4C_REAL_PGDIR_ALIGN(kernel_end); kernel_end = SUN4C_REAL_PGDIR_ALIGN(kernel_end);
......
...@@ -501,139 +501,7 @@ source "drivers/sbus/char/Kconfig" ...@@ -501,139 +501,7 @@ source "drivers/sbus/char/Kconfig"
source "drivers/mtd/Kconfig" source "drivers/mtd/Kconfig"
source "drivers/block/Kconfig"
menu "Block devices"
config BLK_DEV_FD
bool "Normal floppy disk support"
---help---
If you want to use the floppy disk drive(s) of your PC under Linux,
say Y. Information about this driver, especially important for IBM
Thinkpad users, is contained in <file:Documentation/floppy.txt>.
That file also contains the location of the Floppy driver FAQ as
well as location of the fdutils package used to configure additional
parameters of the driver at run time.
To compile this driver as a module, choose M here: the
module will be called floppy.
config BLK_DEV_LOOP
tristate "Loopback device support"
---help---
Saying Y here will allow you to use a regular file as a block
device; you can then create a file system on that block device and
mount it just as you would mount other block devices such as hard
drive partitions, CD-ROM drives or floppy drives. The loop devices
are block special device files with major number 7 and typically
called /dev/loop0, /dev/loop1 etc.
This is useful if you want to check an ISO 9660 file system before
burning the CD, or if you want to use floppy images without first
writing them to floppy. Furthermore, some Linux distributions avoid
the need for a dedicated Linux partition by keeping their complete
root file system inside a DOS FAT file using this loop device
driver.
The loop device driver can also be used to "hide" a file system in a
disk partition, floppy, or regular file, either using encryption
(scrambling the data) or steganography (hiding the data in the low
bits of, say, a sound file). This is also safe if the file resides
on a remote file server. If you want to do this, you will first have
to acquire and install a kernel patch from
<ftp://ftp.kerneli.org/pub/kerneli/>, and then you need to
say Y to this option.
Note that alternative ways to use encrypted file systems are
provided by the cfs package, which can be gotten from
<ftp://ftp.kerneli.org/pub/kerneli/net-source/>, and the newer tcfs
package, available at <http://tcfs.dia.unisa.it/>. You do not need
to say Y here if you want to use one of these. However, using cfs
requires saying Y to "NFS file system support" below while using
tcfs requires applying a kernel patch. An alternative steganography
solution is provided by StegFS, also available from
<ftp://ftp.kerneli.org/pub/kerneli/net-source/>.
To use the loop device, you need the losetup utility and a recent
version of the mount program, both contained in the util-linux
package. The location and current version number of util-linux is
contained in the file <file:Documentation/Changes>.
Note that this loop device has nothing to do with the loopback
device used for network connections from the machine to itself.
To compile this driver as a module, choose M here: the
module will be called loop.
Most users will answer N here.
config BLK_DEV_NBD
tristate "Network block device support"
depends on NET
---help---
Saying Y here will allow your computer to be a client for network
block devices, i.e. it will be able to use block devices exported by
servers (mount file systems on them etc.). Communication between
client and server works over TCP/IP networking, but to the client
program this is hidden: it looks like a regular local file access to
a block device special file such as /dev/nd0.
Network block devices also allows you to run a block-device in
userland (making server and client physically the same computer,
communicating using the loopback network device).
Read <file:Documentation/nbd.txt> for more information, especially
about where to find the server code, which runs in user space and
does not need special kernel support.
Note that this has nothing to do with the network file systems NFS
or Coda; you can say N here even if you intend to use NFS or Coda.
To compile this driver as a module, choose M here: the
module will be called nbd.
If unsure, say N.
source "drivers/md/Kconfig"
config BLK_DEV_RAM
tristate "RAM disk support"
---help---
Saying Y here will allow you to use a portion of your RAM memory as
a block device, so that you can make file systems on it, read and
write to it and do all the other things that you can do with normal
block devices (such as hard drives). It is usually used to load and
store a copy of a minimal root file system off of a floppy into RAM
during the initial install of Linux.
Note that the kernel command line option "ramdisk=XX" is now
obsolete. For details, read <file:Documentation/ramdisk.txt>.
To compile this driver as a module, choose M here: the
module will be called rd.
Most normal users won't need the RAM disk functionality, and can
thus say N here.
config BLK_DEV_RAM_SIZE
int "Default RAM disk size"
depends on BLK_DEV_RAM
default "4096"
help
The default value is 4096. Only change this if you know what are
you doing. If you are using IBM S/390, then set this to 8192.
config BLK_DEV_INITRD
bool "Initial RAM disk (initrd) support"
depends on BLK_DEV_RAM=y
help
The initial RAM disk is a RAM disk that is loaded by the boot loader
(loadlin or lilo) and that is mounted as root before the normal boot
procedure. It is typically used to load modules needed to mount the
"real" root file system, etc. See <file:Documentation/initrd.txt>
for details.
endmenu
source "drivers/ide/Kconfig" source "drivers/ide/Kconfig"
...@@ -641,6 +509,8 @@ source "drivers/scsi/Kconfig" ...@@ -641,6 +509,8 @@ source "drivers/scsi/Kconfig"
source "drivers/fc4/Kconfig" source "drivers/fc4/Kconfig"
source "drivers/md/Kconfig"
if PCI if PCI
source "drivers/message/fusion/Kconfig" source "drivers/message/fusion/Kconfig"
endif endif
......
...@@ -198,22 +198,16 @@ CONFIG_OBP_FLASH=m ...@@ -198,22 +198,16 @@ CONFIG_OBP_FLASH=m
# Block devices # Block devices
# #
# CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_FD is not set
# CONFIG_PARIDE is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
CONFIG_BLK_DEV_LOOP=m CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_NBD=m CONFIG_BLK_DEV_NBD=m
#
# Multi-device support (RAID and LVM)
#
CONFIG_MD=y
CONFIG_BLK_DEV_MD=m
CONFIG_MD_LINEAR=m
CONFIG_MD_RAID0=m
CONFIG_MD_RAID1=m
CONFIG_MD_RAID5=m
CONFIG_MD_MULTIPATH=m
CONFIG_BLK_DEV_DM=m
# CONFIG_DM_IOCTL_V4 is not set
# CONFIG_BLK_DEV_RAM is not set # CONFIG_BLK_DEV_RAM is not set
# CONFIG_BLK_DEV_INITRD is not set
# #
# ATA/ATAPI/MFM/RLL support # ATA/ATAPI/MFM/RLL support
...@@ -369,6 +363,19 @@ CONFIG_FC4_SOCAL=m ...@@ -369,6 +363,19 @@ CONFIG_FC4_SOCAL=m
CONFIG_SCSI_PLUTO=m CONFIG_SCSI_PLUTO=m
CONFIG_SCSI_FCAL=m CONFIG_SCSI_FCAL=m
#
# Multi-device support (RAID and LVM)
#
CONFIG_MD=y
CONFIG_BLK_DEV_MD=m
CONFIG_MD_LINEAR=m
CONFIG_MD_RAID0=m
CONFIG_MD_RAID1=m
CONFIG_MD_RAID5=m
CONFIG_MD_MULTIPATH=m
CONFIG_BLK_DEV_DM=m
# CONFIG_DM_IOCTL_V4 is not set
# #
# Fusion MPT device support # Fusion MPT device support
# #
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/fs_struct.h> #include <linux/fs_struct.h>
#include <linux/fs.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/socket.h> #include <linux/socket.h>
#include <linux/percpu.h> #include <linux/percpu.h>
...@@ -96,6 +97,7 @@ extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg); ...@@ -96,6 +97,7 @@ extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg);
extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *); extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *);
extern long sparc32_open(const char * filename, int flags, int mode); extern long sparc32_open(const char * filename, int flags, int mode);
extern int io_remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned long offset, unsigned long size, pgprot_t prot, int space); extern int io_remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned long offset, unsigned long size, pgprot_t prot, int space);
extern long sys_close(unsigned int);
extern int __ashrdi3(int, int); extern int __ashrdi3(int, int);
...@@ -324,6 +326,7 @@ EXPORT_SYMBOL(svr4_setcontext); ...@@ -324,6 +326,7 @@ EXPORT_SYMBOL(svr4_setcontext);
EXPORT_SYMBOL(sys_ioctl); EXPORT_SYMBOL(sys_ioctl);
EXPORT_SYMBOL(compat_sys_ioctl); EXPORT_SYMBOL(compat_sys_ioctl);
EXPORT_SYMBOL(sparc32_open); EXPORT_SYMBOL(sparc32_open);
EXPORT_SYMBOL(sys_close);
#endif #endif
/* Special internal versions of library functions. */ /* Special internal versions of library functions. */
......
...@@ -372,25 +372,6 @@ static int ffb_presetup(drm_device_t *dev) ...@@ -372,25 +372,6 @@ static int ffb_presetup(drm_device_t *dev)
return ret; return ret;
} }
#ifndef MODULE
/* DRM(options) is called by the kernel to parse command-line options
* passed via the boot-loader (e.g., LILO). It calls the insmod option
* routine, drm_parse_drm.
*/
/* JH- We have to hand expand the string ourselves because of the cpp. If
* anyone can think of a way that we can fit into the __setup macro without
* changing it, then please send the solution my way.
*/
static int __init ffb_options(char *str)
{
DRM(parse_options)(str);
return 1;
}
__setup(DRIVER_NAME "=", ffb_options);
#endif
#include "drm_fops.h" #include "drm_fops.h"
#include "drm_init.h" #include "drm_init.h"
#include "drm_ioctl.h" #include "drm_ioctl.h"
......
...@@ -1156,3 +1156,6 @@ int fc_do_prli(fc_channel *fc, unsigned char alpa) ...@@ -1156,3 +1156,6 @@ int fc_do_prli(fc_channel *fc, unsigned char alpa)
kfree(p); kfree(p);
return status; return status;
} }
MODULE_LICENSE("GPL");
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/mtd/mtd.h> #include <linux/mtd/mtd.h>
#include <linux/mtd/map.h> #include <linux/mtd/map.h>
......
...@@ -95,8 +95,8 @@ int uflash_devinit(struct linux_ebus_device* edev) ...@@ -95,8 +95,8 @@ int uflash_devinit(struct linux_ebus_device* edev)
if(0 != pdev->name && 0 < strlen(pdev->name)) { if(0 != pdev->name && 0 < strlen(pdev->name)) {
pdev->map.name = pdev->name; pdev->map.name = pdev->name;
} }
pdev->phys = edev->resource[0].start; pdev->map.phys = edev->resource[0].start;
pdev->virt = pdev->map.virt =
(unsigned long)ioremap_nocache(edev->resource[0].start, pdev->map.size); (unsigned long)ioremap_nocache(edev->resource[0].start, pdev->map.size);
if(0 == pdev->map.virt) { if(0 == pdev->map.virt) {
printk("%s: failed to map device\n", __FUNCTION__); printk("%s: failed to map device\n", __FUNCTION__);
......
...@@ -397,3 +397,5 @@ cleanup_module(void) ...@@ -397,3 +397,5 @@ cleanup_module(void)
} }
} }
#endif #endif
MODULE_LICENSE("GPL");
...@@ -1074,3 +1074,6 @@ static void __exit bpp_cleanup(void) ...@@ -1074,3 +1074,6 @@ static void __exit bpp_cleanup(void)
module_init(bpp_init); module_init(bpp_init);
module_exit(bpp_cleanup); module_exit(bpp_cleanup);
MODULE_LICENSE("GPL");
...@@ -737,4 +737,5 @@ void cleanup_module(void) ...@@ -737,4 +737,5 @@ void cleanup_module(void)
} }
#endif #endif
MODULE_LICENSE("GPL");
...@@ -4394,3 +4394,6 @@ static Scsi_Host_Template driver_template = { ...@@ -4394,3 +4394,6 @@ static Scsi_Host_Template driver_template = {
}; };
#include "scsi_module.c" #include "scsi_module.c"
MODULE_LICENSE("GPL");
...@@ -316,3 +316,5 @@ static Scsi_Host_Template driver_template = { ...@@ -316,3 +316,5 @@ static Scsi_Host_Template driver_template = {
}; };
#include "scsi_module.c" #include "scsi_module.c"
MODULE_LICENSE("GPL");
...@@ -360,3 +360,5 @@ static Scsi_Host_Template driver_template = { ...@@ -360,3 +360,5 @@ static Scsi_Host_Template driver_template = {
#include "scsi_module.c" #include "scsi_module.c"
MODULE_LICENSE("GPL");
...@@ -1554,3 +1554,6 @@ static Scsi_Host_Template driver_template = { ...@@ -1554,3 +1554,6 @@ static Scsi_Host_Template driver_template = {
#include "scsi_module.c" #include "scsi_module.c"
MODULE_LICENSE("GPL");
...@@ -1631,6 +1631,8 @@ static int __init sunzilog_ports_init(void) ...@@ -1631,6 +1631,8 @@ static int __init sunzilog_ports_init(void)
{ {
struct zs_probe_scan scan; struct zs_probe_scan scan;
int ret; int ret;
int uart_count;
int i;
printk(KERN_DEBUG "SunZilog: %d chips.\n", NUM_SUNZILOG); printk(KERN_DEBUG "SunZilog: %d chips.\n", NUM_SUNZILOG);
...@@ -1650,18 +1652,27 @@ static int __init sunzilog_ports_init(void) ...@@ -1650,18 +1652,27 @@ static int __init sunzilog_ports_init(void)
sunzilog_init_hw(); sunzilog_init_hw();
/* We can only init this once we have probed the Zilogs /* We can only init this once we have probed the Zilogs
* in the system. * in the system. Do not count channels assigned to keyboards
* or mice when we are deciding how many ports to register.
*/ */
sunzilog_reg.nr = NUM_CHANNELS; uart_count = 0;
for (i = 0; i < NUM_CHANNELS; i++) {
struct uart_sunzilog_port *up = &sunzilog_port_table[i];
if (ZS_IS_KEYB(up) || ZS_IS_MOUSE(up))
continue;
uart_count++;
}
sunzilog_reg.nr = uart_count;
sunzilog_reg.cons = SUNZILOG_CONSOLE; sunzilog_reg.cons = SUNZILOG_CONSOLE;
sunzilog_reg.minor = sunserial_current_minor; sunzilog_reg.minor = sunserial_current_minor;
sunserial_current_minor += NUM_CHANNELS; sunserial_current_minor += uart_count;
ret = uart_register_driver(&sunzilog_reg); ret = uart_register_driver(&sunzilog_reg);
if (ret == 0) { if (ret == 0) {
int i;
for (i = 0; i < NUM_CHANNELS; i++) { for (i = 0; i < NUM_CHANNELS; i++) {
struct uart_sunzilog_port *up = &sunzilog_port_table[i]; struct uart_sunzilog_port *up = &sunzilog_port_table[i];
......
/*
* fixmap.h: compile-time virtual memory allocation
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (C) 1998 Ingo Molnar
*
* Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999
*/
#ifndef _ASM_FIXMAP_H
#define _ASM_FIXMAP_H
#include <linux/config.h>
#include <linux/kernel.h>
#include <asm/page.h>
#ifdef CONFIG_HIGHMEM
#include <linux/threads.h>
#include <asm/kmap_types.h>
#endif
/*
* Here we define all the compile-time 'special' virtual
* addresses. The point is to have a constant address at
* compile time, but to set the physical address only
* in the boot process. We allocate these special addresses
* from the top of unused virtual memory (0xfd000000 - 1 page) backwards.
* Also this lets us do fail-safe vmalloc(), we
* can guarantee that these special addresses and
* vmalloc()-ed addresses never overlap.
*
* these 'compile-time allocated' memory buffers are
* fixed-size 4k pages. (or larger if used with an increment
* highger than 1) use fixmap_set(idx,phys) to associate
* physical memory with fixmap indices.
*
* TLB entries of such buffers will not be flushed across
* task switches.
*/
/*
* on UP currently we will have no trace of the fixmap mechanism,
* no page table allocations, etc. This might change in the
* future, say framebuffers for the console driver(s) could be
* fix-mapped?
*/
enum fixed_addresses {
FIX_HOLE,
#ifdef CONFIG_HIGHMEM
FIX_KMAP_BEGIN,
FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1,
#endif
__end_of_fixed_addresses
};
extern void __set_fixmap (enum fixed_addresses idx,
unsigned long phys, pgprot_t flags);
#define set_fixmap(idx, phys) \
__set_fixmap(idx, phys, PAGE_KERNEL)
/*
* Some hardware wants to get fixmapped without caching.
*/
#define set_fixmap_nocache(idx, phys) \
__set_fixmap(idx, phys, PAGE_KERNEL_NOCACHE)
/*
* used by vmalloc.c.
*
* Leave one empty page between IO pages at 0xfd000000 and
* the start of the fixmap.
*/
#define FIXADDR_TOP (0xfcfff000UL)
#define FIXADDR_SIZE ((__end_of_fixed_addresses) << PAGE_SHIFT)
#define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
#define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT))
#define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT)
extern void __this_fixmap_does_not_exist(void);
/*
* 'index to address' translation. If anyone tries to use the idx
* directly without tranlation, we catch the bug with a NULL-deference
* kernel oops. Illegal ranges of incoming indices are caught too.
*/
static inline unsigned long fix_to_virt(const unsigned int idx)
{
/*
* this branch gets completely eliminated after inlining,
* except when someone tries to use fixaddr indices in an
* illegal way. (such as mixing up address types or using
* out-of-range indices).
*
* If it doesn't get removed, the linker will complain
* loudly with a reasonably clear error message..
*/
if (idx >= __end_of_fixed_addresses)
__this_fixmap_does_not_exist();
return __fix_to_virt(idx);
}
static inline unsigned long virt_to_fix(const unsigned long vaddr)
{
BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START);
return __virt_to_fix(vaddr);
}
#endif
...@@ -21,10 +21,10 @@ ...@@ -21,10 +21,10 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <asm/fixmap.h>
#include <asm/vaddrs.h>
#include <asm/kmap_types.h> #include <asm/kmap_types.h>
#include <asm/pgtsrmmu.h>
/* undef for production */
#define HIGHMEM_DEBUG 1
/* declarations for highmem.c */ /* declarations for highmem.c */
extern unsigned long highstart_pfn, highend_pfn; extern unsigned long highstart_pfn, highend_pfn;
...@@ -33,12 +33,6 @@ extern pte_t *kmap_pte; ...@@ -33,12 +33,6 @@ extern pte_t *kmap_pte;
extern pgprot_t kmap_prot; extern pgprot_t kmap_prot;
extern pte_t *pkmap_page_table; extern pte_t *pkmap_page_table;
/* This gets set in {srmmu,sun4c}_paging_init() */
extern unsigned long fix_kmap_begin;
/* Only used and set with srmmu? */
extern unsigned long pkmap_base;
extern void kmap_init(void) __init; extern void kmap_init(void) __init;
/* /*
...@@ -46,19 +40,21 @@ extern void kmap_init(void) __init; ...@@ -46,19 +40,21 @@ extern void kmap_init(void) __init;
* easily, subsequent pte tables have to be allocated in one physical * easily, subsequent pte tables have to be allocated in one physical
* chunk of RAM. * chunk of RAM.
*/ */
#define PKMAP_BASE (SRMMU_NOCACHE_VADDR + (SRMMU_MAX_NOCACHE_PAGES << PAGE_SHIFT))
#define LAST_PKMAP 1024 #define LAST_PKMAP 1024
#define LAST_PKMAP_MASK (LAST_PKMAP - 1) #define LAST_PKMAP_MASK (LAST_PKMAP - 1)
#define PKMAP_NR(virt) ((virt - pkmap_base) >> PAGE_SHIFT) #define PKMAP_NR(virt) ((virt - PKMAP_BASE) >> PAGE_SHIFT)
#define PKMAP_ADDR(nr) (pkmap_base + ((nr) << PAGE_SHIFT)) #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT))
#define PKMAP_END (PKMAP_ADDR(LAST_PKMAP))
extern void *kmap_high(struct page *page); extern void *kmap_high(struct page *page);
extern void kunmap_high(struct page *page); extern void kunmap_high(struct page *page);
static inline void *kmap(struct page *page) static inline void *kmap(struct page *page)
{ {
if (in_interrupt()) BUG_ON(in_interrupt());
BUG();
if (page < highmem_start_page) if (page < highmem_start_page)
return page_address(page); return page_address(page);
return kmap_high(page); return kmap_high(page);
...@@ -66,8 +62,7 @@ static inline void *kmap(struct page *page) ...@@ -66,8 +62,7 @@ static inline void *kmap(struct page *page)
static inline void kunmap(struct page *page) static inline void kunmap(struct page *page)
{ {
if (in_interrupt()) BUG_ON(in_interrupt());
BUG();
if (page < highmem_start_page) if (page < highmem_start_page)
return; return;
kunmap_high(page); kunmap_high(page);
...@@ -75,19 +70,7 @@ static inline void kunmap(struct page *page) ...@@ -75,19 +70,7 @@ static inline void kunmap(struct page *page)
extern void *kmap_atomic(struct page *page, enum km_type type); extern void *kmap_atomic(struct page *page, enum km_type type);
extern void kunmap_atomic(void *kvaddr, enum km_type type); extern void kunmap_atomic(void *kvaddr, enum km_type type);
extern struct page *kmap_atomic_to_page(void *vaddr);
static inline struct page *kmap_atomic_to_page(void *ptr)
{
unsigned long idx, vaddr = (unsigned long)ptr;
pte_t *pte;
if (vaddr < fix_kmap_begin)
return virt_to_page(ptr);
idx = ((vaddr - fix_kmap_begin) >> PAGE_SHIFT);
pte = kmap_pte + idx;
return pte_page(*pte);
}
#define flush_cache_kmaps() flush_cache_all() #define flush_cache_kmaps() flush_cache_all()
......
...@@ -11,6 +11,7 @@ enum km_type { ...@@ -11,6 +11,7 @@ enum km_type {
KM_BIO_DST_IRQ, KM_BIO_DST_IRQ,
KM_PTE0, KM_PTE0,
KM_PTE1, KM_PTE1,
KM_PTE2,
KM_IRQ0, KM_IRQ0,
KM_IRQ1, KM_IRQ1,
KM_SOFTIRQ0, KM_SOFTIRQ0,
......
...@@ -54,7 +54,7 @@ struct sparc_phys_banks { ...@@ -54,7 +54,7 @@ struct sparc_phys_banks {
#define SPARC_PHYS_BANKS 32 #define SPARC_PHYS_BANKS 32
extern struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS]; extern struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS+1];
/* Cache alias structure. Entry is valid if context != -1. */ /* Cache alias structure. Entry is valid if context != -1. */
struct cache_palias { struct cache_palias {
......
...@@ -109,6 +109,13 @@ ...@@ -109,6 +109,13 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
/* This makes sense. Honest it does - Anton */
/* XXX Yes but it's ugly as sin. FIXME. -KMW */
extern void *srmmu_nocache_pool;
#define __nocache_pa(VADDR) (((unsigned long)VADDR) - SRMMU_NOCACHE_VADDR + __pa((unsigned long)srmmu_nocache_pool))
#define __nocache_va(PADDR) (__va((unsigned long)PADDR) - (unsigned long)srmmu_nocache_pool + SRMMU_NOCACHE_VADDR)
#define __nocache_fix(VADDR) __va(__nocache_pa(VADDR))
/* Accessing the MMU control register. */ /* Accessing the MMU control register. */
extern __inline__ unsigned int srmmu_get_mmureg(void) extern __inline__ unsigned int srmmu_get_mmureg(void)
{ {
......
/*
* Just a place holder.
*/
#ifndef _SPARC_SETUP_H
#define _SPARC_SETUP_H
#endif /* _SPARC_SETUP_H */
...@@ -16,6 +16,9 @@ ...@@ -16,6 +16,9 @@
#define SRMMU_NOCACHE_VADDR (KERNBASE + SRMMU_MAXMEM) #define SRMMU_NOCACHE_VADDR (KERNBASE + SRMMU_MAXMEM)
/* = 0x0fc000000 */ /* = 0x0fc000000 */
/* XXX Empiricals - this needs to go away - KMW */
#define SRMMU_MIN_NOCACHE_PAGES (550)
#define SRMMU_MAX_NOCACHE_PAGES (1280)
/* The following constant is used in mm/srmmu.c::srmmu_nocache_calcsize() /* The following constant is used in mm/srmmu.c::srmmu_nocache_calcsize()
* to determine the amount of memory that will be reserved as nocache: * to determine the amount of memory that will be reserved as nocache:
......
/*
* Just a place holder.
*/
#ifndef _SPARC64_SETUP_H
#define _SPARC64_SETUP_H
#endif /* _SPARC64_SETUP_H */
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