~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to arch/s390/include/asm/jump_label.h

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _ASM_S390_JUMP_LABEL_H
 
2
#define _ASM_S390_JUMP_LABEL_H
 
3
 
 
4
#include <linux/types.h>
 
5
 
 
6
#define JUMP_LABEL_NOP_SIZE 6
 
7
 
 
8
#ifdef CONFIG_64BIT
 
9
#define ASM_PTR ".quad"
 
10
#define ASM_ALIGN ".balign 8"
 
11
#else
 
12
#define ASM_PTR ".long"
 
13
#define ASM_ALIGN ".balign 4"
 
14
#endif
 
15
 
 
16
static __always_inline bool arch_static_branch(struct jump_label_key *key)
 
17
{
 
18
        asm goto("0:    brcl 0,0\n"
 
19
                ".pushsection __jump_table, \"aw\"\n"
 
20
                ASM_ALIGN "\n"
 
21
                ASM_PTR " 0b, %l[label], %0\n"
 
22
                ".popsection\n"
 
23
                : : "X" (key) : : label);
 
24
        return false;
 
25
label:
 
26
        return true;
 
27
}
 
28
 
 
29
typedef unsigned long jump_label_t;
 
30
 
 
31
struct jump_entry {
 
32
        jump_label_t code;
 
33
        jump_label_t target;
 
34
        jump_label_t key;
 
35
};
 
36
 
 
37
#endif