Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
43df5eac
Commit
43df5eac
authored
Jun 25, 2005
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
parents
7be426c6
e55c57e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
41 deletions
+45
-41
drivers/serial/sunzilog.c
drivers/serial/sunzilog.c
+4
-4
include/asm-sparc64/termios.h
include/asm-sparc64/termios.h
+41
-37
No files found.
drivers/serial/sunzilog.c
View file @
43df5eac
...
...
@@ -1071,7 +1071,7 @@ static void __init sunzilog_alloc_tables(void)
*/
static
struct
zilog_layout
__iomem
*
__init
get_zs_sun4u
(
int
chip
,
int
zsnode
)
{
unsigned
long
mapped_addr
;
void
__iomem
*
mapped_addr
;
unsigned
int
sun4u_ino
;
struct
sbus_bus
*
sbus
=
NULL
;
struct
sbus_dev
*
sdev
=
NULL
;
...
...
@@ -1111,9 +1111,9 @@ static struct zilog_layout __iomem * __init get_zs_sun4u(int chip, int zsnode)
apply_fhc_ranges
(
central_bus
->
child
,
&
zsregs
[
0
],
1
);
apply_central_ranges
(
central_bus
,
&
zsregs
[
0
],
1
);
mapped_addr
=
(((
u64
)
zsregs
[
0
].
which_io
)
<<
32UL
)
|
((
u64
)
zsregs
[
0
].
phys_addr
);
mapped_addr
=
(
void
__iomem
*
)
(((
(
u64
)
zsregs
[
0
].
which_io
)
<<
32UL
)
|
((
u64
)
zsregs
[
0
].
phys_addr
)
)
;
}
if
(
zilog_irq
==
-
1
)
{
...
...
include/asm-sparc64/termios.h
View file @
43df5eac
...
...
@@ -100,16 +100,17 @@ struct winsize {
#define user_termio_to_kernel_termios(termios, termio) \
({ \
unsigned short tmp; \
get_user(tmp, &(termio)->c_iflag); \
int err; \
err = get_user(tmp, &(termio)->c_iflag); \
(termios)->c_iflag = (0xffff0000 & ((termios)->c_iflag)) | tmp; \
get_user(tmp, &(termio)->c_oflag); \
err |=
get_user(tmp, &(termio)->c_oflag); \
(termios)->c_oflag = (0xffff0000 & ((termios)->c_oflag)) | tmp; \
get_user(tmp, &(termio)->c_cflag); \
err |=
get_user(tmp, &(termio)->c_cflag); \
(termios)->c_cflag = (0xffff0000 & ((termios)->c_cflag)) | tmp; \
get_user(tmp, &(termio)->c_lflag); \
err |=
get_user(tmp, &(termio)->c_lflag); \
(termios)->c_lflag = (0xffff0000 & ((termios)->c_lflag)) | tmp; \
copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
0
; \
err |=
copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
err
; \
})
/*
...
...
@@ -119,53 +120,56 @@ struct winsize {
*/
#define kernel_termios_to_user_termio(termio, termios) \
({ \
put_user((termios)->c_iflag, &(termio)->c_iflag); \
put_user((termios)->c_oflag, &(termio)->c_oflag); \
put_user((termios)->c_cflag, &(termio)->c_cflag); \
put_user((termios)->c_lflag, &(termio)->c_lflag); \
put_user((termios)->c_line, &(termio)->c_line); \
copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
int err; \
err = put_user((termios)->c_iflag, &(termio)->c_iflag); \
err |= put_user((termios)->c_oflag, &(termio)->c_oflag); \
err |= put_user((termios)->c_cflag, &(termio)->c_cflag); \
err |= put_user((termios)->c_lflag, &(termio)->c_lflag); \
err |= put_user((termios)->c_line, &(termio)->c_line); \
err |= copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
if (!((termios)->c_lflag & ICANON)) { \
put_user((termios)->c_cc[VMIN], &(termio)->c_cc[_VMIN]); \
put_user((termios)->c_cc[VTIME], &(termio)->c_cc[_VTIME]); \
err |=
put_user((termios)->c_cc[VMIN], &(termio)->c_cc[_VMIN]); \
err |=
put_user((termios)->c_cc[VTIME], &(termio)->c_cc[_VTIME]); \
} \
0
; \
err
; \
})
#define user_termios_to_kernel_termios(k, u) \
({ \
get_user((k)->c_iflag, &(u)->c_iflag); \
get_user((k)->c_oflag, &(u)->c_oflag); \
get_user((k)->c_cflag, &(u)->c_cflag); \
get_user((k)->c_lflag, &(u)->c_lflag); \
get_user((k)->c_line, &(u)->c_line); \
copy_from_user((k)->c_cc, (u)->c_cc, NCCS); \
int err; \
err = get_user((k)->c_iflag, &(u)->c_iflag); \
err |= get_user((k)->c_oflag, &(u)->c_oflag); \
err |= get_user((k)->c_cflag, &(u)->c_cflag); \
err |= get_user((k)->c_lflag, &(u)->c_lflag); \
err |= get_user((k)->c_line, &(u)->c_line); \
err |= copy_from_user((k)->c_cc, (u)->c_cc, NCCS); \
if((k)->c_lflag & ICANON) { \
get_user((k)->c_cc[VEOF], &(u)->c_cc[VEOF]); \
get_user((k)->c_cc[VEOL], &(u)->c_cc[VEOL]); \
err |=
get_user((k)->c_cc[VEOF], &(u)->c_cc[VEOF]); \
err |=
get_user((k)->c_cc[VEOL], &(u)->c_cc[VEOL]); \
} else { \
get_user((k)->c_cc[VMIN], &(u)->c_cc[_VMIN]); \
get_user((k)->c_cc[VTIME], &(u)->c_cc[_VTIME]); \
err |=
get_user((k)->c_cc[VMIN], &(u)->c_cc[_VMIN]); \
err |=
get_user((k)->c_cc[VTIME], &(u)->c_cc[_VTIME]); \
} \
0
; \
err
; \
})
#define kernel_termios_to_user_termios(u, k) \
({ \
put_user((k)->c_iflag, &(u)->c_iflag); \
put_user((k)->c_oflag, &(u)->c_oflag); \
put_user((k)->c_cflag, &(u)->c_cflag); \
put_user((k)->c_lflag, &(u)->c_lflag); \
put_user((k)->c_line, &(u)->c_line); \
copy_to_user((u)->c_cc, (k)->c_cc, NCCS); \
int err; \
err = put_user((k)->c_iflag, &(u)->c_iflag); \
err |= put_user((k)->c_oflag, &(u)->c_oflag); \
err |= put_user((k)->c_cflag, &(u)->c_cflag); \
err |= put_user((k)->c_lflag, &(u)->c_lflag); \
err |= put_user((k)->c_line, &(u)->c_line); \
err |= copy_to_user((u)->c_cc, (k)->c_cc, NCCS); \
if(!((k)->c_lflag & ICANON)) { \
put_user((k)->c_cc[VMIN], &(u)->c_cc[_VMIN]); \
put_user((k)->c_cc[VTIME], &(u)->c_cc[_VTIME]); \
err |=
put_user((k)->c_cc[VMIN], &(u)->c_cc[_VMIN]); \
err |=
put_user((k)->c_cc[VTIME], &(u)->c_cc[_VTIME]); \
} else { \
put_user((k)->c_cc[VEOF], &(u)->c_cc[VEOF]); \
put_user((k)->c_cc[VEOL], &(u)->c_cc[VEOL]); \
err |=
put_user((k)->c_cc[VEOF], &(u)->c_cc[VEOF]); \
err |=
put_user((k)->c_cc[VEOL], &(u)->c_cc[VEOL]); \
} \
0
; \
err
; \
})
#endif
/* __KERNEL__ */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment