mirror of
https://github.com/ukui/kernel.git
synced 2026-03-09 10:07:04 -07:00
Merge branches 'sched/clock', 'sched/cleanups' and 'linus' into sched/urgent
This commit is contained in:
@@ -31,7 +31,6 @@ Features which OCFS2 does not support yet:
|
||||
- quotas
|
||||
- Directory change notification (F_NOTIFY)
|
||||
- Distributed Caching (F_SETLEASE/F_GETLEASE/break_lease)
|
||||
- POSIX ACLs
|
||||
|
||||
Mount options
|
||||
=============
|
||||
@@ -79,3 +78,5 @@ inode64 Indicates that Ocfs2 is allowed to create inodes at
|
||||
bits of significance.
|
||||
user_xattr (*) Enables Extended User Attributes.
|
||||
nouser_xattr Disables Extended User Attributes.
|
||||
acl Enables POSIX Access Control Lists support.
|
||||
noacl (*) Disables POSIX Access Control Lists support.
|
||||
|
||||
15
MAINTAINERS
15
MAINTAINERS
@@ -4015,10 +4015,12 @@ L: alsa-devel@alsa-project.org (subscribers-only)
|
||||
W: http://alsa-project.org/main/index.php/ASoC
|
||||
S: Supported
|
||||
|
||||
SPARC (sparc32)
|
||||
P: William L. Irwin
|
||||
M: wli@holomorphy.com
|
||||
SPARC + UltraSPARC (sparc/sparc64)
|
||||
P: David S. Miller
|
||||
M: davem@davemloft.net
|
||||
L: sparclinux@vger.kernel.org
|
||||
T: git kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6.git
|
||||
T: git kernel.org:/pub/scm/linux/kernel/git/davem/sparc-next-2.6.git
|
||||
S: Maintained
|
||||
|
||||
SPECIALIX IO8+ MULTIPORT SERIAL CARD DRIVER
|
||||
@@ -4302,13 +4304,6 @@ M: dushistov@mail.ru
|
||||
L: linux-kernel@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
UltraSPARC (sparc64)
|
||||
P: David S. Miller
|
||||
M: davem@davemloft.net
|
||||
L: sparclinux@vger.kernel.org
|
||||
T: git kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6.git
|
||||
S: Maintained
|
||||
|
||||
ULTRA-WIDEBAND (UWB) SUBSYSTEM:
|
||||
P: David Vrabel
|
||||
M: david.vrabel@csr.com
|
||||
|
||||
@@ -2321,7 +2321,7 @@ static struct clk i2c2_fck = {
|
||||
};
|
||||
|
||||
static struct clk i2chs2_fck = {
|
||||
.name = "i2chs_fck",
|
||||
.name = "i2c_fck",
|
||||
.id = 2,
|
||||
.parent = &func_96m_ck,
|
||||
.flags = CLOCK_IN_OMAP243X,
|
||||
@@ -2354,7 +2354,7 @@ static struct clk i2c1_fck = {
|
||||
};
|
||||
|
||||
static struct clk i2chs1_fck = {
|
||||
.name = "i2chs_fck",
|
||||
.name = "i2c_fck",
|
||||
.id = 1,
|
||||
.parent = &func_96m_ck,
|
||||
.flags = CLOCK_IN_OMAP243X,
|
||||
|
||||
@@ -23,8 +23,10 @@ struct mod_arch_specific
|
||||
{
|
||||
unsigned long got_offset, got_count, got_max;
|
||||
unsigned long fdesc_offset, fdesc_count, fdesc_max;
|
||||
unsigned long stub_offset, stub_count, stub_max;
|
||||
unsigned long init_stub_offset, init_stub_count, init_stub_max;
|
||||
struct {
|
||||
unsigned long stub_offset;
|
||||
unsigned int stub_entries;
|
||||
} *section;
|
||||
int unwind_section;
|
||||
struct unwind_table *unwind;
|
||||
};
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*
|
||||
* Linux/PA-RISC Project (http://www.parisc-linux.org/)
|
||||
* Copyright (C) 2003 Randolph Chung <tausq at debian . org>
|
||||
* Copyright (C) 2008 Helge Deller <deller@gmx.de>
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -24,6 +25,19 @@
|
||||
*
|
||||
*
|
||||
* Notes:
|
||||
* - PLT stub handling
|
||||
* On 32bit (and sometimes 64bit) and with big kernel modules like xfs or
|
||||
* ipv6 the relocation types R_PARISC_PCREL17F and R_PARISC_PCREL22F may
|
||||
* fail to reach their PLT stub if we only create one big stub array for
|
||||
* all sections at the beginning of the core or init section.
|
||||
* Instead we now insert individual PLT stub entries directly in front of
|
||||
* of the code sections where the stubs are actually called.
|
||||
* This reduces the distance between the PCREL location and the stub entry
|
||||
* so that the relocations can be fulfilled.
|
||||
* While calculating the final layout of the kernel module in memory, the
|
||||
* kernel module loader calls arch_mod_section_prepend() to request the
|
||||
* to be reserved amount of memory in front of each individual section.
|
||||
*
|
||||
* - SEGREL32 handling
|
||||
* We are not doing SEGREL32 handling correctly. According to the ABI, we
|
||||
* should do a value offset, like this:
|
||||
@@ -58,9 +72,13 @@
|
||||
#define DEBUGP(fmt...)
|
||||
#endif
|
||||
|
||||
#define RELOC_REACHABLE(val, bits) \
|
||||
(( ( !((val) & (1<<((bits)-1))) && ((val)>>(bits)) != 0 ) || \
|
||||
( ((val) & (1<<((bits)-1))) && ((val)>>(bits)) != (((__typeof__(val))(~0))>>((bits)+2)))) ? \
|
||||
0 : 1)
|
||||
|
||||
#define CHECK_RELOC(val, bits) \
|
||||
if ( ( !((val) & (1<<((bits)-1))) && ((val)>>(bits)) != 0 ) || \
|
||||
( ((val) & (1<<((bits)-1))) && ((val)>>(bits)) != (((__typeof__(val))(~0))>>((bits)+2)))) { \
|
||||
if (!RELOC_REACHABLE(val, bits)) { \
|
||||
printk(KERN_ERR "module %s relocation of symbol %s is out of range (0x%lx in %d bits)\n", \
|
||||
me->name, strtab + sym->st_name, (unsigned long)val, bits); \
|
||||
return -ENOEXEC; \
|
||||
@@ -92,13 +110,6 @@ static inline int in_local(struct module *me, void *loc)
|
||||
return in_init(me, loc) || in_core(me, loc);
|
||||
}
|
||||
|
||||
static inline int in_local_section(struct module *me, void *loc, void *dot)
|
||||
{
|
||||
return (in_init(me, loc) && in_init(me, dot)) ||
|
||||
(in_core(me, loc) && in_core(me, dot));
|
||||
}
|
||||
|
||||
|
||||
#ifndef CONFIG_64BIT
|
||||
struct got_entry {
|
||||
Elf32_Addr addr;
|
||||
@@ -258,23 +269,42 @@ static inline unsigned long count_stubs(const Elf_Rela *rela, unsigned long n)
|
||||
/* Free memory returned from module_alloc */
|
||||
void module_free(struct module *mod, void *module_region)
|
||||
{
|
||||
kfree(mod->arch.section);
|
||||
mod->arch.section = NULL;
|
||||
|
||||
vfree(module_region);
|
||||
/* FIXME: If module_region == mod->init_region, trim exception
|
||||
table entries. */
|
||||
}
|
||||
|
||||
/* Additional bytes needed in front of individual sections */
|
||||
unsigned int arch_mod_section_prepend(struct module *mod,
|
||||
unsigned int section)
|
||||
{
|
||||
/* size needed for all stubs of this section (including
|
||||
* one additional for correct alignment of the stubs) */
|
||||
return (mod->arch.section[section].stub_entries + 1)
|
||||
* sizeof(struct stub_entry);
|
||||
}
|
||||
|
||||
#define CONST
|
||||
int module_frob_arch_sections(CONST Elf_Ehdr *hdr,
|
||||
CONST Elf_Shdr *sechdrs,
|
||||
CONST char *secstrings,
|
||||
struct module *me)
|
||||
{
|
||||
unsigned long gots = 0, fdescs = 0, stubs = 0, init_stubs = 0;
|
||||
unsigned long gots = 0, fdescs = 0, len;
|
||||
unsigned int i;
|
||||
|
||||
len = hdr->e_shnum * sizeof(me->arch.section[0]);
|
||||
me->arch.section = kzalloc(len, GFP_KERNEL);
|
||||
if (!me->arch.section)
|
||||
return -ENOMEM;
|
||||
|
||||
for (i = 1; i < hdr->e_shnum; i++) {
|
||||
const Elf_Rela *rels = (void *)hdr + sechdrs[i].sh_offset;
|
||||
const Elf_Rela *rels = (void *)sechdrs[i].sh_addr;
|
||||
unsigned long nrels = sechdrs[i].sh_size / sizeof(*rels);
|
||||
unsigned int count, s;
|
||||
|
||||
if (strncmp(secstrings + sechdrs[i].sh_name,
|
||||
".PARISC.unwind", 14) == 0)
|
||||
@@ -290,11 +320,23 @@ int module_frob_arch_sections(CONST Elf_Ehdr *hdr,
|
||||
*/
|
||||
gots += count_gots(rels, nrels);
|
||||
fdescs += count_fdescs(rels, nrels);
|
||||
if(strncmp(secstrings + sechdrs[i].sh_name,
|
||||
".rela.init", 10) == 0)
|
||||
init_stubs += count_stubs(rels, nrels);
|
||||
else
|
||||
stubs += count_stubs(rels, nrels);
|
||||
|
||||
/* XXX: By sorting the relocs and finding duplicate entries
|
||||
* we could reduce the number of necessary stubs and save
|
||||
* some memory. */
|
||||
count = count_stubs(rels, nrels);
|
||||
if (!count)
|
||||
continue;
|
||||
|
||||
/* so we need relocation stubs. reserve necessary memory. */
|
||||
/* sh_info gives the section for which we need to add stubs. */
|
||||
s = sechdrs[i].sh_info;
|
||||
|
||||
/* each code section should only have one relocation section */
|
||||
WARN_ON(me->arch.section[s].stub_entries);
|
||||
|
||||
/* store number of stubs we need for this section */
|
||||
me->arch.section[s].stub_entries += count;
|
||||
}
|
||||
|
||||
/* align things a bit */
|
||||
@@ -306,18 +348,8 @@ int module_frob_arch_sections(CONST Elf_Ehdr *hdr,
|
||||
me->arch.fdesc_offset = me->core_size;
|
||||
me->core_size += fdescs * sizeof(Elf_Fdesc);
|
||||
|
||||
me->core_size = ALIGN(me->core_size, 16);
|
||||
me->arch.stub_offset = me->core_size;
|
||||
me->core_size += stubs * sizeof(struct stub_entry);
|
||||
|
||||
me->init_size = ALIGN(me->init_size, 16);
|
||||
me->arch.init_stub_offset = me->init_size;
|
||||
me->init_size += init_stubs * sizeof(struct stub_entry);
|
||||
|
||||
me->arch.got_max = gots;
|
||||
me->arch.fdesc_max = fdescs;
|
||||
me->arch.stub_max = stubs;
|
||||
me->arch.init_stub_max = init_stubs;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -380,23 +412,27 @@ enum elf_stub_type {
|
||||
};
|
||||
|
||||
static Elf_Addr get_stub(struct module *me, unsigned long value, long addend,
|
||||
enum elf_stub_type stub_type, int init_section)
|
||||
enum elf_stub_type stub_type, Elf_Addr loc0, unsigned int targetsec)
|
||||
{
|
||||
unsigned long i;
|
||||
struct stub_entry *stub;
|
||||
|
||||
if(init_section) {
|
||||
i = me->arch.init_stub_count++;
|
||||
BUG_ON(me->arch.init_stub_count > me->arch.init_stub_max);
|
||||
stub = me->module_init + me->arch.init_stub_offset +
|
||||
i * sizeof(struct stub_entry);
|
||||
} else {
|
||||
i = me->arch.stub_count++;
|
||||
BUG_ON(me->arch.stub_count > me->arch.stub_max);
|
||||
stub = me->module_core + me->arch.stub_offset +
|
||||
i * sizeof(struct stub_entry);
|
||||
/* initialize stub_offset to point in front of the section */
|
||||
if (!me->arch.section[targetsec].stub_offset) {
|
||||
loc0 -= (me->arch.section[targetsec].stub_entries + 1) *
|
||||
sizeof(struct stub_entry);
|
||||
/* get correct alignment for the stubs */
|
||||
loc0 = ALIGN(loc0, sizeof(struct stub_entry));
|
||||
me->arch.section[targetsec].stub_offset = loc0;
|
||||
}
|
||||
|
||||
/* get address of stub entry */
|
||||
stub = (void *) me->arch.section[targetsec].stub_offset;
|
||||
me->arch.section[targetsec].stub_offset += sizeof(struct stub_entry);
|
||||
|
||||
/* do not write outside available stub area */
|
||||
BUG_ON(0 == me->arch.section[targetsec].stub_entries--);
|
||||
|
||||
|
||||
#ifndef CONFIG_64BIT
|
||||
/* for 32-bit the stub looks like this:
|
||||
* ldil L'XXX,%r1
|
||||
@@ -489,15 +525,19 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
|
||||
Elf32_Addr val;
|
||||
Elf32_Sword addend;
|
||||
Elf32_Addr dot;
|
||||
Elf_Addr loc0;
|
||||
unsigned int targetsec = sechdrs[relsec].sh_info;
|
||||
//unsigned long dp = (unsigned long)$global$;
|
||||
register unsigned long dp asm ("r27");
|
||||
|
||||
DEBUGP("Applying relocate section %u to %u\n", relsec,
|
||||
sechdrs[relsec].sh_info);
|
||||
targetsec);
|
||||
for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
|
||||
/* This is where to make the change */
|
||||
loc = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
|
||||
loc = (void *)sechdrs[targetsec].sh_addr
|
||||
+ rel[i].r_offset;
|
||||
/* This is the start of the target section */
|
||||
loc0 = sechdrs[targetsec].sh_addr;
|
||||
/* This is the symbol it is referring to */
|
||||
sym = (Elf32_Sym *)sechdrs[symindex].sh_addr
|
||||
+ ELF32_R_SYM(rel[i].r_info);
|
||||
@@ -569,19 +609,32 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
|
||||
break;
|
||||
case R_PARISC_PCREL17F:
|
||||
/* 17-bit PC relative address */
|
||||
val = get_stub(me, val, addend, ELF_STUB_GOT, in_init(me, loc));
|
||||
/* calculate direct call offset */
|
||||
val += addend;
|
||||
val = (val - dot - 8)/4;
|
||||
CHECK_RELOC(val, 17)
|
||||
if (!RELOC_REACHABLE(val, 17)) {
|
||||
/* direct distance too far, create
|
||||
* stub entry instead */
|
||||
val = get_stub(me, sym->st_value, addend,
|
||||
ELF_STUB_DIRECT, loc0, targetsec);
|
||||
val = (val - dot - 8)/4;
|
||||
CHECK_RELOC(val, 17);
|
||||
}
|
||||
*loc = (*loc & ~0x1f1ffd) | reassemble_17(val);
|
||||
break;
|
||||
case R_PARISC_PCREL22F:
|
||||
/* 22-bit PC relative address; only defined for pa20 */
|
||||
val = get_stub(me, val, addend, ELF_STUB_GOT, in_init(me, loc));
|
||||
DEBUGP("STUB FOR %s loc %lx+%lx at %lx\n",
|
||||
strtab + sym->st_name, (unsigned long)loc, addend,
|
||||
val)
|
||||
/* calculate direct call offset */
|
||||
val += addend;
|
||||
val = (val - dot - 8)/4;
|
||||
CHECK_RELOC(val, 22);
|
||||
if (!RELOC_REACHABLE(val, 22)) {
|
||||
/* direct distance too far, create
|
||||
* stub entry instead */
|
||||
val = get_stub(me, sym->st_value, addend,
|
||||
ELF_STUB_DIRECT, loc0, targetsec);
|
||||
val = (val - dot - 8)/4;
|
||||
CHECK_RELOC(val, 22);
|
||||
}
|
||||
*loc = (*loc & ~0x3ff1ffd) | reassemble_22(val);
|
||||
break;
|
||||
|
||||
@@ -610,13 +663,17 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
|
||||
Elf64_Addr val;
|
||||
Elf64_Sxword addend;
|
||||
Elf64_Addr dot;
|
||||
Elf_Addr loc0;
|
||||
unsigned int targetsec = sechdrs[relsec].sh_info;
|
||||
|
||||
DEBUGP("Applying relocate section %u to %u\n", relsec,
|
||||
sechdrs[relsec].sh_info);
|
||||
targetsec);
|
||||
for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
|
||||
/* This is where to make the change */
|
||||
loc = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
|
||||
loc = (void *)sechdrs[targetsec].sh_addr
|
||||
+ rel[i].r_offset;
|
||||
/* This is the start of the target section */
|
||||
loc0 = sechdrs[targetsec].sh_addr;
|
||||
/* This is the symbol it is referring to */
|
||||
sym = (Elf64_Sym *)sechdrs[symindex].sh_addr
|
||||
+ ELF64_R_SYM(rel[i].r_info);
|
||||
@@ -672,42 +729,40 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
|
||||
DEBUGP("PCREL22F Symbol %s loc %p val %lx\n",
|
||||
strtab + sym->st_name,
|
||||
loc, val);
|
||||
val += addend;
|
||||
/* can we reach it locally? */
|
||||
if(!in_local_section(me, (void *)val, (void *)dot)) {
|
||||
|
||||
if (in_local(me, (void *)val))
|
||||
/* this is the case where the
|
||||
* symbol is local to the
|
||||
* module, but in a different
|
||||
* section, so stub the jump
|
||||
* in case it's more than 22
|
||||
* bits away */
|
||||
val = get_stub(me, val, addend, ELF_STUB_DIRECT,
|
||||
in_init(me, loc));
|
||||
else if (strncmp(strtab + sym->st_name, "$$", 2)
|
||||
if (in_local(me, (void *)val)) {
|
||||
/* this is the case where the symbol is local
|
||||
* to the module, but in a different section,
|
||||
* so stub the jump in case it's more than 22
|
||||
* bits away */
|
||||
val = (val - dot - 8)/4;
|
||||
if (!RELOC_REACHABLE(val, 22)) {
|
||||
/* direct distance too far, create
|
||||
* stub entry instead */
|
||||
val = get_stub(me, sym->st_value,
|
||||
addend, ELF_STUB_DIRECT,
|
||||
loc0, targetsec);
|
||||
} else {
|
||||
/* Ok, we can reach it directly. */
|
||||
val = sym->st_value;
|
||||
val += addend;
|
||||
}
|
||||
} else {
|
||||
val = sym->st_value;
|
||||
if (strncmp(strtab + sym->st_name, "$$", 2)
|
||||
== 0)
|
||||
val = get_stub(me, val, addend, ELF_STUB_MILLI,
|
||||
in_init(me, loc));
|
||||
loc0, targetsec);
|
||||
else
|
||||
val = get_stub(me, val, addend, ELF_STUB_GOT,
|
||||
in_init(me, loc));
|
||||
loc0, targetsec);
|
||||
}
|
||||
DEBUGP("STUB FOR %s loc %lx, val %lx+%lx at %lx\n",
|
||||
strtab + sym->st_name, loc, sym->st_value,
|
||||
addend, val);
|
||||
/* FIXME: local symbols work as long as the
|
||||
* core and init pieces aren't separated too
|
||||
* far. If this is ever broken, you will trip
|
||||
* the check below. The way to fix it would
|
||||
* be to generate local stubs to go between init
|
||||
* and core */
|
||||
if((Elf64_Sxword)(val - dot - 8) > 0x800000 -1 ||
|
||||
(Elf64_Sxword)(val - dot - 8) < -0x800000) {
|
||||
printk(KERN_ERR "Module %s, symbol %s is out of range for PCREL22F relocation\n",
|
||||
me->name, strtab + sym->st_name);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
val = (val - dot - 8)/4;
|
||||
CHECK_RELOC(val, 22);
|
||||
*loc = (*loc & ~0x3ff1ffd) | reassemble_22(val);
|
||||
break;
|
||||
case R_PARISC_DIR64:
|
||||
@@ -794,12 +849,8 @@ int module_finalize(const Elf_Ehdr *hdr,
|
||||
addr = (u32 *)entry->addr;
|
||||
printk("INSNS: %x %x %x %x\n",
|
||||
addr[0], addr[1], addr[2], addr[3]);
|
||||
printk("stubs used %ld, stubs max %ld\n"
|
||||
"init_stubs used %ld, init stubs max %ld\n"
|
||||
"got entries used %ld, gots max %ld\n"
|
||||
printk("got entries used %ld, gots max %ld\n"
|
||||
"fdescs used %ld, fdescs max %ld\n",
|
||||
me->arch.stub_count, me->arch.stub_max,
|
||||
me->arch.init_stub_count, me->arch.init_stub_max,
|
||||
me->arch.got_count, me->arch.got_max,
|
||||
me->arch.fdesc_count, me->arch.fdesc_max);
|
||||
#endif
|
||||
@@ -829,7 +880,10 @@ int module_finalize(const Elf_Ehdr *hdr,
|
||||
me->name, me->arch.got_count, MAX_GOTS);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
kfree(me->arch.section);
|
||||
me->arch.section = NULL;
|
||||
|
||||
/* no symbol table */
|
||||
if(symhdr == NULL)
|
||||
return 0;
|
||||
|
||||
@@ -97,7 +97,6 @@ spufs_new_inode(struct super_block *sb, int mode)
|
||||
inode->i_mode = mode;
|
||||
inode->i_uid = current_fsuid();
|
||||
inode->i_gid = current_fsgid();
|
||||
inode->i_blocks = 0;
|
||||
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
|
||||
out:
|
||||
return inode;
|
||||
|
||||
@@ -106,7 +106,6 @@ static struct inode *hypfs_make_inode(struct super_block *sb, int mode)
|
||||
ret->i_mode = mode;
|
||||
ret->i_uid = hypfs_info->uid;
|
||||
ret->i_gid = hypfs_info->gid;
|
||||
ret->i_blocks = 0;
|
||||
ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME;
|
||||
if (mode & S_IFDIR)
|
||||
ret->i_nlink = 2;
|
||||
|
||||
@@ -4,6 +4,17 @@
|
||||
|
||||
mainmenu "Linux/SPARC Kernel Configuration"
|
||||
|
||||
config 64BIT
|
||||
bool "64-bit kernel" if ARCH = "sparc"
|
||||
default ARCH = "sparc64"
|
||||
help
|
||||
SPARC is a family of RISC microprocessors designed and marketed by
|
||||
Sun Microsystems, incorporated. They are very widely found in Sun
|
||||
workstations and clones.
|
||||
|
||||
Say yes to build a 64-bit kernel - formerly known as sparc64
|
||||
Say no to build a 32-bit kernel - formerly known as sparc
|
||||
|
||||
config SPARC
|
||||
bool
|
||||
default y
|
||||
@@ -15,22 +26,11 @@ config SPARC
|
||||
select RTC_CLASS
|
||||
select RTC_DRV_M48T59
|
||||
|
||||
# Identify this as a Sparc32 build
|
||||
config SPARC32
|
||||
bool
|
||||
default y if ARCH = "sparc"
|
||||
help
|
||||
SPARC is a family of RISC microprocessors designed and marketed by
|
||||
Sun Microsystems, incorporated. They are very widely found in Sun
|
||||
workstations and clones. This port covers the original 32-bit SPARC;
|
||||
it is old and stable and usually considered one of the "big three"
|
||||
along with the Intel and Alpha ports. The UltraLinux project
|
||||
maintains both the SPARC32 and SPARC64 ports; its web page is
|
||||
available at <http://www.ultralinux.org/>.
|
||||
def_bool !64BIT
|
||||
|
||||
config SPARC64
|
||||
bool
|
||||
default y if ARCH = "sparc64"
|
||||
def_bool 64BIT
|
||||
select ARCH_SUPPORTS_MSI
|
||||
select HAVE_FUNCTION_TRACER
|
||||
select HAVE_KRETPROBES
|
||||
@@ -53,9 +53,6 @@ config BITS
|
||||
default 32 if SPARC32
|
||||
default 64 if SPARC64
|
||||
|
||||
config 64BIT
|
||||
def_bool y if SPARC64
|
||||
|
||||
config GENERIC_TIME
|
||||
bool
|
||||
default y if SPARC64
|
||||
@@ -188,14 +185,6 @@ config ARCH_MAY_HAVE_PC_FDC
|
||||
bool
|
||||
default y
|
||||
|
||||
config ARCH_HAS_ILOG2_U32
|
||||
bool
|
||||
default n
|
||||
|
||||
config ARCH_HAS_ILOG2_U64
|
||||
bool
|
||||
default n
|
||||
|
||||
config EMULATED_CMPXCHG
|
||||
bool
|
||||
default y if SPARC32
|
||||
@@ -442,26 +431,6 @@ config SERIAL_CONSOLE
|
||||
endmenu
|
||||
|
||||
menu "Bus options (PCI etc.)"
|
||||
config ISA
|
||||
bool
|
||||
help
|
||||
ISA is found on Espresso only and is not supported currently.
|
||||
|
||||
config ISAPNP
|
||||
bool
|
||||
help
|
||||
ISAPNP is not supported
|
||||
|
||||
config EISA
|
||||
bool
|
||||
help
|
||||
EISA is not supported.
|
||||
|
||||
config MCA
|
||||
bool
|
||||
help
|
||||
MCA is not supported.
|
||||
|
||||
config SBUS
|
||||
bool
|
||||
default y
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.28-rc4
|
||||
# Mon Nov 10 12:35:09 2008
|
||||
# Linux kernel version: 2.6.28
|
||||
# Fri Jan 2 18:14:26 2009
|
||||
#
|
||||
CONFIG_SPARC=y
|
||||
CONFIG_SPARC64=y
|
||||
CONFIG_ARCH_DEFCONFIG="arch/sparc/configs/sparc64_defconfig"
|
||||
CONFIG_BITS=64
|
||||
CONFIG_64BIT=y
|
||||
CONFIG_GENERIC_TIME=y
|
||||
CONFIG_GENERIC_CMOS_UPDATE=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_64BIT=y
|
||||
CONFIG_MMU=y
|
||||
CONFIG_IOMMU_HELPER=y
|
||||
CONFIG_QUICKLIST=y
|
||||
CONFIG_STACKTRACE_SUPPORT=y
|
||||
CONFIG_LOCKDEP_SUPPORT=y
|
||||
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
|
||||
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
|
||||
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
|
||||
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
|
||||
CONFIG_AUDIT_ARCH=y
|
||||
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
|
||||
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
|
||||
CONFIG_MMU=y
|
||||
CONFIG_ARCH_NO_VIRT_TO_BUS=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
|
||||
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
|
||||
|
||||
#
|
||||
@@ -86,6 +86,7 @@ CONFIG_SLUB_DEBUG=y
|
||||
CONFIG_SLUB=y
|
||||
# CONFIG_SLOB is not set
|
||||
CONFIG_PROFILING=y
|
||||
CONFIG_TRACEPOINTS=y
|
||||
# CONFIG_MARKERS is not set
|
||||
CONFIG_OPROFILE=m
|
||||
CONFIG_HAVE_OPROFILE=y
|
||||
@@ -127,34 +128,40 @@ CONFIG_DEFAULT_AS=y
|
||||
# CONFIG_DEFAULT_NOOP is not set
|
||||
CONFIG_DEFAULT_IOSCHED="anticipatory"
|
||||
CONFIG_CLASSIC_RCU=y
|
||||
# CONFIG_TREE_RCU is not set
|
||||
# CONFIG_PREEMPT_RCU is not set
|
||||
# CONFIG_TREE_RCU_TRACE is not set
|
||||
# CONFIG_PREEMPT_RCU_TRACE is not set
|
||||
# CONFIG_FREEZER is not set
|
||||
|
||||
#
|
||||
# Processor type and features
|
||||
#
|
||||
CONFIG_SPARC64_PAGE_SIZE_8KB=y
|
||||
# CONFIG_SPARC64_PAGE_SIZE_64KB is not set
|
||||
CONFIG_SECCOMP=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_NR_CPUS=64
|
||||
CONFIG_HZ_100=y
|
||||
# CONFIG_HZ_250 is not set
|
||||
# CONFIG_HZ_300 is not set
|
||||
# CONFIG_HZ_1000 is not set
|
||||
CONFIG_HZ=100
|
||||
CONFIG_SCHED_HRTICK=y
|
||||
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
|
||||
CONFIG_GENERIC_FIND_NEXT_BIT=y
|
||||
CONFIG_GENERIC_HWEIGHT=y
|
||||
CONFIG_GENERIC_CALIBRATE_DELAY=y
|
||||
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
|
||||
CONFIG_SPARC64_SMP=y
|
||||
CONFIG_SPARC64_PAGE_SIZE_8KB=y
|
||||
# CONFIG_SPARC64_PAGE_SIZE_64KB is not set
|
||||
CONFIG_SECCOMP=y
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
CONFIG_GENERIC_HARDIRQS=y
|
||||
CONFIG_TICK_ONESHOT=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_NR_CPUS=64
|
||||
# CONFIG_CPU_FREQ is not set
|
||||
CONFIG_US3_MC=y
|
||||
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
|
||||
CONFIG_GENERIC_FIND_NEXT_BIT=y
|
||||
CONFIG_GENERIC_HWEIGHT=y
|
||||
CONFIG_GENERIC_CALIBRATE_DELAY=y
|
||||
CONFIG_HUGETLB_PAGE_SIZE_4MB=y
|
||||
# CONFIG_HUGETLB_PAGE_SIZE_512K is not set
|
||||
# CONFIG_HUGETLB_PAGE_SIZE_64K is not set
|
||||
@@ -183,10 +190,18 @@ CONFIG_PHYS_ADDR_T_64BIT=y
|
||||
CONFIG_ZONE_DMA_FLAG=0
|
||||
CONFIG_NR_QUICK=1
|
||||
CONFIG_UNEVICTABLE_LRU=y
|
||||
CONFIG_SCHED_SMT=y
|
||||
CONFIG_SCHED_MC=y
|
||||
# CONFIG_PREEMPT_NONE is not set
|
||||
CONFIG_PREEMPT_VOLUNTARY=y
|
||||
# CONFIG_PREEMPT is not set
|
||||
# CONFIG_CMDLINE_BOOL is not set
|
||||
|
||||
#
|
||||
# Bus options (PCI etc.)
|
||||
#
|
||||
CONFIG_SBUS=y
|
||||
CONFIG_SBUSCHAR=y
|
||||
CONFIG_SUN_AUXIO=y
|
||||
CONFIG_SUN_IO=y
|
||||
CONFIG_SUN_LDOMS=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
@@ -195,7 +210,9 @@ CONFIG_ARCH_SUPPORTS_MSI=y
|
||||
CONFIG_PCI_MSI=y
|
||||
# CONFIG_PCI_LEGACY is not set
|
||||
# CONFIG_PCI_DEBUG is not set
|
||||
# CONFIG_PCCARD is not set
|
||||
CONFIG_SUN_OPENPROMFS=m
|
||||
CONFIG_SPARC64_PCI=y
|
||||
|
||||
#
|
||||
# Executable file formats
|
||||
@@ -207,17 +224,13 @@ CONFIG_COMPAT_BINFMT_ELF=y
|
||||
CONFIG_BINFMT_MISC=m
|
||||
CONFIG_COMPAT=y
|
||||
CONFIG_SYSVIPC_COMPAT=y
|
||||
CONFIG_SCHED_SMT=y
|
||||
CONFIG_SCHED_MC=y
|
||||
# CONFIG_PREEMPT_NONE is not set
|
||||
CONFIG_PREEMPT_VOLUNTARY=y
|
||||
# CONFIG_PREEMPT is not set
|
||||
# CONFIG_CMDLINE_BOOL is not set
|
||||
CONFIG_NET=y
|
||||
|
||||
#
|
||||
# Networking options
|
||||
#
|
||||
# CONFIG_NET_NS is not set
|
||||
CONFIG_COMPAT_NET_DEV_OPS=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_PACKET_MMAP=y
|
||||
CONFIG_UNIX=y
|
||||
@@ -314,6 +327,7 @@ CONFIG_VLAN_8021Q=m
|
||||
# CONFIG_ECONET is not set
|
||||
# CONFIG_WAN_ROUTER is not set
|
||||
# CONFIG_NET_SCHED is not set
|
||||
# CONFIG_DCB is not set
|
||||
|
||||
#
|
||||
# Network testing
|
||||
@@ -330,8 +344,8 @@ CONFIG_WIRELESS=y
|
||||
# CONFIG_CFG80211 is not set
|
||||
CONFIG_WIRELESS_OLD_REGULATORY=y
|
||||
# CONFIG_WIRELESS_EXT is not set
|
||||
# CONFIG_LIB80211 is not set
|
||||
# CONFIG_MAC80211 is not set
|
||||
# CONFIG_IEEE80211 is not set
|
||||
# CONFIG_RFKILL is not set
|
||||
# CONFIG_NET_9P is not set
|
||||
|
||||
@@ -378,8 +392,10 @@ CONFIG_MISC_DEVICES=y
|
||||
# CONFIG_EEPROM_93CX6 is not set
|
||||
# CONFIG_SGI_IOC4 is not set
|
||||
# CONFIG_TIFM_CORE is not set
|
||||
# CONFIG_ICS932S401 is not set
|
||||
# CONFIG_ENCLOSURE_SERVICES is not set
|
||||
# CONFIG_HP_ILO is not set
|
||||
# CONFIG_C2PORT is not set
|
||||
CONFIG_HAVE_IDE=y
|
||||
CONFIG_IDE=y
|
||||
|
||||
@@ -387,6 +403,7 @@ CONFIG_IDE=y
|
||||
# Please see Documentation/ide/ide.txt for help/info on IDE drives
|
||||
#
|
||||
CONFIG_IDE_TIMINGS=y
|
||||
CONFIG_IDE_ATAPI=y
|
||||
# CONFIG_BLK_DEV_IDE_SATA is not set
|
||||
CONFIG_IDE_GD=y
|
||||
CONFIG_IDE_GD_ATA=y
|
||||
@@ -394,7 +411,6 @@ CONFIG_IDE_GD_ATA=y
|
||||
CONFIG_BLK_DEV_IDECD=y
|
||||
CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
|
||||
# CONFIG_BLK_DEV_IDETAPE is not set
|
||||
# CONFIG_BLK_DEV_IDESCSI is not set
|
||||
# CONFIG_IDE_TASK_IOCTL is not set
|
||||
CONFIG_IDE_PROC_FS=y
|
||||
|
||||
@@ -477,6 +493,7 @@ CONFIG_SCSI_FC_ATTRS=y
|
||||
# CONFIG_SCSI_SRP_ATTRS is not set
|
||||
CONFIG_SCSI_LOWLEVEL=y
|
||||
# CONFIG_ISCSI_TCP is not set
|
||||
# CONFIG_SCSI_CXGB3_ISCSI is not set
|
||||
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
|
||||
# CONFIG_SCSI_3W_9XXX is not set
|
||||
# CONFIG_SCSI_ACARD is not set
|
||||
@@ -490,6 +507,8 @@ CONFIG_SCSI_LOWLEVEL=y
|
||||
# CONFIG_MEGARAID_LEGACY is not set
|
||||
# CONFIG_MEGARAID_SAS is not set
|
||||
# CONFIG_SCSI_HPTIOP is not set
|
||||
# CONFIG_LIBFC is not set
|
||||
# CONFIG_FCOE is not set
|
||||
# CONFIG_SCSI_DMX3191D is not set
|
||||
# CONFIG_SCSI_FUTURE_DOMAIN is not set
|
||||
# CONFIG_SCSI_IPS is not set
|
||||
@@ -564,6 +583,9 @@ CONFIG_PHYLIB=m
|
||||
# CONFIG_BROADCOM_PHY is not set
|
||||
# CONFIG_ICPLUS_PHY is not set
|
||||
# CONFIG_REALTEK_PHY is not set
|
||||
# CONFIG_NATIONAL_PHY is not set
|
||||
# CONFIG_STE10XP is not set
|
||||
# CONFIG_LSI_ET1011C_PHY is not set
|
||||
# CONFIG_MDIO_BITBANG is not set
|
||||
CONFIG_NET_ETHERNET=y
|
||||
CONFIG_MII=m
|
||||
@@ -590,7 +612,6 @@ CONFIG_NET_PCI=y
|
||||
# CONFIG_ADAPTEC_STARFIRE is not set
|
||||
# CONFIG_B44 is not set
|
||||
# CONFIG_FORCEDETH is not set
|
||||
# CONFIG_EEPRO100 is not set
|
||||
# CONFIG_E100 is not set
|
||||
# CONFIG_FEALNX is not set
|
||||
# CONFIG_NATSEMI is not set
|
||||
@@ -600,6 +621,7 @@ CONFIG_NET_PCI=y
|
||||
# CONFIG_R6040 is not set
|
||||
# CONFIG_SIS900 is not set
|
||||
# CONFIG_EPIC100 is not set
|
||||
# CONFIG_SMSC9420 is not set
|
||||
# CONFIG_SUNDANCE is not set
|
||||
# CONFIG_TLAN is not set
|
||||
# CONFIG_VIA_RHINE is not set
|
||||
@@ -629,6 +651,7 @@ CONFIG_BNX2=m
|
||||
# CONFIG_JME is not set
|
||||
CONFIG_NETDEV_10000=y
|
||||
# CONFIG_CHELSIO_T1 is not set
|
||||
CONFIG_CHELSIO_T3_DEPENDS=y
|
||||
# CONFIG_CHELSIO_T3 is not set
|
||||
# CONFIG_ENIC is not set
|
||||
# CONFIG_IXGBE is not set
|
||||
@@ -778,6 +801,7 @@ CONFIG_SERIAL_CORE=y
|
||||
CONFIG_SERIAL_CORE_CONSOLE=y
|
||||
# CONFIG_SERIAL_JSM is not set
|
||||
CONFIG_UNIX98_PTYS=y
|
||||
# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
# CONFIG_IPMI_HANDLER is not set
|
||||
CONFIG_HW_RANDOM=m
|
||||
@@ -870,6 +894,7 @@ CONFIG_HWMON=y
|
||||
# CONFIG_SENSORS_ADM1029 is not set
|
||||
# CONFIG_SENSORS_ADM1031 is not set
|
||||
# CONFIG_SENSORS_ADM9240 is not set
|
||||
# CONFIG_SENSORS_ADT7462 is not set
|
||||
# CONFIG_SENSORS_ADT7470 is not set
|
||||
# CONFIG_SENSORS_ADT7473 is not set
|
||||
# CONFIG_SENSORS_ATXP1 is not set
|
||||
@@ -919,11 +944,11 @@ CONFIG_HWMON=y
|
||||
# CONFIG_THERMAL is not set
|
||||
# CONFIG_THERMAL_HWMON is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
CONFIG_SSB_POSSIBLE=y
|
||||
|
||||
#
|
||||
# Sonics Silicon Backplane
|
||||
#
|
||||
CONFIG_SSB_POSSIBLE=y
|
||||
# CONFIG_SSB is not set
|
||||
|
||||
#
|
||||
@@ -1071,6 +1096,7 @@ CONFIG_SND_MIXER_OSS=m
|
||||
CONFIG_SND_PCM_OSS=m
|
||||
CONFIG_SND_PCM_OSS_PLUGINS=y
|
||||
CONFIG_SND_SEQUENCER_OSS=y
|
||||
# CONFIG_SND_HRTIMER is not set
|
||||
# CONFIG_SND_DYNAMIC_MINORS is not set
|
||||
CONFIG_SND_SUPPORT_OLD_API=y
|
||||
CONFIG_SND_VERBOSE_PROCFS=y
|
||||
@@ -1242,11 +1268,11 @@ CONFIG_USB_UHCI_HCD=m
|
||||
# CONFIG_USB_TMC is not set
|
||||
|
||||
#
|
||||
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
|
||||
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
|
||||
#
|
||||
|
||||
#
|
||||
# may also be needed; see USB_STORAGE Help for more information
|
||||
# see USB_STORAGE Help for more information
|
||||
#
|
||||
CONFIG_USB_STORAGE=m
|
||||
# CONFIG_USB_STORAGE_DEBUG is not set
|
||||
@@ -1337,6 +1363,7 @@ CONFIG_RTC_INTF_DEV=y
|
||||
# CONFIG_RTC_DRV_M41T80 is not set
|
||||
# CONFIG_RTC_DRV_S35390A is not set
|
||||
# CONFIG_RTC_DRV_FM3130 is not set
|
||||
# CONFIG_RTC_DRV_RX8581 is not set
|
||||
|
||||
#
|
||||
# SPI RTC drivers
|
||||
@@ -1365,7 +1392,6 @@ CONFIG_RTC_DRV_STARFIRE=y
|
||||
# CONFIG_DMADEVICES is not set
|
||||
# CONFIG_UIO is not set
|
||||
# CONFIG_STAGING is not set
|
||||
CONFIG_STAGING_EXCLUDE_BUILD=y
|
||||
|
||||
#
|
||||
# Misc Linux/SPARC drivers
|
||||
@@ -1544,6 +1570,7 @@ CONFIG_SCHEDSTATS=y
|
||||
# CONFIG_LOCK_STAT is not set
|
||||
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
|
||||
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
|
||||
CONFIG_STACKTRACE=y
|
||||
# CONFIG_DEBUG_KOBJECT is not set
|
||||
CONFIG_DEBUG_BUGVERBOSE=y
|
||||
# CONFIG_DEBUG_INFO is not set
|
||||
@@ -1552,6 +1579,7 @@ CONFIG_DEBUG_BUGVERBOSE=y
|
||||
CONFIG_DEBUG_MEMORY_INIT=y
|
||||
# CONFIG_DEBUG_LIST is not set
|
||||
# CONFIG_DEBUG_SG is not set
|
||||
# CONFIG_DEBUG_NOTIFIERS is not set
|
||||
# CONFIG_BOOT_PRINTK_DELAY is not set
|
||||
# CONFIG_RCU_TORTURE_TEST is not set
|
||||
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
|
||||
@@ -1560,8 +1588,12 @@ CONFIG_DEBUG_MEMORY_INIT=y
|
||||
# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
|
||||
# CONFIG_LKDTM is not set
|
||||
# CONFIG_FAULT_INJECTION is not set
|
||||
# CONFIG_LATENCYTOP is not set
|
||||
CONFIG_SYSCTL_SYSCALL_CHECK=y
|
||||
CONFIG_NOP_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_TRACER=y
|
||||
CONFIG_RING_BUFFER=y
|
||||
CONFIG_TRACING=y
|
||||
|
||||
#
|
||||
# Tracers
|
||||
@@ -1571,7 +1603,9 @@ CONFIG_HAVE_FUNCTION_TRACER=y
|
||||
# CONFIG_SCHED_TRACER is not set
|
||||
# CONFIG_CONTEXT_SWITCH_TRACER is not set
|
||||
# CONFIG_BOOT_TRACER is not set
|
||||
# CONFIG_TRACE_BRANCH_PROFILING is not set
|
||||
# CONFIG_STACK_TRACER is not set
|
||||
# CONFIG_FTRACE_STARTUP_TEST is not set
|
||||
# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
|
||||
# CONFIG_SAMPLES is not set
|
||||
CONFIG_HAVE_ARCH_KGDB=y
|
||||
@@ -1600,11 +1634,16 @@ CONFIG_CRYPTO=y
|
||||
#
|
||||
# CONFIG_CRYPTO_FIPS is not set
|
||||
CONFIG_CRYPTO_ALGAPI=y
|
||||
CONFIG_CRYPTO_ALGAPI2=y
|
||||
CONFIG_CRYPTO_AEAD=y
|
||||
CONFIG_CRYPTO_AEAD2=y
|
||||
CONFIG_CRYPTO_BLKCIPHER=y
|
||||
CONFIG_CRYPTO_BLKCIPHER2=y
|
||||
CONFIG_CRYPTO_HASH=y
|
||||
CONFIG_CRYPTO_RNG=y
|
||||
CONFIG_CRYPTO_HASH2=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_MANAGER=y
|
||||
CONFIG_CRYPTO_MANAGER2=y
|
||||
CONFIG_CRYPTO_GF128MUL=m
|
||||
CONFIG_CRYPTO_NULL=m
|
||||
# CONFIG_CRYPTO_CRYPTD is not set
|
||||
|
||||
@@ -1,21 +1,6 @@
|
||||
# User exported sparc header files
|
||||
include include/asm-generic/Kbuild.asm
|
||||
|
||||
header-y += ipcbuf_32.h
|
||||
header-y += ipcbuf_64.h
|
||||
header-y += posix_types_32.h
|
||||
header-y += posix_types_64.h
|
||||
header-y += ptrace_32.h
|
||||
header-y += ptrace_64.h
|
||||
header-y += sigcontext_32.h
|
||||
header-y += sigcontext_64.h
|
||||
header-y += siginfo_32.h
|
||||
header-y += siginfo_64.h
|
||||
header-y += signal_32.h
|
||||
header-y += signal_64.h
|
||||
header-y += stat_32.h
|
||||
header-y += stat_64.h
|
||||
|
||||
header-y += apc.h
|
||||
header-y += asi.h
|
||||
header-y += display7seg.h
|
||||
@@ -23,16 +8,11 @@ header-y += envctrl.h
|
||||
header-y += fbio.h
|
||||
header-y += jsflash.h
|
||||
header-y += openprom.h
|
||||
header-y += openprom_32.h
|
||||
header-y += openprom_64.h
|
||||
header-y += openpromio.h
|
||||
header-y += perfctr.h
|
||||
header-y += psrcompat.h
|
||||
header-y += psr.h
|
||||
header-y += pstate.h
|
||||
header-y += reg.h
|
||||
header-y += reg_32.h
|
||||
header-y += reg_64.h
|
||||
header-y += traps.h
|
||||
header-y += uctx.h
|
||||
header-y += utrap.h
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
#ifndef _SPARC_BYTEORDER_H
|
||||
#define _SPARC_BYTEORDER_H
|
||||
|
||||
#include <asm/types.h>
|
||||
#include <linux/types.h>
|
||||
#include <asm/asi.h>
|
||||
|
||||
#define __BIG_ENDIAN
|
||||
|
||||
#ifdef CONFIG_SPARC32
|
||||
#define __SWAB_64_THRU_32__
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SPARC64
|
||||
#if defined(__sparc__) && defined(__arch64__)
|
||||
static inline __u16 __arch_swab16p(const __u16 *addr)
|
||||
{
|
||||
__u16 ret;
|
||||
@@ -44,7 +40,9 @@ static inline __u64 __arch_swab64p(const __u64 *addr)
|
||||
}
|
||||
#define __arch_swab64p __arch_swab64p
|
||||
|
||||
#endif /* CONFIG_SPARC64 */
|
||||
#else
|
||||
#define __SWAB_64_THRU_32__
|
||||
#endif /* defined(__sparc__) && defined(__arch64__) */
|
||||
|
||||
#include <linux/byteorder.h>
|
||||
|
||||
|
||||
@@ -1,8 +1,32 @@
|
||||
#ifndef ___ASM_SPARC_IPCBUF_H
|
||||
#define ___ASM_SPARC_IPCBUF_H
|
||||
#if defined(__sparc__) && defined(__arch64__)
|
||||
#include <asm/ipcbuf_64.h>
|
||||
#else
|
||||
#include <asm/ipcbuf_32.h>
|
||||
#endif
|
||||
#ifndef __SPARC_IPCBUF_H
|
||||
#define __SPARC_IPCBUF_H
|
||||
|
||||
/*
|
||||
* The ipc64_perm structure for sparc/sparc64 architecture.
|
||||
* Note extra padding because this structure is passed back and forth
|
||||
* between kernel and user space.
|
||||
*
|
||||
* Pad space is left for:
|
||||
* - 32-bit seq
|
||||
* - on sparc for 32 bit mode (it is 32 bit on sparc64)
|
||||
* - 2 miscellaneous 64-bit values
|
||||
*/
|
||||
|
||||
struct ipc64_perm
|
||||
{
|
||||
__kernel_key_t key;
|
||||
__kernel_uid_t uid;
|
||||
__kernel_gid_t gid;
|
||||
__kernel_uid_t cuid;
|
||||
__kernel_gid_t cgid;
|
||||
#ifndef __arch64__
|
||||
unsigned short __pad0;
|
||||
#endif
|
||||
__kernel_mode_t mode;
|
||||
unsigned short __pad1;
|
||||
unsigned short seq;
|
||||
unsigned long long __unused1;
|
||||
unsigned long long __unused2;
|
||||
};
|
||||
|
||||
#endif /* __SPARC_IPCBUF_H */
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
#ifndef _SPARC_IPCBUF_H
|
||||
#define _SPARC_IPCBUF_H
|
||||
|
||||
/*
|
||||
* The ipc64_perm structure for sparc architecture.
|
||||
* Note extra padding because this structure is passed back and forth
|
||||
* between kernel and user space.
|
||||
*
|
||||
* Pad space is left for:
|
||||
* - 32-bit mode
|
||||
* - 32-bit seq
|
||||
* - 2 miscellaneous 64-bit values (so that this structure matches
|
||||
* sparc64 ipc64_perm)
|
||||
*/
|
||||
|
||||
struct ipc64_perm
|
||||
{
|
||||
__kernel_key_t key;
|
||||
__kernel_uid32_t uid;
|
||||
__kernel_gid32_t gid;
|
||||
__kernel_uid32_t cuid;
|
||||
__kernel_gid32_t cgid;
|
||||
unsigned short __pad1;
|
||||
__kernel_mode_t mode;
|
||||
unsigned short __pad2;
|
||||
unsigned short seq;
|
||||
unsigned long long __unused1;
|
||||
unsigned long long __unused2;
|
||||
};
|
||||
|
||||
#endif /* _SPARC_IPCBUF_H */
|
||||
@@ -1,28 +0,0 @@
|
||||
#ifndef _SPARC64_IPCBUF_H
|
||||
#define _SPARC64_IPCBUF_H
|
||||
|
||||
/*
|
||||
* The ipc64_perm structure for sparc64 architecture.
|
||||
* Note extra padding because this structure is passed back and forth
|
||||
* between kernel and user space.
|
||||
*
|
||||
* Pad space is left for:
|
||||
* - 32-bit seq
|
||||
* - 2 miscellaneous 64-bit values
|
||||
*/
|
||||
|
||||
struct ipc64_perm
|
||||
{
|
||||
__kernel_key_t key;
|
||||
__kernel_uid_t uid;
|
||||
__kernel_gid_t gid;
|
||||
__kernel_uid_t cuid;
|
||||
__kernel_gid_t cgid;
|
||||
__kernel_mode_t mode;
|
||||
unsigned short __pad1;
|
||||
unsigned short seq;
|
||||
unsigned long __unused1;
|
||||
unsigned long __unused2;
|
||||
};
|
||||
|
||||
#endif /* _SPARC64_IPCBUF_H */
|
||||
@@ -8,7 +8,7 @@
|
||||
#define _SPARC_JSFLASH_H
|
||||
|
||||
#ifndef _SPARC_TYPES_H
|
||||
#include <asm/types.h>
|
||||
#include <linux/types.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,8 +1,277 @@
|
||||
#ifndef ___ASM_SPARC_OPENPROM_H
|
||||
#define ___ASM_SPARC_OPENPROM_H
|
||||
#ifndef __SPARC_OPENPROM_H
|
||||
#define __SPARC_OPENPROM_H
|
||||
|
||||
/* openprom.h: Prom structures and defines for access to the OPENBOOT
|
||||
* prom routines and data areas.
|
||||
*
|
||||
* Copyright (C) 1995,1996 David S. Miller (davem@caip.rutgers.edu)
|
||||
*/
|
||||
|
||||
/* Empirical constants... */
|
||||
#define LINUX_OPPROM_MAGIC 0x10010407
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
/* V0 prom device operations. */
|
||||
struct linux_dev_v0_funcs {
|
||||
int (*v0_devopen)(char *device_str);
|
||||
int (*v0_devclose)(int dev_desc);
|
||||
int (*v0_rdblkdev)(int dev_desc, int num_blks, int blk_st, char *buf);
|
||||
int (*v0_wrblkdev)(int dev_desc, int num_blks, int blk_st, char *buf);
|
||||
int (*v0_wrnetdev)(int dev_desc, int num_bytes, char *buf);
|
||||
int (*v0_rdnetdev)(int dev_desc, int num_bytes, char *buf);
|
||||
int (*v0_rdchardev)(int dev_desc, int num_bytes, int dummy, char *buf);
|
||||
int (*v0_wrchardev)(int dev_desc, int num_bytes, int dummy, char *buf);
|
||||
int (*v0_seekdev)(int dev_desc, long logical_offst, int from);
|
||||
};
|
||||
|
||||
/* V2 and later prom device operations. */
|
||||
struct linux_dev_v2_funcs {
|
||||
int (*v2_inst2pkg)(int d); /* Convert ihandle to phandle */
|
||||
char * (*v2_dumb_mem_alloc)(char *va, unsigned sz);
|
||||
void (*v2_dumb_mem_free)(char *va, unsigned sz);
|
||||
|
||||
/* To map devices into virtual I/O space. */
|
||||
char * (*v2_dumb_mmap)(char *virta, int which_io, unsigned paddr, unsigned sz);
|
||||
void (*v2_dumb_munmap)(char *virta, unsigned size);
|
||||
|
||||
int (*v2_dev_open)(char *devpath);
|
||||
void (*v2_dev_close)(int d);
|
||||
int (*v2_dev_read)(int d, char *buf, int nbytes);
|
||||
int (*v2_dev_write)(int d, char *buf, int nbytes);
|
||||
int (*v2_dev_seek)(int d, int hi, int lo);
|
||||
|
||||
/* Never issued (multistage load support) */
|
||||
void (*v2_wheee2)(void);
|
||||
void (*v2_wheee3)(void);
|
||||
};
|
||||
|
||||
struct linux_mlist_v0 {
|
||||
struct linux_mlist_v0 *theres_more;
|
||||
unsigned int start_adr;
|
||||
unsigned num_bytes;
|
||||
};
|
||||
|
||||
struct linux_mem_v0 {
|
||||
struct linux_mlist_v0 **v0_totphys;
|
||||
struct linux_mlist_v0 **v0_prommap;
|
||||
struct linux_mlist_v0 **v0_available; /* What we can use */
|
||||
};
|
||||
|
||||
/* Arguments sent to the kernel from the boot prompt. */
|
||||
struct linux_arguments_v0 {
|
||||
char *argv[8];
|
||||
char args[100];
|
||||
char boot_dev[2];
|
||||
int boot_dev_ctrl;
|
||||
int boot_dev_unit;
|
||||
int dev_partition;
|
||||
char *kernel_file_name;
|
||||
void *aieee1; /* XXX */
|
||||
};
|
||||
|
||||
/* V2 and up boot things. */
|
||||
struct linux_bootargs_v2 {
|
||||
char **bootpath;
|
||||
char **bootargs;
|
||||
int *fd_stdin;
|
||||
int *fd_stdout;
|
||||
};
|
||||
|
||||
/* The top level PROM vector. */
|
||||
struct linux_romvec {
|
||||
/* Version numbers. */
|
||||
unsigned int pv_magic_cookie;
|
||||
unsigned int pv_romvers;
|
||||
unsigned int pv_plugin_revision;
|
||||
unsigned int pv_printrev;
|
||||
|
||||
/* Version 0 memory descriptors. */
|
||||
struct linux_mem_v0 pv_v0mem;
|
||||
|
||||
/* Node operations. */
|
||||
struct linux_nodeops *pv_nodeops;
|
||||
|
||||
char **pv_bootstr;
|
||||
struct linux_dev_v0_funcs pv_v0devops;
|
||||
|
||||
char *pv_stdin;
|
||||
char *pv_stdout;
|
||||
#define PROMDEV_KBD 0 /* input from keyboard */
|
||||
#define PROMDEV_SCREEN 0 /* output to screen */
|
||||
#define PROMDEV_TTYA 1 /* in/out to ttya */
|
||||
#define PROMDEV_TTYB 2 /* in/out to ttyb */
|
||||
|
||||
/* Blocking getchar/putchar. NOT REENTRANT! (grr) */
|
||||
int (*pv_getchar)(void);
|
||||
void (*pv_putchar)(int ch);
|
||||
|
||||
/* Non-blocking variants. */
|
||||
int (*pv_nbgetchar)(void);
|
||||
int (*pv_nbputchar)(int ch);
|
||||
|
||||
void (*pv_putstr)(char *str, int len);
|
||||
|
||||
/* Miscellany. */
|
||||
void (*pv_reboot)(char *bootstr);
|
||||
void (*pv_printf)(__const__ char *fmt, ...);
|
||||
void (*pv_abort)(void);
|
||||
__volatile__ int *pv_ticks;
|
||||
void (*pv_halt)(void);
|
||||
void (**pv_synchook)(void);
|
||||
|
||||
/* Evaluate a forth string, not different proto for V0 and V2->up. */
|
||||
union {
|
||||
void (*v0_eval)(int len, char *str);
|
||||
void (*v2_eval)(char *str);
|
||||
} pv_fortheval;
|
||||
|
||||
struct linux_arguments_v0 **pv_v0bootargs;
|
||||
|
||||
/* Get ether address. */
|
||||
unsigned int (*pv_enaddr)(int d, char *enaddr);
|
||||
|
||||
struct linux_bootargs_v2 pv_v2bootargs;
|
||||
struct linux_dev_v2_funcs pv_v2devops;
|
||||
|
||||
int filler[15];
|
||||
|
||||
/* This one is sun4c/sun4 only. */
|
||||
void (*pv_setctxt)(int ctxt, char *va, int pmeg);
|
||||
|
||||
/* Prom version 3 Multiprocessor routines. This stuff is crazy.
|
||||
* No joke. Calling these when there is only one cpu probably
|
||||
* crashes the machine, have to test this. :-)
|
||||
*/
|
||||
|
||||
/* v3_cpustart() will start the cpu 'whichcpu' in mmu-context
|
||||
* 'thiscontext' executing at address 'prog_counter'
|
||||
*/
|
||||
int (*v3_cpustart)(unsigned int whichcpu, int ctxtbl_ptr,
|
||||
int thiscontext, char *prog_counter);
|
||||
|
||||
/* v3_cpustop() will cause cpu 'whichcpu' to stop executing
|
||||
* until a resume cpu call is made.
|
||||
*/
|
||||
int (*v3_cpustop)(unsigned int whichcpu);
|
||||
|
||||
/* v3_cpuidle() will idle cpu 'whichcpu' until a stop or
|
||||
* resume cpu call is made.
|
||||
*/
|
||||
int (*v3_cpuidle)(unsigned int whichcpu);
|
||||
|
||||
/* v3_cpuresume() will resume processor 'whichcpu' executing
|
||||
* starting with whatever 'pc' and 'npc' were left at the
|
||||
* last 'idle' or 'stop' call.
|
||||
*/
|
||||
int (*v3_cpuresume)(unsigned int whichcpu);
|
||||
};
|
||||
|
||||
/* Routines for traversing the prom device tree. */
|
||||
struct linux_nodeops {
|
||||
int (*no_nextnode)(int node);
|
||||
int (*no_child)(int node);
|
||||
int (*no_proplen)(int node, const char *name);
|
||||
int (*no_getprop)(int node, const char *name, char *val);
|
||||
int (*no_setprop)(int node, const char *name, char *val, int len);
|
||||
char * (*no_nextprop)(int node, char *name);
|
||||
};
|
||||
|
||||
/* More fun PROM structures for device probing. */
|
||||
#if defined(__sparc__) && defined(__arch64__)
|
||||
#include <asm/openprom_64.h>
|
||||
#define PROMREG_MAX 24
|
||||
#define PROMVADDR_MAX 16
|
||||
#define PROMINTR_MAX 32
|
||||
#else
|
||||
#include <asm/openprom_32.h>
|
||||
#define PROMREG_MAX 16
|
||||
#define PROMVADDR_MAX 16
|
||||
#define PROMINTR_MAX 15
|
||||
#endif
|
||||
|
||||
struct linux_prom_registers {
|
||||
unsigned int which_io; /* hi part of physical address */
|
||||
unsigned int phys_addr; /* The physical address of this register */
|
||||
unsigned int reg_size; /* How many bytes does this register take up? */
|
||||
};
|
||||
|
||||
struct linux_prom64_registers {
|
||||
unsigned long phys_addr;
|
||||
unsigned long reg_size;
|
||||
};
|
||||
|
||||
struct linux_prom_irqs {
|
||||
int pri; /* IRQ priority */
|
||||
int vector; /* This is foobar, what does it do? */
|
||||
};
|
||||
|
||||
/* Element of the "ranges" vector */
|
||||
struct linux_prom_ranges {
|
||||
unsigned int ot_child_space;
|
||||
unsigned int ot_child_base; /* Bus feels this */
|
||||
unsigned int ot_parent_space;
|
||||
unsigned int ot_parent_base; /* CPU looks from here */
|
||||
unsigned int or_size;
|
||||
};
|
||||
|
||||
/*
|
||||
* Ranges and reg properties are a bit different for PCI.
|
||||
*/
|
||||
#if defined(__sparc__) && defined(__arch64__)
|
||||
struct linux_prom_pci_registers {
|
||||
unsigned int phys_hi;
|
||||
unsigned int phys_mid;
|
||||
unsigned int phys_lo;
|
||||
|
||||
unsigned int size_hi;
|
||||
unsigned int size_lo;
|
||||
};
|
||||
#else
|
||||
struct linux_prom_pci_registers {
|
||||
/*
|
||||
* We don't know what information this field contain.
|
||||
* We guess, PCI device function is in bits 15:8
|
||||
* So, ...
|
||||
*/
|
||||
unsigned int which_io; /* Let it be which_io */
|
||||
|
||||
unsigned int phys_hi;
|
||||
unsigned int phys_lo;
|
||||
|
||||
unsigned int size_hi;
|
||||
unsigned int size_lo;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
struct linux_prom_pci_ranges {
|
||||
unsigned int child_phys_hi; /* Only certain bits are encoded here. */
|
||||
unsigned int child_phys_mid;
|
||||
unsigned int child_phys_lo;
|
||||
|
||||
unsigned int parent_phys_hi;
|
||||
unsigned int parent_phys_lo;
|
||||
|
||||
unsigned int size_hi;
|
||||
unsigned int size_lo;
|
||||
};
|
||||
|
||||
struct linux_prom_pci_intmap {
|
||||
unsigned int phys_hi;
|
||||
unsigned int phys_mid;
|
||||
unsigned int phys_lo;
|
||||
|
||||
unsigned int interrupt;
|
||||
|
||||
int cnode;
|
||||
unsigned int cinterrupt;
|
||||
};
|
||||
|
||||
struct linux_prom_pci_intmask {
|
||||
unsigned int phys_hi;
|
||||
unsigned int phys_mid;
|
||||
unsigned int phys_lo;
|
||||
unsigned int interrupt;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLY__) */
|
||||
|
||||
#endif /* !(__SPARC_OPENPROM_H) */
|
||||
|
||||
@@ -1,255 +0,0 @@
|
||||
#ifndef __SPARC_OPENPROM_H
|
||||
#define __SPARC_OPENPROM_H
|
||||
|
||||
/* openprom.h: Prom structures and defines for access to the OPENBOOT
|
||||
* prom routines and data areas.
|
||||
*
|
||||
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
|
||||
*/
|
||||
|
||||
/* Empirical constants... */
|
||||
#define LINUX_OPPROM_MAGIC 0x10010407
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
/* V0 prom device operations. */
|
||||
struct linux_dev_v0_funcs {
|
||||
int (*v0_devopen)(char *device_str);
|
||||
int (*v0_devclose)(int dev_desc);
|
||||
int (*v0_rdblkdev)(int dev_desc, int num_blks, int blk_st, char *buf);
|
||||
int (*v0_wrblkdev)(int dev_desc, int num_blks, int blk_st, char *buf);
|
||||
int (*v0_wrnetdev)(int dev_desc, int num_bytes, char *buf);
|
||||
int (*v0_rdnetdev)(int dev_desc, int num_bytes, char *buf);
|
||||
int (*v0_rdchardev)(int dev_desc, int num_bytes, int dummy, char *buf);
|
||||
int (*v0_wrchardev)(int dev_desc, int num_bytes, int dummy, char *buf);
|
||||
int (*v0_seekdev)(int dev_desc, long logical_offst, int from);
|
||||
};
|
||||
|
||||
/* V2 and later prom device operations. */
|
||||
struct linux_dev_v2_funcs {
|
||||
int (*v2_inst2pkg)(int d); /* Convert ihandle to phandle */
|
||||
char * (*v2_dumb_mem_alloc)(char *va, unsigned sz);
|
||||
void (*v2_dumb_mem_free)(char *va, unsigned sz);
|
||||
|
||||
/* To map devices into virtual I/O space. */
|
||||
char * (*v2_dumb_mmap)(char *virta, int which_io, unsigned paddr, unsigned sz);
|
||||
void (*v2_dumb_munmap)(char *virta, unsigned size);
|
||||
|
||||
int (*v2_dev_open)(char *devpath);
|
||||
void (*v2_dev_close)(int d);
|
||||
int (*v2_dev_read)(int d, char *buf, int nbytes);
|
||||
int (*v2_dev_write)(int d, char *buf, int nbytes);
|
||||
int (*v2_dev_seek)(int d, int hi, int lo);
|
||||
|
||||
/* Never issued (multistage load support) */
|
||||
void (*v2_wheee2)(void);
|
||||
void (*v2_wheee3)(void);
|
||||
};
|
||||
|
||||
struct linux_mlist_v0 {
|
||||
struct linux_mlist_v0 *theres_more;
|
||||
char *start_adr;
|
||||
unsigned num_bytes;
|
||||
};
|
||||
|
||||
struct linux_mem_v0 {
|
||||
struct linux_mlist_v0 **v0_totphys;
|
||||
struct linux_mlist_v0 **v0_prommap;
|
||||
struct linux_mlist_v0 **v0_available; /* What we can use */
|
||||
};
|
||||
|
||||
/* Arguments sent to the kernel from the boot prompt. */
|
||||
struct linux_arguments_v0 {
|
||||
char *argv[8];
|
||||
char args[100];
|
||||
char boot_dev[2];
|
||||
int boot_dev_ctrl;
|
||||
int boot_dev_unit;
|
||||
int dev_partition;
|
||||
char *kernel_file_name;
|
||||
void *aieee1; /* XXX */
|
||||
};
|
||||
|
||||
/* V2 and up boot things. */
|
||||
struct linux_bootargs_v2 {
|
||||
char **bootpath;
|
||||
char **bootargs;
|
||||
int *fd_stdin;
|
||||
int *fd_stdout;
|
||||
};
|
||||
|
||||
/* The top level PROM vector. */
|
||||
struct linux_romvec {
|
||||
/* Version numbers. */
|
||||
unsigned int pv_magic_cookie;
|
||||
unsigned int pv_romvers;
|
||||
unsigned int pv_plugin_revision;
|
||||
unsigned int pv_printrev;
|
||||
|
||||
/* Version 0 memory descriptors. */
|
||||
struct linux_mem_v0 pv_v0mem;
|
||||
|
||||
/* Node operations. */
|
||||
struct linux_nodeops *pv_nodeops;
|
||||
|
||||
char **pv_bootstr;
|
||||
struct linux_dev_v0_funcs pv_v0devops;
|
||||
|
||||
char *pv_stdin;
|
||||
char *pv_stdout;
|
||||
#define PROMDEV_KBD 0 /* input from keyboard */
|
||||
#define PROMDEV_SCREEN 0 /* output to screen */
|
||||
#define PROMDEV_TTYA 1 /* in/out to ttya */
|
||||
#define PROMDEV_TTYB 2 /* in/out to ttyb */
|
||||
|
||||
/* Blocking getchar/putchar. NOT REENTRANT! (grr) */
|
||||
int (*pv_getchar)(void);
|
||||
void (*pv_putchar)(int ch);
|
||||
|
||||
/* Non-blocking variants. */
|
||||
int (*pv_nbgetchar)(void);
|
||||
int (*pv_nbputchar)(int ch);
|
||||
|
||||
void (*pv_putstr)(char *str, int len);
|
||||
|
||||
/* Miscellany. */
|
||||
void (*pv_reboot)(char *bootstr);
|
||||
void (*pv_printf)(__const__ char *fmt, ...);
|
||||
void (*pv_abort)(void);
|
||||
__volatile__ int *pv_ticks;
|
||||
void (*pv_halt)(void);
|
||||
void (**pv_synchook)(void);
|
||||
|
||||
/* Evaluate a forth string, not different proto for V0 and V2->up. */
|
||||
union {
|
||||
void (*v0_eval)(int len, char *str);
|
||||
void (*v2_eval)(char *str);
|
||||
} pv_fortheval;
|
||||
|
||||
struct linux_arguments_v0 **pv_v0bootargs;
|
||||
|
||||
/* Get ether address. */
|
||||
unsigned int (*pv_enaddr)(int d, char *enaddr);
|
||||
|
||||
struct linux_bootargs_v2 pv_v2bootargs;
|
||||
struct linux_dev_v2_funcs pv_v2devops;
|
||||
|
||||
int filler[15];
|
||||
|
||||
/* This one is sun4c/sun4 only. */
|
||||
void (*pv_setctxt)(int ctxt, char *va, int pmeg);
|
||||
|
||||
/* Prom version 3 Multiprocessor routines. This stuff is crazy.
|
||||
* No joke. Calling these when there is only one cpu probably
|
||||
* crashes the machine, have to test this. :-)
|
||||
*/
|
||||
|
||||
/* v3_cpustart() will start the cpu 'whichcpu' in mmu-context
|
||||
* 'thiscontext' executing at address 'prog_counter'
|
||||
*/
|
||||
int (*v3_cpustart)(unsigned int whichcpu, int ctxtbl_ptr,
|
||||
int thiscontext, char *prog_counter);
|
||||
|
||||
/* v3_cpustop() will cause cpu 'whichcpu' to stop executing
|
||||
* until a resume cpu call is made.
|
||||
*/
|
||||
int (*v3_cpustop)(unsigned int whichcpu);
|
||||
|
||||
/* v3_cpuidle() will idle cpu 'whichcpu' until a stop or
|
||||
* resume cpu call is made.
|
||||
*/
|
||||
int (*v3_cpuidle)(unsigned int whichcpu);
|
||||
|
||||
/* v3_cpuresume() will resume processor 'whichcpu' executing
|
||||
* starting with whatever 'pc' and 'npc' were left at the
|
||||
* last 'idle' or 'stop' call.
|
||||
*/
|
||||
int (*v3_cpuresume)(unsigned int whichcpu);
|
||||
};
|
||||
|
||||
/* Routines for traversing the prom device tree. */
|
||||
struct linux_nodeops {
|
||||
int (*no_nextnode)(int node);
|
||||
int (*no_child)(int node);
|
||||
int (*no_proplen)(int node, const char *name);
|
||||
int (*no_getprop)(int node, const char *name, char *val);
|
||||
int (*no_setprop)(int node, const char *name, char *val, int len);
|
||||
char * (*no_nextprop)(int node, char *name);
|
||||
};
|
||||
|
||||
/* More fun PROM structures for device probing. */
|
||||
#define PROMREG_MAX 16
|
||||
#define PROMVADDR_MAX 16
|
||||
#define PROMINTR_MAX 15
|
||||
|
||||
struct linux_prom_registers {
|
||||
unsigned int which_io; /* is this in OBIO space? */
|
||||
unsigned int phys_addr; /* The physical address of this register */
|
||||
unsigned int reg_size; /* How many bytes does this register take up? */
|
||||
};
|
||||
|
||||
struct linux_prom_irqs {
|
||||
int pri; /* IRQ priority */
|
||||
int vector; /* This is foobar, what does it do? */
|
||||
};
|
||||
|
||||
/* Element of the "ranges" vector */
|
||||
struct linux_prom_ranges {
|
||||
unsigned int ot_child_space;
|
||||
unsigned int ot_child_base; /* Bus feels this */
|
||||
unsigned int ot_parent_space;
|
||||
unsigned int ot_parent_base; /* CPU looks from here */
|
||||
unsigned int or_size;
|
||||
};
|
||||
|
||||
/* Ranges and reg properties are a bit different for PCI. */
|
||||
struct linux_prom_pci_registers {
|
||||
/*
|
||||
* We don't know what information this field contain.
|
||||
* We guess, PCI device function is in bits 15:8
|
||||
* So, ...
|
||||
*/
|
||||
unsigned int which_io; /* Let it be which_io */
|
||||
|
||||
unsigned int phys_hi;
|
||||
unsigned int phys_lo;
|
||||
|
||||
unsigned int size_hi;
|
||||
unsigned int size_lo;
|
||||
};
|
||||
|
||||
struct linux_prom_pci_ranges {
|
||||
unsigned int child_phys_hi; /* Only certain bits are encoded here. */
|
||||
unsigned int child_phys_mid;
|
||||
unsigned int child_phys_lo;
|
||||
|
||||
unsigned int parent_phys_hi;
|
||||
unsigned int parent_phys_lo;
|
||||
|
||||
unsigned int size_hi;
|
||||
unsigned int size_lo;
|
||||
};
|
||||
|
||||
struct linux_prom_pci_assigned_addresses {
|
||||
unsigned int which_io;
|
||||
|
||||
unsigned int phys_hi;
|
||||
unsigned int phys_lo;
|
||||
|
||||
unsigned int size_hi;
|
||||
unsigned int size_lo;
|
||||
};
|
||||
|
||||
struct linux_prom_ebus_ranges {
|
||||
unsigned int child_phys_hi;
|
||||
unsigned int child_phys_lo;
|
||||
|
||||
unsigned int parent_phys_hi;
|
||||
unsigned int parent_phys_mid;
|
||||
unsigned int parent_phys_lo;
|
||||
|
||||
unsigned int size;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLY__) */
|
||||
|
||||
#endif /* !(__SPARC_OPENPROM_H) */
|
||||
@@ -1,280 +0,0 @@
|
||||
#ifndef __SPARC64_OPENPROM_H
|
||||
#define __SPARC64_OPENPROM_H
|
||||
|
||||
/* openprom.h: Prom structures and defines for access to the OPENBOOT
|
||||
* prom routines and data areas.
|
||||
*
|
||||
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
|
||||
*/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
/* V0 prom device operations. */
|
||||
struct linux_dev_v0_funcs {
|
||||
int (*v0_devopen)(char *device_str);
|
||||
int (*v0_devclose)(int dev_desc);
|
||||
int (*v0_rdblkdev)(int dev_desc, int num_blks, int blk_st, char *buf);
|
||||
int (*v0_wrblkdev)(int dev_desc, int num_blks, int blk_st, char *buf);
|
||||
int (*v0_wrnetdev)(int dev_desc, int num_bytes, char *buf);
|
||||
int (*v0_rdnetdev)(int dev_desc, int num_bytes, char *buf);
|
||||
int (*v0_rdchardev)(int dev_desc, int num_bytes, int dummy, char *buf);
|
||||
int (*v0_wrchardev)(int dev_desc, int num_bytes, int dummy, char *buf);
|
||||
int (*v0_seekdev)(int dev_desc, long logical_offst, int from);
|
||||
};
|
||||
|
||||
/* V2 and later prom device operations. */
|
||||
struct linux_dev_v2_funcs {
|
||||
int (*v2_inst2pkg)(int d); /* Convert ihandle to phandle */
|
||||
char * (*v2_dumb_mem_alloc)(char *va, unsigned sz);
|
||||
void (*v2_dumb_mem_free)(char *va, unsigned sz);
|
||||
|
||||
/* To map devices into virtual I/O space. */
|
||||
char * (*v2_dumb_mmap)(char *virta, int which_io, unsigned paddr, unsigned sz);
|
||||
void (*v2_dumb_munmap)(char *virta, unsigned size);
|
||||
|
||||
int (*v2_dev_open)(char *devpath);
|
||||
void (*v2_dev_close)(int d);
|
||||
int (*v2_dev_read)(int d, char *buf, int nbytes);
|
||||
int (*v2_dev_write)(int d, char *buf, int nbytes);
|
||||
int (*v2_dev_seek)(int d, int hi, int lo);
|
||||
|
||||
/* Never issued (multistage load support) */
|
||||
void (*v2_wheee2)(void);
|
||||
void (*v2_wheee3)(void);
|
||||
};
|
||||
|
||||
struct linux_mlist_v0 {
|
||||
struct linux_mlist_v0 *theres_more;
|
||||
unsigned start_adr;
|
||||
unsigned num_bytes;
|
||||
};
|
||||
|
||||
struct linux_mem_v0 {
|
||||
struct linux_mlist_v0 **v0_totphys;
|
||||
struct linux_mlist_v0 **v0_prommap;
|
||||
struct linux_mlist_v0 **v0_available; /* What we can use */
|
||||
};
|
||||
|
||||
/* Arguments sent to the kernel from the boot prompt. */
|
||||
struct linux_arguments_v0 {
|
||||
char *argv[8];
|
||||
char args[100];
|
||||
char boot_dev[2];
|
||||
int boot_dev_ctrl;
|
||||
int boot_dev_unit;
|
||||
int dev_partition;
|
||||
char *kernel_file_name;
|
||||
void *aieee1; /* XXX */
|
||||
};
|
||||
|
||||
/* V2 and up boot things. */
|
||||
struct linux_bootargs_v2 {
|
||||
char **bootpath;
|
||||
char **bootargs;
|
||||
int *fd_stdin;
|
||||
int *fd_stdout;
|
||||
};
|
||||
|
||||
/* The top level PROM vector. */
|
||||
struct linux_romvec {
|
||||
/* Version numbers. */
|
||||
unsigned int pv_magic_cookie;
|
||||
unsigned int pv_romvers;
|
||||
unsigned int pv_plugin_revision;
|
||||
unsigned int pv_printrev;
|
||||
|
||||
/* Version 0 memory descriptors. */
|
||||
struct linux_mem_v0 pv_v0mem;
|
||||
|
||||
/* Node operations. */
|
||||
struct linux_nodeops *pv_nodeops;
|
||||
|
||||
char **pv_bootstr;
|
||||
struct linux_dev_v0_funcs pv_v0devops;
|
||||
|
||||
char *pv_stdin;
|
||||
char *pv_stdout;
|
||||
#define PROMDEV_KBD 0 /* input from keyboard */
|
||||
#define PROMDEV_SCREEN 0 /* output to screen */
|
||||
#define PROMDEV_TTYA 1 /* in/out to ttya */
|
||||
#define PROMDEV_TTYB 2 /* in/out to ttyb */
|
||||
|
||||
/* Blocking getchar/putchar. NOT REENTRANT! (grr) */
|
||||
int (*pv_getchar)(void);
|
||||
void (*pv_putchar)(int ch);
|
||||
|
||||
/* Non-blocking variants. */
|
||||
int (*pv_nbgetchar)(void);
|
||||
int (*pv_nbputchar)(int ch);
|
||||
|
||||
void (*pv_putstr)(char *str, int len);
|
||||
|
||||
/* Miscellany. */
|
||||
void (*pv_reboot)(char *bootstr);
|
||||
void (*pv_printf)(__const__ char *fmt, ...);
|
||||
void (*pv_abort)(void);
|
||||
__volatile__ int *pv_ticks;
|
||||
void (*pv_halt)(void);
|
||||
void (**pv_synchook)(void);
|
||||
|
||||
/* Evaluate a forth string, not different proto for V0 and V2->up. */
|
||||
union {
|
||||
void (*v0_eval)(int len, char *str);
|
||||
void (*v2_eval)(char *str);
|
||||
} pv_fortheval;
|
||||
|
||||
struct linux_arguments_v0 **pv_v0bootargs;
|
||||
|
||||
/* Get ether address. */
|
||||
unsigned int (*pv_enaddr)(int d, char *enaddr);
|
||||
|
||||
struct linux_bootargs_v2 pv_v2bootargs;
|
||||
struct linux_dev_v2_funcs pv_v2devops;
|
||||
|
||||
int filler[15];
|
||||
|
||||
/* This one is sun4c/sun4 only. */
|
||||
void (*pv_setctxt)(int ctxt, char *va, int pmeg);
|
||||
|
||||
/* Prom version 3 Multiprocessor routines. This stuff is crazy.
|
||||
* No joke. Calling these when there is only one cpu probably
|
||||
* crashes the machine, have to test this. :-)
|
||||
*/
|
||||
|
||||
/* v3_cpustart() will start the cpu 'whichcpu' in mmu-context
|
||||
* 'thiscontext' executing at address 'prog_counter'
|
||||
*/
|
||||
int (*v3_cpustart)(unsigned int whichcpu, int ctxtbl_ptr,
|
||||
int thiscontext, char *prog_counter);
|
||||
|
||||
/* v3_cpustop() will cause cpu 'whichcpu' to stop executing
|
||||
* until a resume cpu call is made.
|
||||
*/
|
||||
int (*v3_cpustop)(unsigned int whichcpu);
|
||||
|
||||
/* v3_cpuidle() will idle cpu 'whichcpu' until a stop or
|
||||
* resume cpu call is made.
|
||||
*/
|
||||
int (*v3_cpuidle)(unsigned int whichcpu);
|
||||
|
||||
/* v3_cpuresume() will resume processor 'whichcpu' executing
|
||||
* starting with whatever 'pc' and 'npc' were left at the
|
||||
* last 'idle' or 'stop' call.
|
||||
*/
|
||||
int (*v3_cpuresume)(unsigned int whichcpu);
|
||||
};
|
||||
|
||||
/* Routines for traversing the prom device tree. */
|
||||
struct linux_nodeops {
|
||||
int (*no_nextnode)(int node);
|
||||
int (*no_child)(int node);
|
||||
int (*no_proplen)(int node, char *name);
|
||||
int (*no_getprop)(int node, char *name, char *val);
|
||||
int (*no_setprop)(int node, char *name, char *val, int len);
|
||||
char * (*no_nextprop)(int node, char *name);
|
||||
};
|
||||
|
||||
/* More fun PROM structures for device probing. */
|
||||
#define PROMREG_MAX 24
|
||||
#define PROMVADDR_MAX 16
|
||||
#define PROMINTR_MAX 32
|
||||
|
||||
struct linux_prom_registers {
|
||||
unsigned which_io; /* hi part of physical address */
|
||||
unsigned phys_addr; /* The physical address of this register */
|
||||
int reg_size; /* How many bytes does this register take up? */
|
||||
};
|
||||
|
||||
struct linux_prom64_registers {
|
||||
unsigned long phys_addr;
|
||||
unsigned long reg_size;
|
||||
};
|
||||
|
||||
struct linux_prom_irqs {
|
||||
int pri; /* IRQ priority */
|
||||
int vector; /* This is foobar, what does it do? */
|
||||
};
|
||||
|
||||
/* Element of the "ranges" vector */
|
||||
struct linux_prom_ranges {
|
||||
unsigned int ot_child_space;
|
||||
unsigned int ot_child_base; /* Bus feels this */
|
||||
unsigned int ot_parent_space;
|
||||
unsigned int ot_parent_base; /* CPU looks from here */
|
||||
unsigned int or_size;
|
||||
};
|
||||
|
||||
struct linux_prom64_ranges {
|
||||
unsigned long ot_child_base; /* Bus feels this */
|
||||
unsigned long ot_parent_base; /* CPU looks from here */
|
||||
unsigned long or_size;
|
||||
};
|
||||
|
||||
/* Ranges and reg properties are a bit different for PCI. */
|
||||
struct linux_prom_pci_registers {
|
||||
unsigned int phys_hi;
|
||||
unsigned int phys_mid;
|
||||
unsigned int phys_lo;
|
||||
|
||||
unsigned int size_hi;
|
||||
unsigned int size_lo;
|
||||
};
|
||||
|
||||
struct linux_prom_pci_ranges {
|
||||
unsigned int child_phys_hi; /* Only certain bits are encoded here. */
|
||||
unsigned int child_phys_mid;
|
||||
unsigned int child_phys_lo;
|
||||
|
||||
unsigned int parent_phys_hi;
|
||||
unsigned int parent_phys_lo;
|
||||
|
||||
unsigned int size_hi;
|
||||
unsigned int size_lo;
|
||||
};
|
||||
|
||||
struct linux_prom_pci_intmap {
|
||||
unsigned int phys_hi;
|
||||
unsigned int phys_mid;
|
||||
unsigned int phys_lo;
|
||||
|
||||
unsigned int interrupt;
|
||||
|
||||
int cnode;
|
||||
unsigned int cinterrupt;
|
||||
};
|
||||
|
||||
struct linux_prom_pci_intmask {
|
||||
unsigned int phys_hi;
|
||||
unsigned int phys_mid;
|
||||
unsigned int phys_lo;
|
||||
unsigned int interrupt;
|
||||
};
|
||||
|
||||
struct linux_prom_ebus_ranges {
|
||||
unsigned int child_phys_hi;
|
||||
unsigned int child_phys_lo;
|
||||
|
||||
unsigned int parent_phys_hi;
|
||||
unsigned int parent_phys_mid;
|
||||
unsigned int parent_phys_lo;
|
||||
|
||||
unsigned int size;
|
||||
};
|
||||
|
||||
struct linux_prom_ebus_intmap {
|
||||
unsigned int phys_hi;
|
||||
unsigned int phys_lo;
|
||||
|
||||
unsigned int interrupt;
|
||||
|
||||
int cnode;
|
||||
unsigned int cinterrupt;
|
||||
};
|
||||
|
||||
struct linux_prom_ebus_intmask {
|
||||
unsigned int phys_hi;
|
||||
unsigned int phys_lo;
|
||||
unsigned int interrupt;
|
||||
};
|
||||
#endif /* !(__ASSEMBLY__) */
|
||||
|
||||
#endif /* !(__SPARC64_OPENPROM_H) */
|
||||
@@ -1,8 +1,155 @@
|
||||
#ifndef ___ASM_SPARC_POSIX_TYPES_H
|
||||
#define ___ASM_SPARC_POSIX_TYPES_H
|
||||
/*
|
||||
* This file is generally used by user-level software, so you need to
|
||||
* be a little careful about namespace pollution etc. Also, we cannot
|
||||
* assume GCC is being used.
|
||||
*/
|
||||
|
||||
#ifndef __SPARC_POSIX_TYPES_H
|
||||
#define __SPARC_POSIX_TYPES_H
|
||||
|
||||
#if defined(__sparc__) && defined(__arch64__)
|
||||
#include <asm/posix_types_64.h>
|
||||
/* sparc 64 bit */
|
||||
typedef unsigned long __kernel_size_t;
|
||||
typedef long __kernel_ssize_t;
|
||||
typedef long __kernel_ptrdiff_t;
|
||||
typedef long __kernel_time_t;
|
||||
typedef long __kernel_clock_t;
|
||||
typedef int __kernel_pid_t;
|
||||
typedef int __kernel_ipc_pid_t;
|
||||
typedef unsigned int __kernel_uid_t;
|
||||
typedef unsigned int __kernel_gid_t;
|
||||
typedef unsigned long __kernel_ino_t;
|
||||
typedef unsigned int __kernel_mode_t;
|
||||
typedef unsigned short __kernel_umode_t;
|
||||
typedef unsigned int __kernel_nlink_t;
|
||||
typedef int __kernel_daddr_t;
|
||||
typedef long __kernel_off_t;
|
||||
typedef char * __kernel_caddr_t;
|
||||
typedef unsigned short __kernel_uid16_t;
|
||||
typedef unsigned short __kernel_gid16_t;
|
||||
typedef int __kernel_clockid_t;
|
||||
typedef int __kernel_timer_t;
|
||||
|
||||
typedef unsigned short __kernel_old_uid_t;
|
||||
typedef unsigned short __kernel_old_gid_t;
|
||||
typedef __kernel_uid_t __kernel_uid32_t;
|
||||
typedef __kernel_gid_t __kernel_gid32_t;
|
||||
|
||||
typedef unsigned int __kernel_old_dev_t;
|
||||
|
||||
/* Note this piece of asymmetry from the v9 ABI. */
|
||||
typedef int __kernel_suseconds_t;
|
||||
|
||||
#else
|
||||
#include <asm/posix_types_32.h>
|
||||
#endif
|
||||
/* sparc 32 bit */
|
||||
|
||||
typedef unsigned int __kernel_size_t;
|
||||
typedef int __kernel_ssize_t;
|
||||
typedef long int __kernel_ptrdiff_t;
|
||||
typedef long __kernel_time_t;
|
||||
typedef long __kernel_suseconds_t;
|
||||
typedef long __kernel_clock_t;
|
||||
typedef int __kernel_pid_t;
|
||||
typedef unsigned short __kernel_ipc_pid_t;
|
||||
typedef unsigned short __kernel_uid_t;
|
||||
typedef unsigned short __kernel_gid_t;
|
||||
typedef unsigned long __kernel_ino_t;
|
||||
typedef unsigned short __kernel_mode_t;
|
||||
typedef unsigned short __kernel_umode_t;
|
||||
typedef short __kernel_nlink_t;
|
||||
typedef long __kernel_daddr_t;
|
||||
typedef long __kernel_off_t;
|
||||
typedef char * __kernel_caddr_t;
|
||||
typedef unsigned short __kernel_uid16_t;
|
||||
typedef unsigned short __kernel_gid16_t;
|
||||
typedef unsigned int __kernel_uid32_t;
|
||||
typedef unsigned int __kernel_gid32_t;
|
||||
typedef unsigned short __kernel_old_uid_t;
|
||||
typedef unsigned short __kernel_old_gid_t;
|
||||
typedef unsigned short __kernel_old_dev_t;
|
||||
typedef int __kernel_clockid_t;
|
||||
typedef int __kernel_timer_t;
|
||||
|
||||
#endif /* defined(__sparc__) && defined(__arch64__) */
|
||||
|
||||
#ifdef __GNUC__
|
||||
typedef long long __kernel_loff_t;
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
int val[2];
|
||||
} __kernel_fsid_t;
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#undef __FD_SET
|
||||
static inline void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp)
|
||||
{
|
||||
unsigned long _tmp = fd / __NFDBITS;
|
||||
unsigned long _rem = fd % __NFDBITS;
|
||||
fdsetp->fds_bits[_tmp] |= (1UL<<_rem);
|
||||
}
|
||||
|
||||
#undef __FD_CLR
|
||||
static inline void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp)
|
||||
{
|
||||
unsigned long _tmp = fd / __NFDBITS;
|
||||
unsigned long _rem = fd % __NFDBITS;
|
||||
fdsetp->fds_bits[_tmp] &= ~(1UL<<_rem);
|
||||
}
|
||||
|
||||
#undef __FD_ISSET
|
||||
static inline int __FD_ISSET(unsigned long fd, __const__ __kernel_fd_set *p)
|
||||
{
|
||||
unsigned long _tmp = fd / __NFDBITS;
|
||||
unsigned long _rem = fd % __NFDBITS;
|
||||
return (p->fds_bits[_tmp] & (1UL<<_rem)) != 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* This will unroll the loop for the normal constant cases (8 or 32 longs,
|
||||
* for 256 and 1024-bit fd_sets respectively)
|
||||
*/
|
||||
#undef __FD_ZERO
|
||||
static inline void __FD_ZERO(__kernel_fd_set *p)
|
||||
{
|
||||
unsigned long *tmp = p->fds_bits;
|
||||
int i;
|
||||
|
||||
if (__builtin_constant_p(__FDSET_LONGS)) {
|
||||
switch (__FDSET_LONGS) {
|
||||
case 32:
|
||||
tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0;
|
||||
tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0;
|
||||
tmp[ 8] = 0; tmp[ 9] = 0; tmp[10] = 0; tmp[11] = 0;
|
||||
tmp[12] = 0; tmp[13] = 0; tmp[14] = 0; tmp[15] = 0;
|
||||
tmp[16] = 0; tmp[17] = 0; tmp[18] = 0; tmp[19] = 0;
|
||||
tmp[20] = 0; tmp[21] = 0; tmp[22] = 0; tmp[23] = 0;
|
||||
tmp[24] = 0; tmp[25] = 0; tmp[26] = 0; tmp[27] = 0;
|
||||
tmp[28] = 0; tmp[29] = 0; tmp[30] = 0; tmp[31] = 0;
|
||||
return;
|
||||
case 16:
|
||||
tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0;
|
||||
tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0;
|
||||
tmp[ 8] = 0; tmp[ 9] = 0; tmp[10] = 0; tmp[11] = 0;
|
||||
tmp[12] = 0; tmp[13] = 0; tmp[14] = 0; tmp[15] = 0;
|
||||
return;
|
||||
case 8:
|
||||
tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0;
|
||||
tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0;
|
||||
return;
|
||||
case 4:
|
||||
tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
i = __FDSET_LONGS;
|
||||
while (i) {
|
||||
i--;
|
||||
*tmp = 0;
|
||||
tmp++;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* __SPARC_POSIX_TYPES_H */
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
#ifndef __ARCH_SPARC_POSIX_TYPES_H
|
||||
#define __ARCH_SPARC_POSIX_TYPES_H
|
||||
|
||||
/*
|
||||
* This file is generally used by user-level software, so you need to
|
||||
* be a little careful about namespace pollution etc. Also, we cannot
|
||||
* assume GCC is being used.
|
||||
*/
|
||||
|
||||
typedef unsigned int __kernel_size_t;
|
||||
typedef int __kernel_ssize_t;
|
||||
typedef long int __kernel_ptrdiff_t;
|
||||
typedef long __kernel_time_t;
|
||||
typedef long __kernel_suseconds_t;
|
||||
typedef long __kernel_clock_t;
|
||||
typedef int __kernel_pid_t;
|
||||
typedef unsigned short __kernel_ipc_pid_t;
|
||||
typedef unsigned short __kernel_uid_t;
|
||||
typedef unsigned short __kernel_gid_t;
|
||||
typedef unsigned long __kernel_ino_t;
|
||||
typedef unsigned short __kernel_mode_t;
|
||||
typedef unsigned short __kernel_umode_t;
|
||||
typedef short __kernel_nlink_t;
|
||||
typedef long __kernel_daddr_t;
|
||||
typedef long __kernel_off_t;
|
||||
typedef char * __kernel_caddr_t;
|
||||
typedef unsigned short __kernel_uid16_t;
|
||||
typedef unsigned short __kernel_gid16_t;
|
||||
typedef unsigned int __kernel_uid32_t;
|
||||
typedef unsigned int __kernel_gid32_t;
|
||||
typedef unsigned short __kernel_old_uid_t;
|
||||
typedef unsigned short __kernel_old_gid_t;
|
||||
typedef unsigned short __kernel_old_dev_t;
|
||||
typedef int __kernel_clockid_t;
|
||||
typedef int __kernel_timer_t;
|
||||
|
||||
#ifdef __GNUC__
|
||||
typedef long long __kernel_loff_t;
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
int val[2];
|
||||
} __kernel_fsid_t;
|
||||
|
||||
#if defined(__KERNEL__)
|
||||
|
||||
#undef __FD_SET
|
||||
static inline void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp)
|
||||
{
|
||||
unsigned long _tmp = fd / __NFDBITS;
|
||||
unsigned long _rem = fd % __NFDBITS;
|
||||
fdsetp->fds_bits[_tmp] |= (1UL<<_rem);
|
||||
}
|
||||
|
||||
#undef __FD_CLR
|
||||
static inline void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp)
|
||||
{
|
||||
unsigned long _tmp = fd / __NFDBITS;
|
||||
unsigned long _rem = fd % __NFDBITS;
|
||||
fdsetp->fds_bits[_tmp] &= ~(1UL<<_rem);
|
||||
}
|
||||
|
||||
#undef __FD_ISSET
|
||||
static inline int __FD_ISSET(unsigned long fd, __const__ __kernel_fd_set *p)
|
||||
{
|
||||
unsigned long _tmp = fd / __NFDBITS;
|
||||
unsigned long _rem = fd % __NFDBITS;
|
||||
return (p->fds_bits[_tmp] & (1UL<<_rem)) != 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* This will unroll the loop for the normal constant cases (8 or 32 longs,
|
||||
* for 256 and 1024-bit fd_sets respectively)
|
||||
*/
|
||||
#undef __FD_ZERO
|
||||
static inline void __FD_ZERO(__kernel_fd_set *p)
|
||||
{
|
||||
unsigned long *tmp = p->fds_bits;
|
||||
int i;
|
||||
|
||||
if (__builtin_constant_p(__FDSET_LONGS)) {
|
||||
switch (__FDSET_LONGS) {
|
||||
case 32:
|
||||
tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0;
|
||||
tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0;
|
||||
tmp[ 8] = 0; tmp[ 9] = 0; tmp[10] = 0; tmp[11] = 0;
|
||||
tmp[12] = 0; tmp[13] = 0; tmp[14] = 0; tmp[15] = 0;
|
||||
tmp[16] = 0; tmp[17] = 0; tmp[18] = 0; tmp[19] = 0;
|
||||
tmp[20] = 0; tmp[21] = 0; tmp[22] = 0; tmp[23] = 0;
|
||||
tmp[24] = 0; tmp[25] = 0; tmp[26] = 0; tmp[27] = 0;
|
||||
tmp[28] = 0; tmp[29] = 0; tmp[30] = 0; tmp[31] = 0;
|
||||
return;
|
||||
case 16:
|
||||
tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0;
|
||||
tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0;
|
||||
tmp[ 8] = 0; tmp[ 9] = 0; tmp[10] = 0; tmp[11] = 0;
|
||||
tmp[12] = 0; tmp[13] = 0; tmp[14] = 0; tmp[15] = 0;
|
||||
return;
|
||||
case 8:
|
||||
tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0;
|
||||
tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0;
|
||||
return;
|
||||
case 4:
|
||||
tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
i = __FDSET_LONGS;
|
||||
while (i) {
|
||||
i--;
|
||||
*tmp = 0;
|
||||
tmp++;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* defined(__KERNEL__) */
|
||||
|
||||
#endif /* !(__ARCH_SPARC_POSIX_TYPES_H) */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user