diff options
Diffstat (limited to 'arch/s390/include/asm')
-rw-r--r-- | arch/s390/include/asm/dma.h | 6 | ||||
-rw-r--r-- | arch/s390/include/asm/io.h | 5 | ||||
-rw-r--r-- | arch/s390/include/asm/irq.h | 78 | ||||
-rw-r--r-- | arch/s390/include/asm/pgtable.h | 5 | ||||
-rw-r--r-- | arch/s390/include/asm/timex.h | 28 |
5 files changed, 88 insertions, 34 deletions
diff --git a/arch/s390/include/asm/dma.h b/arch/s390/include/asm/dma.h index de015d85e3e5..bb9bdcd20864 100644 --- a/arch/s390/include/asm/dma.h +++ b/arch/s390/include/asm/dma.h | |||
@@ -10,4 +10,10 @@ | |||
10 | */ | 10 | */ |
11 | #define MAX_DMA_ADDRESS 0x80000000 | 11 | #define MAX_DMA_ADDRESS 0x80000000 |
12 | 12 | ||
13 | #ifdef CONFIG_PCI | ||
14 | extern int isa_dma_bridge_buggy; | ||
15 | #else | ||
16 | #define isa_dma_bridge_buggy (0) | ||
17 | #endif | ||
18 | |||
13 | #endif /* _ASM_S390_DMA_H */ | 19 | #endif /* _ASM_S390_DMA_H */ |
diff --git a/arch/s390/include/asm/io.h b/arch/s390/include/asm/io.h index 16c3eb164f4f..27cb32185ce1 100644 --- a/arch/s390/include/asm/io.h +++ b/arch/s390/include/asm/io.h | |||
@@ -85,6 +85,11 @@ static inline void iounmap(volatile void __iomem *addr) | |||
85 | #define __raw_writel zpci_write_u32 | 85 | #define __raw_writel zpci_write_u32 |
86 | #define __raw_writeq zpci_write_u64 | 86 | #define __raw_writeq zpci_write_u64 |
87 | 87 | ||
88 | #define readb_relaxed readb | ||
89 | #define readw_relaxed readw | ||
90 | #define readl_relaxed readl | ||
91 | #define readq_relaxed readq | ||
92 | |||
88 | #endif /* CONFIG_PCI */ | 93 | #endif /* CONFIG_PCI */ |
89 | 94 | ||
90 | #include <asm-generic/io.h> | 95 | #include <asm-generic/io.h> |
diff --git a/arch/s390/include/asm/irq.h b/arch/s390/include/asm/irq.h index e6972f85d2b0..7def77302d63 100644 --- a/arch/s390/include/asm/irq.h +++ b/arch/s390/include/asm/irq.h | |||
@@ -2,43 +2,61 @@ | |||
2 | #define _ASM_IRQ_H | 2 | #define _ASM_IRQ_H |
3 | 3 | ||
4 | #include <linux/hardirq.h> | 4 | #include <linux/hardirq.h> |
5 | #include <linux/percpu.h> | ||
6 | #include <linux/cache.h> | ||
5 | #include <linux/types.h> | 7 | #include <linux/types.h> |
6 | 8 | ||
7 | enum interruption_class { | 9 | enum interruption_main_class { |
8 | EXTERNAL_INTERRUPT, | 10 | EXTERNAL_INTERRUPT, |
9 | IO_INTERRUPT, | 11 | IO_INTERRUPT, |
10 | EXTINT_CLK, | 12 | NR_IRQS |
11 | EXTINT_EXC, | 13 | }; |
12 | EXTINT_EMS, | 14 | |
13 | EXTINT_TMR, | 15 | enum interruption_class { |
14 | EXTINT_TLA, | 16 | IRQEXT_CLK, |
15 | EXTINT_PFL, | 17 | IRQEXT_EXC, |
16 | EXTINT_DSD, | 18 | IRQEXT_EMS, |
17 | EXTINT_VRT, | 19 | IRQEXT_TMR, |
18 | EXTINT_SCP, | 20 | IRQEXT_TLA, |
19 | EXTINT_IUC, | 21 | IRQEXT_PFL, |
20 | EXTINT_CMS, | 22 | IRQEXT_DSD, |
21 | EXTINT_CMC, | 23 | IRQEXT_VRT, |
22 | EXTINT_CMR, | 24 | IRQEXT_SCP, |
23 | IOINT_CIO, | 25 | IRQEXT_IUC, |
24 | IOINT_QAI, | 26 | IRQEXT_CMS, |
25 | IOINT_DAS, | 27 | IRQEXT_CMC, |
26 | IOINT_C15, | 28 | IRQEXT_CMR, |
27 | IOINT_C70, | 29 | IRQIO_CIO, |
28 | IOINT_TAP, | 30 | IRQIO_QAI, |
29 | IOINT_VMR, | 31 | IRQIO_DAS, |
30 | IOINT_LCS, | 32 | IRQIO_C15, |
31 | IOINT_CLW, | 33 | IRQIO_C70, |
32 | IOINT_CTC, | 34 | IRQIO_TAP, |
33 | IOINT_APB, | 35 | IRQIO_VMR, |
34 | IOINT_ADM, | 36 | IRQIO_LCS, |
35 | IOINT_CSC, | 37 | IRQIO_CLW, |
36 | IOINT_PCI, | 38 | IRQIO_CTC, |
37 | IOINT_MSI, | 39 | IRQIO_APB, |
40 | IRQIO_ADM, | ||
41 | IRQIO_CSC, | ||
42 | IRQIO_PCI, | ||
43 | IRQIO_MSI, | ||
38 | NMI_NMI, | 44 | NMI_NMI, |
39 | NR_IRQS, | 45 | CPU_RST, |
46 | NR_ARCH_IRQS | ||
40 | }; | 47 | }; |
41 | 48 | ||
49 | struct irq_stat { | ||
50 | unsigned int irqs[NR_ARCH_IRQS]; | ||
51 | }; | ||
52 | |||
53 | DECLARE_PER_CPU_SHARED_ALIGNED(struct irq_stat, irq_stat); | ||
54 | |||
55 | static __always_inline void inc_irq_stat(enum interruption_class irq) | ||
56 | { | ||
57 | __get_cpu_var(irq_stat).irqs[irq]++; | ||
58 | } | ||
59 | |||
42 | struct ext_code { | 60 | struct ext_code { |
43 | unsigned short subcode; | 61 | unsigned short subcode; |
44 | unsigned short code; | 62 | unsigned short code; |
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index c928dc1938f2..c1d7930a82f4 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
@@ -1387,10 +1387,7 @@ static inline int has_transparent_hugepage(void) | |||
1387 | 1387 | ||
1388 | static inline unsigned long pmd_pfn(pmd_t pmd) | 1388 | static inline unsigned long pmd_pfn(pmd_t pmd) |
1389 | { | 1389 | { |
1390 | if (pmd_trans_huge(pmd)) | 1390 | return pmd_val(pmd) >> PAGE_SHIFT; |
1391 | return pmd_val(pmd) >> HPAGE_SHIFT; | ||
1392 | else | ||
1393 | return pmd_val(pmd) >> PAGE_SHIFT; | ||
1394 | } | 1391 | } |
1395 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ | 1392 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ |
1396 | 1393 | ||
diff --git a/arch/s390/include/asm/timex.h b/arch/s390/include/asm/timex.h index fba4d66788a2..4c060bb5b8ea 100644 --- a/arch/s390/include/asm/timex.h +++ b/arch/s390/include/asm/timex.h | |||
@@ -128,4 +128,32 @@ static inline unsigned long long get_clock_monotonic(void) | |||
128 | return get_clock_xt() - sched_clock_base_cc; | 128 | return get_clock_xt() - sched_clock_base_cc; |
129 | } | 129 | } |
130 | 130 | ||
131 | /** | ||
132 | * tod_to_ns - convert a TOD format value to nanoseconds | ||
133 | * @todval: to be converted TOD format value | ||
134 | * Returns: number of nanoseconds that correspond to the TOD format value | ||
135 | * | ||
136 | * Converting a 64 Bit TOD format value to nanoseconds means that the value | ||
137 | * must be divided by 4.096. In order to achieve that we multiply with 125 | ||
138 | * and divide by 512: | ||
139 | * | ||
140 | * ns = (todval * 125) >> 9; | ||
141 | * | ||
142 | * In order to avoid an overflow with the multiplication we can rewrite this. | ||
143 | * With a split todval == 2^32 * th + tl (th upper 32 bits, tl lower 32 bits) | ||
144 | * we end up with | ||
145 | * | ||
146 | * ns = ((2^32 * th + tl) * 125 ) >> 9; | ||
147 | * -> ns = (2^23 * th * 125) + ((tl * 125) >> 9); | ||
148 | * | ||
149 | */ | ||
150 | static inline unsigned long long tod_to_ns(unsigned long long todval) | ||
151 | { | ||
152 | unsigned long long ns; | ||
153 | |||
154 | ns = ((todval >> 32) << 23) * 125; | ||
155 | ns += ((todval & 0xffffffff) * 125) >> 9; | ||
156 | return ns; | ||
157 | } | ||
158 | |||
131 | #endif | 159 | #endif |