type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
functions | __init
probe_motherboard(void)
{
int i;
struct macio_chip* macio = &macio_chips[0];
const char* model = NULL;
struct device_node *dt;
/* Lookup known motherboard type in device-tree. First try an
* exact match on the "model" property, then try a "compatible"
* match is none is found.
*/
dt = find_devices("... |
functions | __init
probe_uninorth(void)
{
unsigned long actrl;
/* Locate core99 Uni-N */
uninorth_node = of_find_node_by_name(NULL, "uni-n");
/* Locate G5 u3 */
if (uninorth_node == NULL) {
uninorth_node = of_find_node_by_name(NULL, "u3");
uninorth_u3 = 1;
} |
functions | __init
probe_one_macio(const char* name, const char* compat, int type)
{
struct device_node* node;
int i;
volatile u32 __iomem * base;
u32* revp;
node = find_devices(name);
if (!node || !node->n_addrs)
return;
if (compat)
do {
if (device_is_compatible(node, compat))
break;
node = node->next;
... |
functions | __init
probe_macios(void)
{
/* Warning, ordering is important */
probe_one_macio("gc", NULL, macio_grand_central);
probe_one_macio("ohare", NULL, macio_ohare);
probe_one_macio("pci106b,7", NULL, macio_ohareII);
probe_one_macio("mac-io", "keylargo", macio_keylargo);
probe_one_macio("mac-io", "paddington", macio_pa... |
functions | __init
initial_serial_shutdown(struct device_node* np)
{
int len;
struct slot_names_prop {
int count;
char name[1];
} |
functions | else if (slots && slots->count > 0) {
if (strcmp(slots->name, "IrDA") == 0)
port_type = PMAC_SCC_IRDA;
else if (strcmp(slots->name, "Modem") == 0)
modem = 1;
} |
functions | __init
set_initial_features(void)
{
struct device_node* np;
/* That hack appears to be necessary for some StarMax motherboards
* but I'm not too sure it was audited for side-effects on other
* ohare based machines...
* Since I still have difficulties figuring the right way to
* differenciate them all and sin... |
functions | else if (macio_chips[0].type == macio_ohare) {
struct macio_chip* macio = &macio_chips[0];
MACIO_BIS(OHARE_FCR, OH_IOBUS_ENABLE);
} |
functions | else if (macio_chips[1].type == macio_ohare) {
struct macio_chip* macio = &macio_chips[1];
MACIO_BIS(OHARE_FCR, OH_IOBUS_ENABLE);
} |
functions | CONFIG_POWER4
if (macio_chips[0].type == macio_keylargo2) {
#ifndef CONFIG_SMP
/* On SMP machines running UP, we have the second CPU eating
* bus cycles. We need to take it off the bus. This is done
* from pmac_smp for SMP kernels running on one CPU
*/
np = of_find_node_by_type(NULL, "cpu");
if (np != N... |
functions | __init
pmac_feature_init(void)
{
/* Detect the UniNorth memory controller */
probe_uninorth();
/* Probe mac-io controllers */
if (probe_macios()) {
printk(KERN_WARNING "No mac-io chip found\n");
return;
} |
functions | __init
pmac_feature_late_init(void)
{
struct device_node* np;
/* Request some resources late */
if (uninorth_node)
request_OF_resource(uninorth_node, 0, NULL);
np = find_devices("hammerhead");
if (np)
request_OF_resource(np, 0, NULL);
np = find_devices("interrupt-controller");
if (np)
request_OF_resource(... |
functions | void dump_HT_speeds(char *name, u32 cfg, u32 frq)
{
int freqs[16] = { 200,300,400,500,600,800,1000,0,0,0,0,0,0,0,0,0 } |
functions | __init pmac_check_ht_link(void)
{
u32 ufreq, freq, ucfg, cfg;
struct device_node *pcix_node;
u8 px_bus, px_devfn;
struct pci_controller *px_hose;
(void)in_be32(u3_ht + U3_HT_LINK_COMMAND);
ucfg = cfg = in_be32(u3_ht + U3_HT_LINK_CONFIG);
ufreq = freq = in_be32(u3_ht + U3_HT_LINK_FREQ);
dump_HT_speeds("U3 Hyp... |
functions | void pmac_call_early_video_resume(void)
{
if (pmac_early_vresume_proc)
pmac_early_vresume_proc(pmac_early_vresume_data);
} |
functions | void pmac_suspend_agp_for_card(struct pci_dev *dev)
{
if (pmac_agp_bridge == NULL || pmac_agp_suspend == NULL)
return;
if (pmac_agp_bridge->bus != dev->bus)
return;
pmac_agp_suspend(pmac_agp_bridge);
} |
functions | void pmac_resume_agp_for_card(struct pci_dev *dev)
{
if (pmac_agp_bridge == NULL || pmac_agp_resume == NULL)
return;
if (pmac_agp_bridge->bus != dev->bus)
return;
pmac_agp_resume(pmac_agp_bridge);
} |
includes | #include <linux/slab.h> |
includes | #include <linux/init.h> |
includes | #include <linux/module.h> |
includes | #include <linux/err.h> |
includes | #include <linux/string.h> |
includes | #include <linux/idr.h> |
functions | void __free_layer(struct idr *idp, struct idr_layer *p)
{
p->ary[0] = idp->id_free;
idp->id_free = p;
idp->id_free_cnt++;
} |
functions | void free_layer(struct idr *idp, struct idr_layer *p)
{
/*
* Depends on the return element being zeroed.
*/
spin_lock(&idp->lock);
__free_layer(idp, p);
spin_unlock(&idp->lock);
} |
functions | int idr_pre_get(struct idr *idp, gfp_t gfp_mask)
{
while (idp->id_free_cnt < IDR_FREE_MAX) {
struct idr_layer *new;
new = kmem_cache_alloc(idr_layer_cache, gfp_mask);
if (new == NULL)
return (0);
free_layer(idp, new);
} |
functions | int sub_alloc(struct idr *idp, void *ptr, int *starting_id)
{
int n, m, sh;
struct idr_layer *p, *new;
struct idr_layer *pa[MAX_LEVEL];
int l, id;
long bm;
id = *starting_id;
p = idp->top;
l = idp->layers;
pa[l--] = NULL;
while (1) {
/*
* We run around this while until we reach the leaf node...
*/
... |
functions | int idr_get_new_above_int(struct idr *idp, void *ptr, int starting_id)
{
struct idr_layer *p, *new;
int layers, v, id;
id = starting_id;
build_up:
p = idp->top;
layers = idp->layers;
if (unlikely(!p)) {
if (!(p = alloc_layer(idp)))
return -1;
layers = 1;
} |
functions | int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id)
{
int rv;
rv = idr_get_new_above_int(idp, ptr, starting_id);
/*
* This is a cheap hack until the IDR code can be fixed to
* return proper error values.
*/
if (rv < 0) {
if (rv == -1)
return -EAGAIN;
else /* Will be -3 */
re... |
functions | int idr_get_new(struct idr *idp, void *ptr, int *id)
{
int rv;
rv = idr_get_new_above_int(idp, ptr, 0);
/*
* This is a cheap hack until the IDR code can be fixed to
* return proper error values.
*/
if (rv < 0) {
if (rv == -1)
return -EAGAIN;
else /* Will be -3 */
return -ENOSPC;
} |
functions | void idr_remove_warning(int id)
{
printk("idr_remove called for id=%d which is not allocated.\n", id);
dump_stack();
} |
functions | void sub_remove(struct idr *idp, int shift, int id)
{
struct idr_layer *p = idp->top;
struct idr_layer **pa[MAX_LEVEL];
struct idr_layer ***paa = &pa[0];
int n;
*paa = NULL;
*++paa = &idp->top;
while ((shift > 0) && p) {
n = (id >> shift) & IDR_MASK;
__clear_bit(n, &p->bitmap);
*++paa = &p->ary[n];
p =... |
functions | void idr_remove(struct idr *idp, int id)
{
struct idr_layer *p;
/* Mask off upper bits we don't use for the search. */
id &= MAX_ID_MASK;
sub_remove(idp, (idp->layers - 1) * IDR_BITS, id);
if (idp->top && idp->top->count == 1 && (idp->layers > 1) &&
idp->top->ary[0]) { // We can drop a layer
p = idp->to... |
functions | void idr_destroy(struct idr *idp)
{
while (idp->id_free_cnt) {
struct idr_layer *p = alloc_layer(idp);
kmem_cache_free(idr_layer_cache, p);
} |
functions | void idr_cache_ctor(void * idr_layer, kmem_cache_t *idr_layer_cache,
unsigned long flags)
{
memset(idr_layer, 0, sizeof(struct idr_layer));
} |
functions | int init_id_cache(void)
{
if (!idr_layer_cache)
idr_layer_cache = kmem_cache_create("idr_layer_cache",
sizeof(struct idr_layer), 0, 0, idr_cache_ctor, NULL);
return 0;
} |
functions | void idr_init(struct idr *idp)
{
init_id_cache();
memset(idp, 0, sizeof(struct idr));
spin_lock_init(&idp->lock);
} |
includes |
#include <linux/fs.h> |
includes | #include <linux/mm.h> |
includes | #include <linux/slab.h> |
includes | #include <asm/spu.h> |
includes | #include <asm/spu_csa.h> |
functions | void destroy_spu_context(struct kref *kref)
{
struct spu_context *ctx;
ctx = container_of(kref, struct spu_context, kref);
down_write(&ctx->state_sema);
spu_deactivate(ctx);
up_write(&ctx->state_sema);
spu_fini_csa(&ctx->csa);
if (ctx->gang)
spu_gang_remove_ctx(ctx->gang, ctx);
kfree(ctx);
} |
functions | int put_spu_context(struct spu_context *ctx)
{
return kref_put(&ctx->kref, &destroy_spu_context);
} |
functions | void spu_forget(struct spu_context *ctx)
{
struct mm_struct *mm;
spu_acquire_saved(ctx);
mm = ctx->owner;
ctx->owner = NULL;
mmput(mm);
spu_release(ctx);
} |
functions | void spu_acquire(struct spu_context *ctx)
{
down_read(&ctx->state_sema);
} |
functions | void spu_release(struct spu_context *ctx)
{
up_read(&ctx->state_sema);
} |
functions | void spu_unmap_mappings(struct spu_context *ctx)
{
if (ctx->local_store)
unmap_mapping_range(ctx->local_store, 0, LS_SIZE, 1);
if (ctx->mfc)
unmap_mapping_range(ctx->mfc, 0, 0x4000, 1);
if (ctx->cntl)
unmap_mapping_range(ctx->cntl, 0, 0x4000, 1);
if (ctx->signal1)
unmap_mapping_range(ctx->signal1, 0, 0x4000... |
functions | int spu_acquire_exclusive(struct spu_context *ctx)
{
int ret = 0;
down_write(&ctx->state_sema);
/* ctx is about to be freed, can't acquire any more */
if (!ctx->owner) {
ret = -EINVAL;
goto out;
} |
functions | int spu_acquire_runnable(struct spu_context *ctx)
{
int ret = 0;
down_read(&ctx->state_sema);
if (ctx->state == SPU_STATE_RUNNABLE) {
ctx->spu->prio = current->prio;
return 0;
} |
functions | void spu_acquire_saved(struct spu_context *ctx)
{
down_read(&ctx->state_sema);
if (ctx->state == SPU_STATE_SAVED)
return;
up_read(&ctx->state_sema);
down_write(&ctx->state_sema);
if (ctx->state == SPU_STATE_RUNNABLE) {
spu_deactivate(ctx);
ctx->state = SPU_STATE_SAVED;
} |
includes |
#include <sys/types.h> |
defines | #define STDC_HEADERS 1 |
defines | #define BLOCKSIZE 4096 |
defines | #define FF(b, c, d) (d ^ (b & (c ^ d))) |
defines | #define FG(b, c, d) FF (d, b, c) |
defines | #define FH(b, c, d) (b ^ c ^ d) |
defines | #define FI(b, c, d) (c ^ (b | ~d)) |
defines |
#define OP(a, b, c, d, s, T) \ |
defines | #define CYCLIC(w, s) (w = (w << s) | (w >> (32 - s))) |
defines | #define OP(f, a, b, c, d, k, s, T) \ |
includes |
#include <stddef.h> |
includes | #include <ctype.h> |
includes | #include <iconv.h> |
defines | #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1" |
defines | #define GDB_DEFAULT_TARGET_CHARSET "ISO-8859-1" |
structs | struct charset {
/* A singly-linked list of all known charsets. */
struct charset *next;
/* The name of the character set. Comparisons on character set
names are case-sensitive. */
const char *name;
/* Non-zero iff this character set can be used as a host character
set. At present, GDB basica... |
structs | struct translation {
/* A singly-linked list of all known translations. */
struct translation *next;
/* This structure describes functions going from the FROM character
set to the TO character set. Comparisons on character set names
are case-sensitive. */
const char *from, *to;
/* Pointers to ... |
structs | struct cached_iconv {
struct charset *from, *to;
iconv_t i;
}; |
structs | struct cached_iconv { char nothing; }; |
functions | void
register_charset (struct charset *cs)
{
struct charset **ptr;
/* Put the new charset on the end, so that the list ends up in the
same order as the registrations in the _initialize function. */
for (ptr = &all_charsets; *ptr; ptr = &(*ptr)->next)
;
cs->next = 0;
*ptr = cs;
} |
functions | void
register_translation (struct translation *t)
{
t->next = all_translations;
all_translations = t;
} |
functions | int
ascii_print_literally (void *baton, int c)
{
c &= 0xff;
return (0x20 <= c && c <= 0x7e);
} |
functions | int
ascii_to_control (void *baton, int c, int *ctrl_char)
{
*ctrl_char = (c & 037);
return 1;
} |
functions | int
iso_8859_print_literally (void *baton, int c)
{
c &= 0xff;
return ((0x20 <= c && c <= 0x7e) /* ascii printables */
|| (! sevenbit_strings && 0xA0 <= c)); /* iso 8859 printables */
} |
functions | int
iso_8859_to_control (void *baton, int c, int *ctrl_char)
{
*ctrl_char = (c & 0200) | (c & 037);
return 1;
} |
functions | int
ebcdic_print_literally (void *baton, int c)
{
c &= 0xff;
return (64 <= c && c <= 254);
} |
functions | int
ebcdic_to_control (void *baton, int c, int *ctrl_char)
{
/* There are no control character equivalents in EBCDIC. Use
numeric escapes. */
return 0;
} |
functions | int
check_iconv_cache (struct cached_iconv *ci,
struct charset *from,
struct charset *to)
{
iconv_t i;
/* Does the cached iconv descriptor match the conversion we're trying
to do now? */
if (ci->from == from
&& ci->to == to
&& ci->i != (iconv_t) 0)
retu... |
functions | int
cached_iconv_convert (struct cached_iconv *ci, int from_char, int *to_char)
{
char from;
ICONV_CONST char *from_ptr = &from;
char to, *to_ptr = &to;
size_t from_left = sizeof (from), to_left = sizeof (to);
gdb_assert (ci->i != (iconv_t) 0);
from = from_char;
if (iconv (ci->i, &from_ptr, &from_left, ... |
functions | void
register_iconv_charsets (void)
{
/* Here we should check whether various character sets were
recognized by the local iconv implementation.
The first implementation registered a bunch of character sets
recognized by iconv, but then we discovered that iconv on Solaris
and iconv on GNU/Linux ha... |
functions | int
check_iconv_cache (struct cached_iconv *ci,
struct charset *from,
struct charset *to)
{
errno = EINVAL;
return -1;
} |
functions | int
cached_iconv_convert (struct cached_iconv *ci, int from_char, int *to_char)
{
/* This function should never be called. */
gdb_assert (0);
} |
functions | void
register_iconv_charsets (void)
{
} |
functions | int
identity_either_char_to_other (void *baton, int either_char, int *other_char)
{
*other_char = either_char;
return 1;
} |
functions | int
default_c_parse_backslash (void *baton, int host_char, int *target_char)
{
const char *ix;
ix = strchr (backslashable, host_char);
if (! ix)
return 0;
else
return host_char_to_target (represented[ix - backslashable],
target_char);
} |
functions | int
iconv_convert (void *baton, int from_char, int *to_char)
{
struct cached_iconv *ci = baton;
return cached_iconv_convert (ci, from_char, to_char);
} |
functions | int
table_convert_char (void *baton, int from, int *to)
{
int *table = (int *) baton;
if (0 <= from && from <= 255
&& table[from] != -1)
{
*to = table[from];
return 1;
} |
functions | void
check_valid_host_charset (struct charset *cs)
{
if (! cs->valid_host_charset)
error ("GDB can't use `%s' as its host character set.", cs->name);
} |
functions | void
set_host_and_target_charsets (struct charset *host, struct charset *target)
{
struct translation *h2t, *t2h;
/* If they're not both initialized yet, then just do nothing for
now. As soon as we're done running our initialize function,
everything will be initialized. */
if (! host || ! target)
... |
functions | void
set_host_charset (const char *charset)
{
struct charset *cs = lookup_charset_or_error (charset);
check_valid_host_charset (cs);
set_host_and_target_charsets (cs, current_target_charset);
} |
functions | void
set_target_charset (const char *charset)
{
struct charset *cs = lookup_charset_or_error (charset);
set_host_and_target_charsets (current_host_charset, cs);
} |
functions | void
set_charset_sfunc (char *charset, int from_tty, struct cmd_list_element *c)
{
struct charset *cs = lookup_charset_or_error (host_charset_name);
check_valid_host_charset (cs);
/* CAREFUL: set the target charset here as well. */
target_charset_name = host_charset_name;
set_host_and_target_charsets (cs, cs)... |
functions | void
set_host_charset_sfunc (char *charset, int from_tty,
struct cmd_list_element *c)
{
set_host_charset (host_charset_name);
} |
functions | void
set_target_charset_sfunc (char *charset, int from_tty,
struct cmd_list_element *c)
{
set_target_charset (target_charset_name);
} |
functions | void
show_charset (char *arg, int from_tty)
{
if (current_host_charset == current_target_charset)
{
printf_filtered ("The current host and target character set is `%s'.\n",
host_charset ());
} |
functions | int
c_parse_backslash (int host_char, int *target_char)
{
return (*c_parse_backslash_func) (c_parse_backslash_baton,
host_char, target_char);
} |
functions | int
host_char_print_literally (int host_char)
{
return ((*current_host_charset->host_char_print_literally)
(current_host_charset->host_char_print_literally_baton,
host_char));
} |
functions | int
target_char_to_control_char (int target_char, int *target_ctrl_char)
{
return ((*current_target_charset->target_char_to_control_char)
(current_target_charset->target_char_to_control_char_baton,
target_char, target_ctrl_char));
} |
functions | int
host_char_to_target (int host_char, int *target_char)
{
return ((*host_char_to_target_func)
(host_char_to_target_baton, host_char, target_char));
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.