diff options
Diffstat (limited to 'arch/xtensa')
-rw-r--r-- | arch/xtensa/include/asm/mman.h | 4 | ||||
-rw-r--r-- | arch/xtensa/include/asm/socket.h | 4 | ||||
-rw-r--r-- | arch/xtensa/kernel/pci.c | 17 | ||||
-rw-r--r-- | arch/xtensa/kernel/signal.c | 35 | ||||
-rw-r--r-- | arch/xtensa/platforms/iss/console.c | 22 |
5 files changed, 28 insertions, 54 deletions
diff --git a/arch/xtensa/include/asm/mman.h b/arch/xtensa/include/asm/mman.h index 30789010733d..25bc6c1309c3 100644 --- a/arch/xtensa/include/asm/mman.h +++ b/arch/xtensa/include/asm/mman.h | |||
@@ -86,6 +86,10 @@ | |||
86 | #define MADV_HUGEPAGE 14 /* Worth backing with hugepages */ | 86 | #define MADV_HUGEPAGE 14 /* Worth backing with hugepages */ |
87 | #define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages */ | 87 | #define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages */ |
88 | 88 | ||
89 | #define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, | ||
90 | overrides the coredump filter bits */ | ||
91 | #define MADV_DODUMP 17 /* Clear the MADV_NODUMP flag */ | ||
92 | |||
89 | /* compatibility flags */ | 93 | /* compatibility flags */ |
90 | #define MAP_FILE 0 | 94 | #define MAP_FILE 0 |
91 | 95 | ||
diff --git a/arch/xtensa/include/asm/socket.h b/arch/xtensa/include/asm/socket.h index bb06968be227..e36c68184920 100644 --- a/arch/xtensa/include/asm/socket.h +++ b/arch/xtensa/include/asm/socket.h | |||
@@ -75,5 +75,9 @@ | |||
75 | 75 | ||
76 | #define SO_WIFI_STATUS 41 | 76 | #define SO_WIFI_STATUS 41 |
77 | #define SCM_WIFI_STATUS SO_WIFI_STATUS | 77 | #define SCM_WIFI_STATUS SO_WIFI_STATUS |
78 | #define SO_PEEK_OFF 42 | ||
79 | |||
80 | /* Instruct lower device to use last 4-bytes of skb data as FCS */ | ||
81 | #define SO_NOFCS 43 | ||
78 | 82 | ||
79 | #endif /* _XTENSA_SOCKET_H */ | 83 | #endif /* _XTENSA_SOCKET_H */ |
diff --git a/arch/xtensa/kernel/pci.c b/arch/xtensa/kernel/pci.c index 61045c192e88..eb30e356f5be 100644 --- a/arch/xtensa/kernel/pci.c +++ b/arch/xtensa/kernel/pci.c | |||
@@ -153,7 +153,7 @@ static void __init pci_controller_apertures(struct pci_controller *pci_ctrl, | |||
153 | } | 153 | } |
154 | res->start += io_offset; | 154 | res->start += io_offset; |
155 | res->end += io_offset; | 155 | res->end += io_offset; |
156 | pci_add_resource(resources, res); | 156 | pci_add_resource_offset(resources, res, io_offset); |
157 | 157 | ||
158 | for (i = 0; i < 3; i++) { | 158 | for (i = 0; i < 3; i++) { |
159 | res = &pci_ctrl->mem_resources[i]; | 159 | res = &pci_ctrl->mem_resources[i]; |
@@ -200,24 +200,9 @@ subsys_initcall(pcibios_init); | |||
200 | 200 | ||
201 | void __init pcibios_fixup_bus(struct pci_bus *bus) | 201 | void __init pcibios_fixup_bus(struct pci_bus *bus) |
202 | { | 202 | { |
203 | struct pci_controller *pci_ctrl = bus->sysdata; | ||
204 | struct resource *res; | ||
205 | unsigned long io_offset; | ||
206 | int i; | ||
207 | |||
208 | io_offset = (unsigned long)pci_ctrl->io_space.base; | ||
209 | if (bus->parent) { | 203 | if (bus->parent) { |
210 | /* This is a subordinate bridge */ | 204 | /* This is a subordinate bridge */ |
211 | pci_read_bridge_bases(bus); | 205 | pci_read_bridge_bases(bus); |
212 | |||
213 | for (i = 0; i < 4; i++) { | ||
214 | if ((res = bus->resource[i]) == NULL || !res->flags) | ||
215 | continue; | ||
216 | if (io_offset && (res->flags & IORESOURCE_IO)) { | ||
217 | res->start += io_offset; | ||
218 | res->end += io_offset; | ||
219 | } | ||
220 | } | ||
221 | } | 206 | } |
222 | } | 207 | } |
223 | 208 | ||
diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c index f2220b5bdce6..b69b000349fc 100644 --- a/arch/xtensa/kernel/signal.c +++ b/arch/xtensa/kernel/signal.c | |||
@@ -260,10 +260,7 @@ asmlinkage long xtensa_rt_sigreturn(long a0, long a1, long a2, long a3, | |||
260 | goto badframe; | 260 | goto badframe; |
261 | 261 | ||
262 | sigdelsetmask(&set, ~_BLOCKABLE); | 262 | sigdelsetmask(&set, ~_BLOCKABLE); |
263 | spin_lock_irq(¤t->sighand->siglock); | 263 | set_current_blocked(&set); |
264 | current->blocked = set; | ||
265 | recalc_sigpending(); | ||
266 | spin_unlock_irq(¤t->sighand->siglock); | ||
267 | 264 | ||
268 | if (restore_sigcontext(regs, frame)) | 265 | if (restore_sigcontext(regs, frame)) |
269 | goto badframe; | 266 | goto badframe; |
@@ -336,8 +333,8 @@ gen_return_code(unsigned char *codemem) | |||
336 | } | 333 | } |
337 | 334 | ||
338 | 335 | ||
339 | static void setup_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | 336 | static int setup_frame(int sig, struct k_sigaction *ka, siginfo_t *info, |
340 | sigset_t *set, struct pt_regs *regs) | 337 | sigset_t *set, struct pt_regs *regs) |
341 | { | 338 | { |
342 | struct rt_sigframe *frame; | 339 | struct rt_sigframe *frame; |
343 | int err = 0; | 340 | int err = 0; |
@@ -422,12 +419,11 @@ static void setup_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
422 | current->comm, current->pid, signal, frame, regs->pc); | 419 | current->comm, current->pid, signal, frame, regs->pc); |
423 | #endif | 420 | #endif |
424 | 421 | ||
425 | return; | 422 | return 0; |
426 | 423 | ||
427 | give_sigsegv: | 424 | give_sigsegv: |
428 | if (sig == SIGSEGV) | 425 | force_sigsegv(sig, current); |
429 | ka->sa.sa_handler = SIG_DFL; | 426 | return -EFAULT; |
430 | force_sig(SIGSEGV, current); | ||
431 | } | 427 | } |
432 | 428 | ||
433 | /* | 429 | /* |
@@ -449,11 +445,8 @@ asmlinkage long xtensa_rt_sigsuspend(sigset_t __user *unewset, | |||
449 | return -EFAULT; | 445 | return -EFAULT; |
450 | 446 | ||
451 | sigdelsetmask(&newset, ~_BLOCKABLE); | 447 | sigdelsetmask(&newset, ~_BLOCKABLE); |
452 | spin_lock_irq(¤t->sighand->siglock); | ||
453 | saveset = current->blocked; | 448 | saveset = current->blocked; |
454 | current->blocked = newset; | 449 | set_current_blocked(&newset); |
455 | recalc_sigpending(); | ||
456 | spin_unlock_irq(¤t->sighand->siglock); | ||
457 | 450 | ||
458 | regs->areg[2] = -EINTR; | 451 | regs->areg[2] = -EINTR; |
459 | while (1) { | 452 | while (1) { |
@@ -536,17 +529,11 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset) | |||
536 | 529 | ||
537 | /* Whee! Actually deliver the signal. */ | 530 | /* Whee! Actually deliver the signal. */ |
538 | /* Set up the stack frame */ | 531 | /* Set up the stack frame */ |
539 | setup_frame(signr, &ka, &info, oldset, regs); | 532 | ret = setup_frame(signr, &ka, &info, oldset, regs); |
540 | 533 | if (ret) | |
541 | if (ka.sa.sa_flags & SA_ONESHOT) | 534 | return ret; |
542 | ka.sa.sa_handler = SIG_DFL; | ||
543 | 535 | ||
544 | spin_lock_irq(¤t->sighand->siglock); | 536 | block_sigmask(&ka, signr); |
545 | sigorsets(¤t->blocked, ¤t->blocked, &ka.sa.sa_mask); | ||
546 | if (!(ka.sa.sa_flags & SA_NODEFER)) | ||
547 | sigaddset(¤t->blocked, signr); | ||
548 | recalc_sigpending(); | ||
549 | spin_unlock_irq(¤t->sighand->siglock); | ||
550 | if (current->ptrace & PT_SINGLESTEP) | 537 | if (current->ptrace & PT_SINGLESTEP) |
551 | task_pt_regs(current)->icountlevel = 1; | 538 | task_pt_regs(current)->icountlevel = 1; |
552 | 539 | ||
diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c index 2c723e8b30da..f9726f6afdf1 100644 --- a/arch/xtensa/platforms/iss/console.c +++ b/arch/xtensa/platforms/iss/console.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/param.h> | 19 | #include <linux/param.h> |
20 | #include <linux/seq_file.h> | 20 | #include <linux/seq_file.h> |
21 | #include <linux/serial.h> | 21 | #include <linux/serial.h> |
22 | #include <linux/serialP.h> | ||
23 | 22 | ||
24 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
25 | #include <asm/irq.h> | 24 | #include <asm/irq.h> |
@@ -37,6 +36,7 @@ | |||
37 | #define SERIAL_TIMER_VALUE (20 * HZ) | 36 | #define SERIAL_TIMER_VALUE (20 * HZ) |
38 | 37 | ||
39 | static struct tty_driver *serial_driver; | 38 | static struct tty_driver *serial_driver; |
39 | static struct tty_port serial_port; | ||
40 | static struct timer_list serial_timer; | 40 | static struct timer_list serial_timer; |
41 | 41 | ||
42 | static DEFINE_SPINLOCK(timer_lock); | 42 | static DEFINE_SPINLOCK(timer_lock); |
@@ -68,17 +68,10 @@ static void rs_poll(unsigned long); | |||
68 | 68 | ||
69 | static int rs_open(struct tty_struct *tty, struct file * filp) | 69 | static int rs_open(struct tty_struct *tty, struct file * filp) |
70 | { | 70 | { |
71 | int line = tty->index; | 71 | tty->port = &serial_port; |
72 | |||
73 | if ((line < 0) || (line >= SERIAL_MAX_NUM_LINES)) | ||
74 | return -ENODEV; | ||
75 | |||
76 | spin_lock(&timer_lock); | 72 | spin_lock(&timer_lock); |
77 | |||
78 | if (tty->count == 1) { | 73 | if (tty->count == 1) { |
79 | init_timer(&serial_timer); | 74 | setup_timer(&serial_timer, rs_poll, (unsigned long)tty); |
80 | serial_timer.data = (unsigned long) tty; | ||
81 | serial_timer.function = rs_poll; | ||
82 | mod_timer(&serial_timer, jiffies + SERIAL_TIMER_VALUE); | 75 | mod_timer(&serial_timer, jiffies + SERIAL_TIMER_VALUE); |
83 | } | 76 | } |
84 | spin_unlock(&timer_lock); | 77 | spin_unlock(&timer_lock); |
@@ -99,10 +92,10 @@ static int rs_open(struct tty_struct *tty, struct file * filp) | |||
99 | */ | 92 | */ |
100 | static void rs_close(struct tty_struct *tty, struct file * filp) | 93 | static void rs_close(struct tty_struct *tty, struct file * filp) |
101 | { | 94 | { |
102 | spin_lock(&timer_lock); | 95 | spin_lock_bh(&timer_lock); |
103 | if (tty->count == 1) | 96 | if (tty->count == 1) |
104 | del_timer_sync(&serial_timer); | 97 | del_timer_sync(&serial_timer); |
105 | spin_unlock(&timer_lock); | 98 | spin_unlock_bh(&timer_lock); |
106 | } | 99 | } |
107 | 100 | ||
108 | 101 | ||
@@ -210,13 +203,14 @@ static const struct tty_operations serial_ops = { | |||
210 | 203 | ||
211 | int __init rs_init(void) | 204 | int __init rs_init(void) |
212 | { | 205 | { |
213 | serial_driver = alloc_tty_driver(1); | 206 | tty_port_init(&serial_port); |
207 | |||
208 | serial_driver = alloc_tty_driver(SERIAL_MAX_NUM_LINES); | ||
214 | 209 | ||
215 | printk ("%s %s\n", serial_name, serial_version); | 210 | printk ("%s %s\n", serial_name, serial_version); |
216 | 211 | ||
217 | /* Initialize the tty_driver structure */ | 212 | /* Initialize the tty_driver structure */ |
218 | 213 | ||
219 | serial_driver->owner = THIS_MODULE; | ||
220 | serial_driver->driver_name = "iss_serial"; | 214 | serial_driver->driver_name = "iss_serial"; |
221 | serial_driver->name = "ttyS"; | 215 | serial_driver->name = "ttyS"; |
222 | serial_driver->major = TTY_MAJOR; | 216 | serial_driver->major = TTY_MAJOR; |