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

« back to all changes in this revision

Viewing changes to arch/unicore32/include/asm/assembler.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/assembler.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
 *  Do not include any C declarations in this file - it is included by
 
13
 *  assembler source.
 
14
 */
 
15
#ifndef __ASSEMBLY__
 
16
#error "Only include this from assembly code"
 
17
#endif
 
18
 
 
19
#include <asm/ptrace.h>
 
20
 
 
21
/*
 
22
 * Little Endian independent macros for shifting bytes within registers.
 
23
 */
 
24
#define pull            >>
 
25
#define push            <<
 
26
#define get_byte_0      << #0
 
27
#define get_byte_1      >> #8
 
28
#define get_byte_2      >> #16
 
29
#define get_byte_3      >> #24
 
30
#define put_byte_0      << #0
 
31
#define put_byte_1      << #8
 
32
#define put_byte_2      << #16
 
33
#define put_byte_3      << #24
 
34
 
 
35
#define cadd            cmpadd
 
36
#define cand            cmpand
 
37
#define csub            cmpsub
 
38
#define cxor            cmpxor
 
39
 
 
40
/*
 
41
 * Enable and disable interrupts
 
42
 */
 
43
        .macro disable_irq, temp
 
44
        mov     \temp, asr
 
45
        andn     \temp, \temp, #0xFF
 
46
        or      \temp, \temp, #PSR_I_BIT | PRIV_MODE
 
47
        mov.a   asr, \temp
 
48
        .endm
 
49
 
 
50
        .macro enable_irq, temp
 
51
        mov     \temp, asr
 
52
        andn     \temp, \temp, #0xFF
 
53
        or      \temp, \temp, #PRIV_MODE
 
54
        mov.a   asr, \temp
 
55
        .endm
 
56
 
 
57
#define USER(x...)                              \
 
58
9999:   x;                                      \
 
59
        .pushsection __ex_table, "a";           \
 
60
        .align  3;                              \
 
61
        .long   9999b, 9001f;                   \
 
62
        .popsection
 
63
 
 
64
        .macro  notcond, cond, nexti = .+8
 
65
        .ifc    \cond, eq
 
66
                bne     \nexti
 
67
        .else;  .ifc    \cond, ne
 
68
                beq     \nexti
 
69
        .else;  .ifc    \cond, ea
 
70
                bub     \nexti
 
71
        .else;  .ifc    \cond, ub
 
72
                bea     \nexti
 
73
        .else;  .ifc    \cond, fs
 
74
                bns     \nexti
 
75
        .else;  .ifc    \cond, ns
 
76
                bfs     \nexti
 
77
        .else;  .ifc    \cond, fv
 
78
                bnv     \nexti
 
79
        .else;  .ifc    \cond, nv
 
80
                bfv     \nexti
 
81
        .else;  .ifc    \cond, ua
 
82
                beb     \nexti
 
83
        .else;  .ifc    \cond, eb
 
84
                bua     \nexti
 
85
        .else;  .ifc    \cond, eg
 
86
                bsl     \nexti
 
87
        .else;  .ifc    \cond, sl
 
88
                beg     \nexti
 
89
        .else;  .ifc    \cond, sg
 
90
                bel     \nexti
 
91
        .else;  .ifc    \cond, el
 
92
                bsg     \nexti
 
93
        .else;  .ifnc   \cond, al
 
94
                .error  "Unknown cond in notcond macro argument"
 
95
        .endif; .endif; .endif; .endif; .endif; .endif; .endif
 
96
        .endif; .endif; .endif; .endif; .endif; .endif; .endif
 
97
        .endif
 
98
        .endm
 
99
 
 
100
        .macro  usracc, instr, reg, ptr, inc, cond, rept, abort
 
101
        .rept   \rept
 
102
        notcond \cond, .+8
 
103
9999 :
 
104
        .if     \inc == 1
 
105
        \instr\()b.u \reg, [\ptr], #\inc
 
106
        .elseif \inc == 4
 
107
        \instr\()w.u \reg, [\ptr], #\inc
 
108
        .else
 
109
        .error  "Unsupported inc macro argument"
 
110
        .endif
 
111
 
 
112
        .pushsection __ex_table, "a"
 
113
        .align  3
 
114
        .long   9999b, \abort
 
115
        .popsection
 
116
        .endr
 
117
        .endm
 
118
 
 
119
        .macro  strusr, reg, ptr, inc, cond = al, rept = 1, abort = 9001f
 
120
        usracc  st, \reg, \ptr, \inc, \cond, \rept, \abort
 
121
        .endm
 
122
 
 
123
        .macro  ldrusr, reg, ptr, inc, cond = al, rept = 1, abort = 9001f
 
124
        usracc  ld, \reg, \ptr, \inc, \cond, \rept, \abort
 
125
        .endm
 
126
 
 
127
        .macro  nop8
 
128
        .rept   8
 
129
                nop
 
130
        .endr
 
131
        .endm