~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to arch/unicore32/include/asm/processor.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno
  • Date: 2011-06-07 12:14:05 UTC
  • mfrom: (43.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110607121405-i3h1rd7nrnd2b73h
Tags: 2.6.39-2
[ Ben Hutchings ]
* [x86] Enable BACKLIGHT_APPLE, replacing BACKLIGHT_MBP_NVIDIA
  (Closes: #627492)
* cgroups: Disable memory resource controller by default. Allow it
  to be enabled using kernel parameter 'cgroup_enable=memory'.
* rt2800usb: Enable support for more USB devices including
  Linksys WUSB600N (Closes: #596626) (this change was accidentally
  omitted from 2.6.39-1)
* [x86] Remove Celeron from list of processors supporting PAE. Most
  'Celeron M' models do not.
* Update debconf template translations:
  - Swedish (Martin Bagge) (Closes: #628932)
  - French (David Prévot) (Closes: #628191)
* aufs: Update for 2.6.39 (Closes: #627837)
* Add stable 2.6.39.1, including:
  - ext4: dont set PageUptodate in ext4_end_bio()
  - pata_cmd64x: fix boot crash on parisc (Closes: #622997, #622745)
  - ext3: Fix fs corruption when make_indexed_dir() fails
  - netfilter: nf_ct_sip: validate Content-Length in TCP SIP messages
  - sctp: fix race between sctp_bind_addr_free() and
    sctp_bind_addr_conflict()
  - sctp: fix memory leak of the ASCONF queue when free asoc
  - md/bitmap: fix saving of events_cleared and other state
  - cdc_acm: Fix oops when Droids MuIn LCD is connected
  - cx88: Fix conversion from BKL to fine-grained locks (Closes: #619827)
  - keys: Set cred->user_ns in key_replace_session_keyring (CVE-2011-2184)
  - tmpfs: fix race between truncate and writepage
  - nfs41: Correct offset for LAYOUTCOMMIT
  - xen/mmu: fix a race window causing leave_mm BUG()
  - ext4: fix possible use-after-free in ext4_remove_li_request()
  For the complete list of changes, see:
   http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.39.1
* Bump ABI to 2
* netfilter: Enable IP_SET, IP_SET_BITMAP_IP, IP_SET_BITMAP_IPMAC,
  IP_SET_BITMAP_PORT, IP_SET_HASH_IP, IP_SET_HASH_IPPORT,
  IP_SET_HASH_IPPORTIP, IP_SET_HASH_IPPORTNET, IP_SET_HASH_NET,
  IP_SET_HASH_NETPORT, IP_SET_LIST_SET, NETFILTER_XT_SET as modules
  (Closes: #629401)

[ Aurelien Jarno ]
* [mipsel/loongson-2f] Disable_SCSI_LPFC to workaround GCC ICE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * linux/arch/unicore32/include/asm/processor.h
 
3
 *
 
4
 * Code specific to PKUnity SoC and UniCore ISA
 
5
 *
 
6
 * Copyright (C) 2001-2010 GUAN Xue-tao
 
7
 *
 
8
 * This program is free software; you can redistribute it and/or modify
 
9
 * it under the terms of the GNU General Public License version 2 as
 
10
 * published by the Free Software Foundation.
 
11
 */
 
12
 
 
13
#ifndef __UNICORE_PROCESSOR_H__
 
14
#define __UNICORE_PROCESSOR_H__
 
15
 
 
16
/*
 
17
 * Default implementation of macro that returns current
 
18
 * instruction pointer ("program counter").
 
19
 */
 
20
#define current_text_addr() ({ __label__ _l; _l: &&_l; })
 
21
 
 
22
#ifdef __KERNEL__
 
23
 
 
24
#include <asm/ptrace.h>
 
25
#include <asm/types.h>
 
26
 
 
27
#ifdef __KERNEL__
 
28
#define STACK_TOP       TASK_SIZE
 
29
#define STACK_TOP_MAX   TASK_SIZE
 
30
#endif
 
31
 
 
32
struct debug_entry {
 
33
        u32                     address;
 
34
        u32                     insn;
 
35
};
 
36
 
 
37
struct debug_info {
 
38
        int                     nsaved;
 
39
        struct debug_entry      bp[2];
 
40
};
 
41
 
 
42
struct thread_struct {
 
43
                                                        /* fault info     */
 
44
        unsigned long           address;
 
45
        unsigned long           trap_no;
 
46
        unsigned long           error_code;
 
47
                                                        /* debugging      */
 
48
        struct debug_info       debug;
 
49
};
 
50
 
 
51
#define INIT_THREAD  {  }
 
52
 
 
53
#define start_thread(regs, pc, sp)                                      \
 
54
({                                                                      \
 
55
        unsigned long *stack = (unsigned long *)sp;                     \
 
56
        set_fs(USER_DS);                                                \
 
57
        memset(regs->uregs, 0, sizeof(regs->uregs));                    \
 
58
        regs->UCreg_asr = USER_MODE;                                    \
 
59
        regs->UCreg_pc = pc & ~1;       /* pc */                        \
 
60
        regs->UCreg_sp = sp;            /* sp */                        \
 
61
        regs->UCreg_02 = stack[2];      /* r2 (envp) */                 \
 
62
        regs->UCreg_01 = stack[1];      /* r1 (argv) */                 \
 
63
        regs->UCreg_00 = stack[0];      /* r0 (argc) */                 \
 
64
})
 
65
 
 
66
/* Forward declaration, a strange C thing */
 
67
struct task_struct;
 
68
 
 
69
/* Free all resources held by a thread. */
 
70
extern void release_thread(struct task_struct *);
 
71
 
 
72
/* Prepare to copy thread state - unlazy all lazy status */
 
73
#define prepare_to_copy(tsk)    do { } while (0)
 
74
 
 
75
unsigned long get_wchan(struct task_struct *p);
 
76
 
 
77
#define cpu_relax()                     barrier()
 
78
 
 
79
/*
 
80
 * Create a new kernel thread
 
81
 */
 
82
extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
 
83
 
 
84
#define task_pt_regs(p) \
 
85
        ((struct pt_regs *)(THREAD_START_SP + task_stack_page(p)) - 1)
 
86
 
 
87
#define KSTK_EIP(tsk)   (task_pt_regs(tsk)->UCreg_pc)
 
88
#define KSTK_ESP(tsk)   (task_pt_regs(tsk)->UCreg_sp)
 
89
 
 
90
#endif
 
91
 
 
92
#endif /* __UNICORE_PROCESSOR_H__ */